Hi,
I’m having trouble setting warning and critical thresholds on a check_by_ssh command.
At the moment I have check_by_ssh connecting to another machine, executing a simple script and returning a numerical value.
So far I have had no luck trying to set warning and critical thresholds on this value. I’ve been getting errors in the config and I can’t find anything online telling me the right way to do this.
My config looks like this;
command.cfg
define command{
command_name check-sessions
command_line $USER1$/check_by_ssh -i /home/nagios/.ssh/id_dsa -l nagios -H $HOSTADDRESS$ -C /home/nagios/session.sh 2>/dev/null
}
myHost.cfg
define service{
use generic-service
host_name myHost
service_description Web Session Check
check_command check-sessions
}
The maximum value that the script will return is 300 so I want to add threshold using either absolute values or percentages.
Can anybody help me here? I’m completely stuck and the documentation has been no help to me.
Thanks for any and all help.