[Nagios-users] re-enable all notifications on hosts services

2010-12-27 Thread Mark A. Lappin
We have a notifications on services which were disabled via the web interface 
for hosts and all services on hosts.  Dozens it seems.  Is there an easy way to 
turn all notifications back on for all services and all hosts in one fell 
swoop?  We had a lot of htem turned off while we were tweaking commands and 
configuration and I'm ready to have them all back on

ML




Mark A. Lappin, CCNA, MCITP: Enterprise Administrator | Lee Michaels Fine 
Jewelry
Director of Information Technology
11314 Cloverland Ave | Baton Rouge, LA 70809

Ph: 225.291.9094 ext 245 | Fax: 225.368.3675  | Mobile: 225-362-2770
www.lmfj.com http://www.lmfj.com/

[http://www.lmfj.com/images/lmfjsig.gif]


This communication is privileged and confidential.  If you are not the intended 
recipient, please notify the sender by reply e-mail and destroy all copies of 
this communication .
--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] re-enable all notifications on hosts services

2010-12-27 Thread Chris Beattie
Mark A. Lappin wrote:
 interface for hosts and all services on hosts.  Dozens it seems.  Is 
 there an easy way to turn all notifications back on for all services and 
 all hosts in one fell swoop?  We had a lot of htem turned off while we 

You can use Nagios' external commands to do that.

http://old.nagios.org/developerinfo/externalcommands/commandlist.php

If I didn't have to be too careful, I'd do something like this 
(apologies for the line wrapping):

#!/bin/sh

now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
statusfile='/usr/local/nagios/var/status.dat'

for i in `grep host_name $statusfile | sort --unique | sed 
s/\thost_name=//`
do
/bin/printf [%lu] ENABLE_HOST_NOTIFICATIONS;$i\n $now  $commandfile
/bin/printf [%lu] ENABLE_HOST_SVC_NOTIFICATIONS;$i\n $now  
$commandfile
done

Nothing in this message is intended to make or accept an offer or to form a 
contract, except that an attachment that is an image of a contract bearing the 
signature of an officer of our company may be or become a contract. This 
message (including any attachments) is intended only for the use of the 
individual or entity to whom it is addressed. It may contain information that 
is non-public, proprietary, privileged, confidential, and exempt from 
disclosure under applicable law or may constitute as attorney work product. If 
you are not the intended recipient, we hereby notify you that any use, 
dissemination, distribution, or copying of this message is strictly prohibited. 
If you have received this message in error, please notify us immediately by 
telephone and delete this message immediately.

Thank you.


--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Nagios-users mailing list
Nagios-users@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