[Nagiosplug-help] FW: Temporal disabling of checks and notifications for a bulk of hosts and services

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Fri Jul 13 08:22:58 CEST 2007


Hello Nagiosplug BoFs,

I apologize for reposting this to the obviously inappropiate
mailing list
since my topic is more a basic Nagios configuration issue than
related to any specific plugin.

But I never seem to get any feedback to my postings to the
Nagios-Users list,
apart from a dozen automatically generated out-of-office
notifications,
whereas this list's subscribers seem far more responsive.

I want to disable a couple of hundred of service checks and
notifications on their critical states
for a bulk of hosts which owe to an enforced relocation of my
main Nagios server have become unqueriable 
for the sake of filtered communication ports (see my original
posting below).
At the same time I wish to keep half of the services active for
those hosts whose reachability
hasn't been impaired by the relocation.
Because I wish to keep the reconfiguration effort to a minimum,
as I hope this relocation is only an
ephemeral state, I only disabled both active and passive checks
as well as notifications for the "lost" hosts
by introducing a couple of host definition templates while
sticking with the original config for the whole rest.

For the time being I globally disabled notifications to watch
ramifications of various config changes.

This way I could observe that although about half of the hosts
are disabled 
(as intended, and indicated in the Nagios web interface by red
crosses and a crossed loudspeaker icon),
the service checks attached to these hosts where diligently
performed by Nagios.
This appears a little daft to me.
Why should I want services checked for hosts that I deliberately
disabled?

I want to save me from also disabling hundreds of services for
only half the hosts.
This would end up in an entire reconfiguration.
I am convinced that there must be a more sanity protecting way
achieving this.


Regards

Ralph




-----Original Message-----
From: Grothe, Ralph 
Sent: Thursday, July 12, 2007 3:55 PM
To: Nagios-Users (E-Mail)
Subject: Temporal disabling of checks and notifications for a
bulk of
hosts and services


Dear Nagios Users,

I was forced to relocate my main Nagios server temporarily.

The negative effect of this was, because the server now resides
in a totally different lan segment,
not only that I had to change the whole parent relations of hosts
to cater for the changed routing.
Even worse, was that the Nagios server no longer can access about
half its monitored hosts and services 
via ports 22 and 5666 tcp.

If the firewalls at least had left me with open port 22 I could
have changed all my nrpe checks
to something like 

check_by_ssh!login!rsa_key!/remote/path/to/check_nrpe -H
127.0.0.1 -c check_as_usual

I thought about tunneling the lost remote 22 ports by e.g. ssh
local port forwarding via the host
that previously hosted my Nagios server.
But this all seems too contrived and error prone to me.

So I thought about disabling active and passive checks as well as
notifications by
providing a template that would have active_checks_enabled, and
notifications_enabled set to 0
and which now will be use-d by all the hosts that are affected.

This should reduce the required config changes to a minimum.

I now wonder, before I set the global notifications_enabled in my
nagios.cfg to 1,
if it would suffice to disable the dozens of *_hosts.cfg files (I
separeted my config by cfg_dir) merely
in the manner I described, to also make Nagios skip running any
checks for the services of these hosts?

So, has a disabled host automatically also disabled all its
service checks, and hence notifications?


Regards

Ralph





More information about the Help mailing list