Hi
I have here a SSH Script Advanced Sensor for monitoring a asterisk with a script.
I have on some return values from the digium cards a string instead a number.
Can i use string and display them in PRTG where i can set an alarm on it like:
- OK = Green
- Yel = Warning
- Red = Alarm
?
Here a part of the script, that gives a integer back for the moment:
# Check DIGIUM Card Port 1 DIGI1=$(asterisk -rx "dahdi show status" | sed -n '2p' | cut -d " " -f 22) echo -n "<result> <channel>DIGIUM Port 1 Status</channel> <value>" if [ "OK" = "$DIGI1" ]; then echo "1" else echo "-1" fi echo "</value> <unit>custom</unit> <customunit></customunit> </result>"
Add comment