Disable ALL Nagios Notifications For One Hour, On One Day, Every Month

Jon Adcock AdcockJ at leoncountyfl.gov
Mon Feb 18 19:48:33 CET 2013


 
  To share, I did what Dan recommended.  Here is what I put my crontab:
 
00 06 15-21 * * test `date +\%a` = Sat && /opt/nagios/libexec/contrib/disable_notifications.sh
00 07 15-21 * * test `date +\%a` = Sat && /opt/nagios/libexec/contrib/enable_notifications.sh
  The third Sat falls on the fifteenth through the twenty-first.  So on those days, it runs a test command to see if it's Sat.  If so, then run the disable notifications script at 6, then run the enable_notifications script at 7.
 
  The scripts are from the link you listed, and:
http://old.nagios.org/developerinfo/externalcommands/commandinfo.php?command_id=8
  Note: my printf command is in /usr/bin/printf, so I had to modify the scripts.  Also, make sure that you have the path exactly correct for YOUR nagios.cmd file.

 


Jon Adcock
Network Systems Administrator
Leon County MIS
301 S. Monroe St.
Tallahassee, FL  32301
Office:  (850) 606-5518
http://www.leoncountyfl.gov
"People Focused.  Performance Driven."
 
 
Thank you for your e-mail.  Please note that under Florida's Public Records
laws, most written communications to or from county staff or officials 
regarding county business are public records available to the public and
media upon request.  Your e-mail communications may therefore be
subject to public disclosure.
 
>>> On 2/18/2013 at 12:32 PM, Daniel Wittenberg <daniel.wittenberg.r0ko at statefarm.com> wrote:

You can do it programmatically with cron through the external commands, a little cleaner approach:

http://old.nagios.org/developerinfo/externalcommands/commandinfo.php?command_id=7

Dan


On Feb 18, 2013, at 11:27 AM, Jon Adcock wrote:



 
  Within Nagios, is there some way to disable ALL Nagios notifications from 6:00 AM to 7:00 AM every 3rd Saturday of every month?
 
  I could run a cron job that replaced the nagios.cfg file with one that has enable_notifications=0 at 6:00 AM (and restart the service), then run another cron job that replaced the nagios.cfg file with the original file at 7:00 AM (and restart the service), but I'm looking for a solution within Nagios.
 
 
 


Jon Adcock

Network Systems Administrator
Leon County MIS
301 S. Monroe St.
Tallahassee, FL  32301
Office:  (850) 606-5518
http://www.leoncountyfl.gov
"People Focused.  Performance Driven."
 
 
Thank you for your e-mail.  Please note that under Florida's Public Records
laws, most written communications to or from county staff or officials 
regarding county business are public records available to the public and
media upon request.  Your e-mail communications may therefore be
subject to public disclosure.
 
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130218/c250a9fd/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list