Link to home
Start Free TrialLog in
Avatar of mw-hosting
mw-hostingFlag for Afghanistan

asked on

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?
Avatar of arnold
arnold
Flag of United States of America image

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?
Avatar of mw-hosting

ASKER

It is a set of service checks that I would want to set to OK status after 24 hours.
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?
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.
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?

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.
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?
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.
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.
ASKER CERTIFIED SOLUTION
Avatar of mw-hosting
mw-hosting
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I solved this one my own.