//SensorWarn is used to return an error via PRTG message
SensorWarn is used to return an error via PRTG message
// SensorWarn is used to return an error via PRTG message
func SensorWarn(inErr error, er bool) {
	s := ps.New()
	if er {
		s.SetError(true)
	} else {
		s.SetError(false)
		c := s.AddChannel("Execution time").SetValue(999).SetUnit(ps.TimeResponse)
		c.Warning = "1"
	}
	s.SetSensorText(inErr.Error())
	js, err := s.MarshalToString()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(js)
}
func SensorWarn ( inErr error , er bool ) { s := ps . New ( ) if er { s . SetError ( true ) } else { s . SetError ( false ) c := s . AddChannel ( " " ) . SetValue ( 999 ) . SetUnit ( ps . TimeResponse ) c . Warning = " " } s . SetSensorText ( inErr . Error ( ) ) js , err := s . MarshalToString ( ) if err != nil { log . Fatal ( err ) } fmt . Println ( js ) }
SensorWarn is used to return an error via PRTG message
SensorWarn is used to return an error via PRTG message