services for hostgroups : disable notifications for hosts that are shutdown during the night ?

ghoulsblade ghoulsblade at schattenkind.net
Wed Jul 13 10:16:40 CEST 2011


hi all !

i have services linked to hostgroups like http/mail/linuxbasechecks/...
but some servers are shutdown over night, and others continue to run 24hours
i don't want to get notifications for the servers that are shutdown 
during the night.

do i really have to dublicate all services and make a 24h variant and a 
workhours only variant or is there a more elegant solution like

make service checks dependent on host up/down status
or use host-notification period as macro in service notification period

or what would be the best/normal/standard way to solve this ?

(nagios3 version 3.0.6-4~lenny2 on debian lenny)
example service :

define service{
     use                             generic-service         ; Name of 
service template to use
     hostgroup_name                    g_linux_base
     service_description             disk1
     check_command                    check_nrpe_1arg!check_disk1
}

example host with nightly shutdown

define host {
     use linux server
     host_name somehost
     alias some_descriptive_text
     address 11.4.121.215
     check_period workhours-not-nightoff
     notification_period workhours
     hostgroups all,g_svn,g_git,g_linux_base
}


regards,
ghoulsblade

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
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