Nagios Notifications

Sotiroff, Kristian Sotiroff.Kristian at mtvne.com
Fri Nov 7 12:51:06 CET 2008


sounds like you're not that familiar with shell scripts.
 
in which case, its probably easier if you simply create a timeperiod in
whcih you leave out the required hours, then have your service checks
and / or notifications occurring during this time. 
 
 
________________________________

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


Thanks for the reply.
 Are you saying that if I simply copy paste the below code in a file
called 'disable_active_service_checks' under eventhandlers directory ,
that should work??
And how do you actually  change the STOP_EXECUTING_SERVICE_CHECKS to
START_EXECUTING_SERVICE_CHECKS
 
Little confused , bare with me.

________________________________

From: Sotiroff, Kristian [mailto:Sotiroff.Kristian at mtvne.com] 
Sent: Freitag, 7. November 2008 12:27
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Nagios Notifications


________________________________

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.



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/0c682866/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