resending UP HOST Notifications

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
[email protected]
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

resending UP HOST Notifications

Post by [email protected] »

HI

We have a multiple Nagios system behind a firewalls that only allows messages out that we would like to monitor with a central Nagios Master.

Our intent was to configure the Nagios servers behind the firewall to send NSCA messages back to a centralized Nagios Master using the
notification functionality indicating the health of the host that it monitors.

Since it is behind a fiew wall, we would like that server to send the notification at regular intervals, so we can use it in a Passive service detection on the Central Master.

The problem is that once in an OK state, the resend of the notifications stops.
If it is in a failed state, the notification are sent at the retry_interval.

We need to have the resend of the OK / UP Notification at the retry_interval to continue in an OK / UP state.

Is there a way to configure this behaviour ?

Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: resending UP HOST Notifications

Post by slansing »

So what you are asking is how to configure Nagios to send Ok/Up notifications at the retry_interval that is set for checking when a service enters a non Ok/Up state? So you will always receive notifications of the current state even if it is Ok/Up?
[email protected]
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

Re: resending UP HOST Notifications

Post by [email protected] »

Thanks for the reply .. and thanks for any help you can give me

Yes, but I think I should have said that they would be sent on the check_interval, not the retry_interval.

Notice in the following example that the CRITICAL is resent every 3 minutes where the OK is sent only once.

Jul 22 09:44:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 09:44:24, result is 2
Jul 22 09:47:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 09:47:24, result is 2
Jul 22 09:50:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 09:50:24, result is 2
Jul 22 09:53:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 09:53:24, result is 2
Jul 22 09:56:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 09:56:24, result is 2
Jul 22 09:59:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 09:59:24, result is 2
Jul 22 10:02:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;OK;notify-service-Master;nrpe ran this on 2013-07-22 10:02:24, result is 0
Jul 22 11:03:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 11:03:24, result is 2
Jul 22 11:06:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 11:06:24, result is 2
Jul 22 11:09:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 11:09:24, result is 2
Jul 22 11:12:28 my-fanag01 nagios: SERVICE NOTIFICATION: Master;my-fa-apu105;fa-apu105-updown;CRITICAL;notify-service-Master;nrpe ran this on 2013-07-22 11:12:24, result is 2
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: resending UP HOST Notifications

Post by slansing »

This may be possible, though I'm not quite sure what the reason would be, you would be overloaded with information. Nagios will notify you when a service goes into a warning/critical state, and once when it recovers.
[email protected]
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

Re: resending UP HOST Notifications

Post by [email protected] »

Thanks for the reply

Maybe a better question would be ..

How do we configure a Nagios system that has multiple sites behind multiple firewalls all reporting to a centralized NOC.

Lets take one site for example.
Assume we have Nagios Server(B) and hosts(1-9) on one side of the firewall and another Nagios server(NOC) that is not.
(B) is suppose to report (NOC) so we can activly monitor the host(1-9).

Currently we are looking to solve the issue of servers behind a firewall disappearing. They cannot be check-host-alive or PINGed.

firewall
NOC  | B  (1-9)

Our initial design is to have the Nagios system behind the firewall report to a Nagios server(NOC) that is not behind the firewall using the notification logic and the NSCA plugin.

B is configured as PASSIVE host and (NOC) relies on the PROCESS_HOST_CHECK_RESULT and PROCESS_SERVICE_CHECK_RESULT which are configured to be sent by the NOTIFIER when a state changes.

On the (NOC) the HOST check_interval, retry_interval and freshness_threshold are set to expect a HOST_CHECK_RESULT every 10 minutes.
The check_command is set to check_dummy!0 (effective setting it to a OK state if a HOST_CHECK_RESULT is not fresh) since OKs are not resent.

If B crashes, it would act just like is was OK, sending nothing as the OK notification has aready been sent.

Hope this makes some sense
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: resending UP HOST Notifications

Post by lmiltchev »

Can you post the host/services configs (hide the sensitive data)?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked