1

Thank you, serverfault, for giving me the answer to how-does-an-administrator-generalize-alerting-when-an-event-doesnt-happen.

Now, I only want to check the freshness of these passive services Monday through Friday.

There are some subtleties:

  • The status should be allowed to improve over the weekend.
  • The status should never degrade over the weekend.
  • Notifications should still be emitted over the weekend.

Best I can come up with is YACS - Yet Another Cron Script (to shave). But even then, wouldn't the service definitions need to be toggled every week? Is this service definition dynamism often done with Nagios?

Dan Garthwaite
  • 2,922
  • 18
  • 29

1 Answers1

2

You can use time periods in Nagios :

If you want different behaviours between Week days and Week-end, i cannot see another way to do it without duplicate the service check :

  • Configure your first service check with a time period from Monday to Friday, and with the required behaviour for this period.

  • Then, configure the duplicated service check with a time period from Saturday to Sunday, and with the required behaviour for this period.

I don't like the duplicate service idea, but i am not aware about other ways to do it...that is actually the way i proceed myself in my Nagios config...

krisFR
  • 12,830
  • 3
  • 31
  • 40
  • The depth of nagios never seems to end. However, the docs state that "On-demand checks and passive checks are not restricted by the timeperiod you specify in the check_period directive. Only regularly scheduled active checks are restricted." – Dan Garthwaite Jan 12 '14 at 18:41
  • Defining duplicate checks... that would work or active checks. Very nice. – Dan Garthwaite Jan 12 '14 at 18:43
  • Actually I found this in the icinga docs: "The check_period option in your host and service definitions is used when Icinga determines when a host or service can be checked for freshness, so make sure it is set to a valid timeperiod." – Dan Garthwaite Jan 12 '14 at 18:44
  • You also might be able to do this with an escalation that's only valid during certain timeperiods – Keith Jan 12 '14 at 22:24