Nagios Notifications

Holikar, Sachin (ext) sachin.holikar.ext at siemens.com
Fri Nov 7 14:56:33 CET 2008


Thanks it seems to be working. Never found any example of this sort. 
Thanks once again.
 
 
- Sac

________________________________

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


please post back to the nagios userlist, rather than me.
 
i have this for a period similar to what you want;
 
define timeperiod{
     timeperiod_name harris_reboot
     alias harris nightly reboot, skipping 2000 - 2200
     sunday 00:00-20:00,22:00-24:00
     monday 00:00-20:00,22:00-24:00
     tuesday 00:00-20:00,22:00-24:00
     wednesday 00:00-20:00,22:00-24:00
     thursday 00:00-20:00,22:00-24:00
     friday 00:00-20:00,22:00-24:00
     saturday 00:00-20:00,22:00-24:00
}


 
________________________________

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


That is what I was execting initially. I wrote "I have seen the
timeperiod options but the examples only show the provision for holidays
or so. Can we bypass lets say few hrs in between everyday??"
If yes then how?
 
I tried writing below templates but I'm sure its not perfect ..
 
Intend to bypass 1 hr (from 6 AM to 7 AM)  eeryday, I wrote 2 templates
below, (System Name is Host12)
 
define timeperiod{
        name            special
        timeperiod_name special
        alias           special
        sunday          00:06-00:07
        monday          00:06-00:07
        tuesday         00:06-00:07
        wednesday       00:06-00:07
        thursday        00:06-00:07
        friday          00:06-00:07
        saturday        00:06-00:07
                }
 

define timeperiod{
        name            Host12_special
        timeperiod_name Host12_special
        use             special
        alias           Host12_special
        sunday          00:00-24:00
        monday          00:00-24:00
        tuesday         00:00-24:00
        wednesday       00:00-24:00
        thursday        00:00-24:00
        friday          00:00-24:00
        saturday        00:00-24:00
}
 
 
 
 

________________________________

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

 
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.


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/cc93e56e/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