Advice/Ideas to reset a service to OK

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Advice/Ideas to reset a service to OK

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Advice/Ideas to reset a service to OK

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Advice/Ideas to reset a service to OK

Post 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! :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Advice/Ideas to reset a service to OK

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Advice/Ideas to reset a service to OK

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked