Re: [Nagios-devel] [PATCH] 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
Guest

Re: [Nagios-devel] [PATCH] notifications:

Post by Guest »

On 11.12.2012 22:56, Jim Avery wrote:
> We want to send an SMS notification if the UPS goes on to battery, but =
only
> if it has been on battery for more than, say, five minutes. I had hope=
d
> that first_notification_delay would give me that possibility. Obviousl=
y as
> this is a passive check [...]
>=20
> Please forgive me that I don't understand the programmatical issues wel=
l
> enough to see if any of the proposed solutions so far will fit this use
> case.

I'ld say that our discussion is perpendicular to the issue you raise -
or, in other words, that first_notification_delay is unlikely to
suddenly work the way you want afterwards.

You see, while everyone just calls it "passive checks", the terminology
in the web UI - "active checks disabled" - is more correct. (Yes, a
service *could* have active *and* passive check results going into it.
I've just never seen a working setup doing that, or a use case seriously
asking for it.) Using "passive checks" means that Nagios can forget
about scheduling commands for that service, ever; waiting for events and
reacting to them is all that's required.

Asking that Nagios now *should* schedule a notification being sent
first_notification_delay after receiving a non-OK passive result sort of
negates the entire concept.

What I'ld try in your place is to write the (last) trap into a cache
file, and then run an *active* check looking for the reported state *and
timestamp*, possibly differentiating WARNING/CRITICAL based on the latter=
.

(Note to others: Actively checking the UPS' *current* state directly
could yield false positives *if* the UPS / power keeps flapping and the
active checks just *happen* to see only the on-battery state for a
couple times in a row.)

Regards,
J. Bern
--=20
*NEU* - NEC IT-Infrastruktur-Produkte im :
Server--Storage--Virtualisierung--Management SW--Passion for Performance
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: Jochen.Bern@LINworks.de
Locked