Hi All, Just upgraded from Nagios2 to Nagios4 so I can try the jsonquery but I can't get the answer I am looking for.
I would like to grab (using curl I hope) a simple yes no answer to the question
"Are there any unacknowledged host or service problems"?
This will control the colour of the Nagios button on our engineering homepage and of course if there are any problems the engineers can click the red button and investigate
If all is well they will see a green button and only click when they need to.
Sorry if I am missing something obvious!
TIA
Simon
Get overall status for Desktop
Re: Get overall status for Desktop
Meh! I tried APIs and JsonQuery but it was all too complicated
In the end I did
grep -B39 problem_has_been_acknowledged=0 /usr/local/nagios/var/status.dat|grep -B14 current_state=1|grep host_name
Once per minute from cron and it works a treat
In the end I did
grep -B39 problem_has_been_acknowledged=0 /usr/local/nagios/var/status.dat|grep -B14 current_state=1|grep host_name
Once per minute from cron and it works a treat
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Get overall status for Desktop
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!