Page 1 of 1

[SOLVED] NagiosXI does not show graphic

Posted: Wed Mar 11, 2020 8:38 am
by sincorchetes
Hello all,

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}
fi
I get correctly status, message... in NagiosXI and Nagios Core but I don't give graphics.

In 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.

Re: [SOLVED] NagiosXI does not show graphic

Posted: Wed Mar 11, 2020 9:49 am
by scottwilkerson
Great!

Locking thread