I have been setting up Custom SSH Script/Sensors for our Linux boxes. The documentation and example are great, most scripts are running perfectly. I have run into an issue when trying to set the return value using a variable, for example:
This works fine from a script:
This always causes the value in the PRTG sensor to be 0 (like its a string):
COUNT=`expr 25 + 25`
The output on the screen when manually running these is the same:
I've tried typeset -i, declare -i on the COUNT variable to be sure its an integer. I've tried changing around how the output is wrapped, and regardless of whether the script outputs 0:50:Ok, if the 50 came from a variable the sensor does not like it.
I'd love to be able to track the actual 'value' without building a crazy CASE statement to handle every possibility.
I've also tried setting the returncode as an variable, that seems to work just fine:
Thanks for any direction on this.