Confusion over timeperiods
Grant Sewell
nagios at thymox.co.uk
Wed Sep 16 10:48:19 CEST 2009
On Fri, 11 Sep 2009 10:04:08 +0100
Grant Sewell wrote:
> Hi all,
>
> It may purely be me being thick, but I'm really struggling to get my
> Nagios setup (3.0.6 on Debian Lenny) to use timeperiods the way I want
> it to.
>
> We have a server running Plesk and "Plesk Total Backup". For this to
> work it seems to take all the services down - http, https, imap, &
> pop3 are the only ones I'm interested in however.
>
> We have a number of servers running the same services but this is the
> only one where the services are stopped like this. I realise the
> issue is with the fact that the various services are listed with
> notification timeperiods of 24x7, but how do I single out the
> services on a single server? Would I need to create a new service
> entry for the above 4 services for this specific server?
>
> I have the following in my Nagios setup:
>
> define timeperiod{
> timeperiod_name exceptpsabackup
> alias psabackup
> monday 00:00-01:00,04:00-23:59
> tuesday 00:00-01:00,04:00-23:59
> wednesday 00:00-01:00,04:00-23:59
> thursday 00:00-01:00,04:00-23:59
> friday 00:00-01:00,04:00-23:59
> saturday 00:00-01:00,04:00-23:59
> sunday 00:00-01:00,04:00-23:59
> }
>
> define host{
> use generic-host
> host_name MyServerName
> alias MyServerAlias
> address 12.34.56.78
> contact_groups Tech
> check_period exceptpsabackup
> notification_period exceptpsabackup
> }
>
> define host{
> name generic-host ; The name of
> this host template notifications_enabled 1 ;
> Host notifications are enabled event_handler_enabled
> 1 ; Host event handler is enabled
> flap_detection_enabled 1 ; Flap detection is
> enabled failure_prediction_enabled 1 ; Failure
> prediction is enabled process_perf_data
> 1 ; Process performance data
> retain_status_information 1 ; Retain status
> information across program restarts retain_nonstatus_information
> 1 ; Retain non-status information across program
> restarts check_command check-host-alive
> max_check_attempts 10 notification_interval 0
> notification_options d,r,f,s
> register 0 ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! }
>
> define service {
> host_name MyServerName
> service_description HTTP
> check_command check_http
> use generic-service
> notification_interval 0 ; set > 0 if you want to be
> renotified }
>
> define service{
> name generic-service ; The 'name'
> of this service template active_checks_enabled 1 ;
> Active service checks are enabled passive_checks_enabled
> 1 ; Passive service checks are enabled/accepted
> parallelize_check 1 ; Active service checks
> should be parallelized (disabling this can lead to major performance
> problems) obsess_over_service 1 ; We should obsess
> over this service (if necessary) check_freshness
> 0 ; Default is to NOT check service 'freshness'
> notifications_enabled 1 ; Service notifications are
> enabled event_handler_enabled 1 ; Service event
> handler is enabled flap_detection_enabled 1 ; Flap
> detection is enabled failure_prediction_enabled 1 ;
> Failure prediction is enabled process_perf_data
> 1 ; Process performance data retain_status_information
> 1 ; Retain status information across program restarts
> retain_nonstatus_information 1 ; Retain non-status
> information across program restarts notification_interval
> 0 ; Only send notifications on status change by
> default. is_volatile 0
> check_period 24x7 normal_check_interval
> 5 retry_check_interval 1 max_check_attempts 4
> notification_period 24x7 notification_options
> w,u,c,r contact_groups Tech
> register 0 ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! }
>
> Cheers.
> Grant.
Am I to presume that I am correct in my assumption that I would need to
create a new service entry for the above 4 services for this specific
server?
Grant.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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