Mass Acknowledgement from Command Line

Aaron Segura Aaron.Segura at cabelas.com
Thu Nov 16 22:55:12 CET 2006


I know a few people have asked about this in the past, so here goes...

 

http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1[
p_view]=793
<http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1
%5Bp_view%5D=793>  

This PHP script will allow you to perform mass-acknowledgements of
nagios problems from the command line. Both the 'host' and 'service'
parameters are treated as perl regular expressions, so you can do things
like: 

# nagios_ack webprod httpd "I shot all of the httpd processes with
psDOOM by accident"

To acknowledge alarms for any services matching 'httpd' (eg,
httpd_response_time, httpd_process, etc...) on any hosts matching
'webprod' (eg, webprod01, webprod02, test-webprod01, etc...) with the
admission that you often like to admin your system using WASD.

You may also use the keyword 'all' in place of either parameter... 

# nagios_ack all "Power Outage in Texas" 

To acknowledge ALL current host and service problems. 

# nagios_ack webprod all "Power Outage in Web Server Rack" 

To acknowledge ALL services in alarm on any host matching 'webprod'. 



The script uses the status.log (or status.dat) and nagios.cmd files.
You will need to edit the top of the script to let it know where you
keep yours.    I use Groundworks/nagios so the current paths are
customized for that purpose.

 

See the README for config/cmdline information.


Enjoy!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20061116/fcbffa15/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- 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