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>"
Hi,
as your script returns integers anyway, you may want to use those in combination with value lookups (https://www.paessler.com/manuals/prtg/define_lookups.htm). That way, you can have PRTG translating the integer values of your script into custom string messages AND the according sensor state.
Nov, 2014 - Permalink