Page 1 of 1

Advice/Ideas to reset a service to OK

Posted: Wed Mar 19, 2014 2:29 pm
by BanditBBS
Ok, so I have a service check that runs once a day at 8:30am. Its basically checking if a folder has any files in it and if so, it returns CRITICAL and if empty it is OK.

Here is the issue, they only want one alert and for it to reset to OK after that. I already have it set to only alert on CRITICAL so when it resets back to OK they won't get another message. My issue now....how to reset back to OK. I can't think of a valid method besides letting it run a second time and have some sort of method to determine if it is the second run and then return it to OK.

Re: Advice/Ideas to reset a service to OK

Posted: Wed Mar 19, 2014 3:01 pm
by sreinhardt
Cron a passive check submission, use escalations to stop a second notification or notification interval set to blank to only send one time.

Re: Advice/Ideas to reset a service to OK

Posted: Thu Mar 20, 2014 9:00 am
by BanditBBS
sreinhardt wrote:Cron a passive check submission, use escalations to stop a second notification or notification interval set to blank to only send one time.
Hmmm, cron a passive check submission...hmmm. That can work, just need to schedule it for 8:40am daily. Want to descibe how to do that so I not hurt my head? LOL

Also, blanking the notification interval causes it to just send one alert, really? How did I not know that! :)

Re: Advice/Ideas to reset a service to OK

Posted: Thu Mar 20, 2014 9:48 am
by abrist
Below, you can find an example script:
http://old.nagios.org/developerinfo/ext ... and_id=114
Full command listing:
http://old.nagios.org/developerinfo/ext ... ndlist.php
Explanation of external commands:
http://nagios.sourceforge.net/docs/3_0/extcommands.html
Creating cron jobs:
http://www.cyberciti.biz/faq/how-do-i-a ... unix-oses/

Let me know if you have any issues with your brain pasting these things together.

Re: Advice/Ideas to reset a service to OK

Posted: Thu Mar 20, 2014 9:53 am
by BanditBBS
Wow, the elusive Andy replies to my thread, I feel special :)

Thanks guys, you can close this up!

p.s. Really Andy, linking me to how to create the cron job itself...ye of little faith, lol.