14

I have a Nagios 3.5.1 monitor up for a bunch of servers. In doing an action like a Drupal or Wordpress core upgrade, I down the sites and set Nagios to scheduled outage.

Sometimes I finish in under the 2 hour default and don't want to ignore an outage. How do I tell Nagios that I'm done and to cancel the scheduled downtime?

enter image description here enter image description here

Rick
  • 299
  • 1
  • 4
  • 12

3 Answers3

21

In the left hand column of the Nagios interface (underneath "System") pick "Downtime". That takes you to a page listing all scheduled downtime and lets you delete them individually.

Paul Haldane
  • 4,517
  • 1
  • 21
  • 32
3

Along the left-hand side, under "System", there's a "Downtime" link; it goes to /cgi-bin/extinfo.cgi?type=6. Once there, click the trash can icon for the downtime in question.

Coincidentally, you may wish to investigate the difference between "scheduled" and "flexible" downtime, or better yet, given your use-case here, an "acknowledgement" sounds like what you really wanted in the first place.

BMDan
  • 7,249
  • 2
  • 23
  • 34
  • If you are keeping track of downtime, an acknowledgement will affect the reports differently than scheduled downtime, so since this really is scheduled downtime, that is the more appropriate action. – lsd Dec 02 '14 at 20:14
  • Fair point. Deleting a downtime, however, has a far larger effect on reports, no? – BMDan Dec 03 '14 at 20:39
  • The documentation implies that it only ends the downtime earlier than the originally scheduled end, but that the downtime still stays for reporting. "If the downtime is currently in effect, the service will come out of scheduled downtime". – lsd Dec 04 '14 at 14:05
  • Looking further, more documentation says that reporting doesn't count scheduled downtime unless you also disable checks. Well. – lsd Dec 04 '14 at 14:07
1

I have sucessfully deleted/canceled "downtime id" from 251 to 348 on my Centos server with this command:

for i in `seq 251 348`; do 
  /bin/printf "[%lu] DEL_SVC_DOWNTIME;$i\n" `date +%s` > /var/spool/nagios/cmd/nagios.cmd; 
done
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
  • The path to printF and nagios.cmd vary by system, this answer does show how to cancel MULTIPLE downtimes in a bulk manner not seen on the web ui. +1 – cde Feb 03 '20 at 21:49