Hi all !
I am using nagios for checking weekly backups.
Checks are scheduled at 9am every monday.
It happens that sometimes backup does not work. so Nagios returns the CRITICAL status.
And also nagstamon.
This CRITICAL status does not change until the next check, so for a week there is the CRITICAL status… is it possible to force an OK so for example the nagstamon does not “burden” me with that red status ??
I hope i have been clear in explaining, sorry for my bad english!
Regards
Yes, you can do that. There is a command with which you can send any check result to Nagios. It is usually used in distributed monitoring, but can be used in other scenarios. Just respect the syntax and it should be ok:
/usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$ ‘$SERVICEDESC$’ $SERVICESTATE$ ‘$OUTPUT$’
so form the terminal you could write something like this:
**/usr/local/nagios/libexec/eventhandlers/submit_check_result **backup_server ‘backup_service’ 0 ‘This is a fake result check just to get rid of CRITICAL’
Hey, thanks, you very kind.
But …
- In my nagios installations there is not the eventhandlers directory and so no submit_check_result script …
- When i’ll get the script , should i execute from the nagios server or from the monitored server??
Regards and thanks again
Hm, try to locate it running the locate submit_check_result command from the terminal. It should be on your server if Nagios was installed properly. Maybe it is just not on the same path on your server.
When you find submit_check_result script run it from your Nagios sever
i already tried and there is not any submit_check_result in the nagios server. There is not the eventhandlers directory.
I installed nagios from tarball. I am on Centos.
Hm, weird. Check to see if you have eventhandlers somewhere in the tarball source. It should be there. If it is there, then check your installation again. If you still can’t find it, maybe to reinstall Nagios?
It seems there is something missing in my Nagios installation. I took a look in internet and it seems it must be present nsca, that i have to know what is and what does. Is nsca needed in nagios server ? I will get eventhandlers from the 3.0.4 tarball.
SOLVED ! I just extracted the eventhandlers directory for the nagios tarball, and put in the nagios server. So executing the command /usr/local/nagios/libexec/eventhandlers/submit_check_result AS400DEV ‘Check_Vision’ 0 ‘Fake OK’ put the status of the service OK. Thanks for the help!
Regards
I ReOpen this thread because i noticed that forcing an OK to submit_check_result it works …but…
the “next scheduled check” will not be considered.
Current Status:
OK
(for 24d 3h 58m 13s)
Status Information: File /mnt/flr_as400prd/ok_bkp_prd.txt exist.
Performance Data:
Current Attempt: 1/3 (HARD state)
Last Check Time: 11-05-2008 11:37:21
Check Type: ACTIVE
Check Latency / Duration: 2.636 / 0.243 seconds
Next Scheduled Check: 11-06-2009 08:09:30
Last State Change: 10-13-2008 08:34:42
Last Notification: N/A (notification 0)
Is This Service Flapping?
NO
(7.76% state change)
In Scheduled Downtime?
NO
Last Update: 11-06-2008 11:32:52 ( 0d 0h 0m 3s ago)
The check should be DAILY but this morning it was not done. And the state remains in OK.
Any suggestion ??
Thanks in advance to all