Nagios: Set status to OK after x Hours (passive check)

Nagios V 3.3.1

Is there a way to set a passive check's status to OK after the duration hits X hours?
mw-hostingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
I have not used it in a while, but I think on the secondary server you can set the period during which the active check is being performed.  i.e. secondary server checks stop checking the host after a certain Time.

rereading your question do you want the
server A master

server B secondary
host A

are you trying to achieve the result that if host A is down for X hours, its status will auto change to OK?
0
mw-hostingAuthor Commented:
It is a set of service checks that I would want to set to OK status after 24 hours.
0
arnoldCommented:
Could you provide a complete description of what you have and what you want to achieve?
Are you looking for server B to only check server A for 24 hours and then assume that it is OK?

host a went down. host a recovered at 8 am, you now want server B to check host a only until 8 am the following morning?

What happens during the 24 hours, does the host A being reflected as Ok or Not?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mw-hostingAuthor Commented:
Could you provide a complete description of what you have and what you want to achieve?
I have a load balancer that sends snmp traps to nagios when a server drops from a pool (critical alert) and when a server joins the pool (OK)
My problem is these pools have a maintenance server that is a hot stand by, so when is gets removed from the pool, the check never recovers.
I need to manually update the check to OK status.  I want to have the check go to OK status after a few hours, probably 24 hours

Are you looking for server B to only check server A for 24 hours and then assume that it is OK? No

host a went down. host a recovered at 8 am, you now want server B to check host a only until 8 am the following morning? No

What happens during the 24 hours, does the host A being reflected as Ok or Not?  It is in a Critical state until I manually update it.  They are service checks on a host.
0
arnoldCommented:
Can you use dependencies?

You have a nagios server that is sent traps by a loadbalancer.
 
Does the maintenance server get added and then the actual server is removed/worked on. once the original is restored the maintenance is removed, but nagios is reflecting the absence of the maintenance server from the pool?

0
mw-hostingAuthor Commented:
I can use whatever will get this to work.

Yes, it basically goes like this

poolA: Critical  (serverA dropped from pool)
poolA: OK (maintenance server added to pool)
poolA: OK (serverA added to pool)
poolA: Critical (maintenance server dropped from pool)

Alert stays that way until I submit a passive check though nagios.
0
arnoldCommented:
Use dependency such that as long as serverA is in the pool maintenance server status is not important.
http://nagios.sourceforge.net/docs/3_0/dependencies.html

I'm not sure what information your configuration supposed to notify you of.
I can understand the event notifying you of an issue with serverA.
Who knocks maintenance server from the pool?
Does the loadbalancer kicks it out of the pool?
0
mw-hostingAuthor Commented:
The Load Balancer kicks it out of the pool, because it is a hot stand-by that gets triggered with the servers drop from the pool and gets dropped when a server returns to the pool.
0
arnoldCommented:
I think you can define a rule for the maintenance server that the status of the Maintenance server is of importance only when server A is out of the pool. If server A is in the pool, the status of the maintenance will be assumed as up/etc.
0
mw-hostingAuthor Commented:
I was able to get this working by adding the following to the checks

   check_command           check-host-alive
   check_interval          86400
   max_check_attempts      1


This keeps active checks enabled, and it will wait 24 hours after a critical alert before running the check_command, which here just pings the load balancer.  Thus, clearing the check.

Thanks for your help with this.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mw-hostingAuthor Commented:
I solved this one my own.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.