I made a script to graphic that I get an int value like 200.
I have this in conditional into script to notify a Nagios state:
Code: Select all
ok=0
critical=1
warning=2
if [ "${resultado}" > "$5" ]; then
echo "CRITICAL: Score is ${result} | 'score'=${result};100;110;;;"
exit ${critical}
elif [ "${resultado}" == "$4" ]; then
echo "WARNING: Score is too low ${result} | 'score'=${result}50;100;;;"
exit ${warning}
elif [ -z "${resultado}" ]; then
result=0
echo "CRITICAL: Score is ${result} | 'score'=${result};100;110;;;"
exit ${critical}
else
echo "OK: Score is ${result} | 'score'=${result};120;5000;;;"
exit ${ok}
fiIn NagiosXI, I have perform_data enabled, but rrd never is generated. Why It does not work?
Cheers.
EDIT: I removed ";;;" from echo lines and It's solved.