Nagios Notifications

Sotiroff, Kristian Sotiroff.Kristian at mtvne.com
Fri Nov 7 12:26:57 CET 2008


________________________________

From: Holikar, Sachin (ext) [mailto:sachin.holikar.ext at siemens.com] 
Sent: 07 November 2008 11:20
To: Sotiroff, Kristian
Subject: RE: [Nagios-users] Nagios Notifications


Unfortunately we did not find any sample scripts under eventhandler
directory. The directory specified in resource.cfg itself does not
exist.
Can you suggest ?

 <... snip....> 
 
 
 have you installed the plugins? it comes with that i think. the scripts
are pretty basic though. 
 
here is the 'disable_active_service_checks script:
 
#!/bin/sh
 
# Write a command to the Nagios command file to cause
# it to disable active service checks.  This can be
# referred to as 'standby' mode in a redundant monitoring
# environment.
 
# Notes:
# 1) This script is not intended to be used as an
#    event handler by itself.  Instead, it is used by other
#    event handler scripts (like the redundancy examples).
# 2) In order for Nagios to process any commands that
#    are written to the command file, you must enable
#    the check_external_commands option in the main
#    configuration file.
 
echocmd="/bin/echo"
 
CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
 
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
 
# create the command line to add to the command file
cmdline="[$datetime] STOP_EXECUTING_SERVICE_CHECKS"
 
# append the command to the end of the command file
`$echocmd $cmdline >> $CommandFile`
 
 
in order to reenable them, simply change the
STOP_EXECUTING_SERVICE_CHECKS to START_EXECUTING_SERVICE_CHECKS




CONFIDENTIALITY NOTICE

This e-mail (and any attached files) is confidential and protected by 
copyright (and other intellectual property rights). If you are not the 
intended recipient please e-mail the sender and then delete the email and 
any attached files immediately. Any further use or dissemination is 
prohibited.

While MTV Networks Europe has taken steps to ensure that this email and 
any attachments are virus free, it is your responsibility to ensure that 
this message and any attachments are virus free and do not affect your 
systems / data.

Communicating by email is not 100% secure and carries risks such as delay, 
data corruption, non-delivery, wrongful interception and unauthorised 
amendment. If you communicate with us by e-mail, you acknowledge and 
assume these risks, and you agree to take appropriate measures to minimise 
these risks when e-mailing us. 

MTV Networks International, MTV Networks UK & Ireland, Greenhouse, 
Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions 
International and Comedy Central are all trading names of MTV Networks 
Europe.  MTV Networks Europe is a partnership between MTV Networks Europe 
Inc. and Viacom Networks Europe Inc.  Address for service in Great Britain 
is UK House, 180 Oxford Street, London W1D 1DS, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20081107/87e12ed4/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- 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