############################################################################### # TEMPLATES.CFG ############################################################################### ############################################################################### ############################################################################### # # CONTACT TEMPLATES # ############################################################################### ############################################################################### # Generic contact definition template - This is NOT a real contact, just a template! define contact { ; The name of this contact template name generic-contact ; service notifications can be sent anytime service_notification_period 24x7 ; host notifications can be sent anytime host_notification_period 24x7 ; send notifications for all service states, flapping events, and scheduled downtime events service_notification_options w,u,c,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events host_notification_options d,u,r,f,s ; send service notifications via email service_notification_commands notify-service-by-email ; send host notifications via email host_notification_commands notify-host-by-email ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE! register 0 } ############################################################################### ############################################################################### # # HOST TEMPLATES # ############################################################################### ############################################################################### # Generic host definition template - This is NOT a real host, just a template! define host { ; The name of this host template name generic-host ; Host notifications are enabled notifications_enabled 1 ; Host event handler is enabled event_handler_enabled 1 ; Flap detection is enabled flap_detection_enabled 1 ; Process performance data process_perf_data 1 ; Retain status information across program restarts retain_status_information 1 ; Retain non-status information across program restarts retain_nonstatus_information 1 ; Send host notifications at any time notification_period 24x7 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! register 0 } # Linux host definition template - This is NOT a real host, just a template! define host { ; The name of this host template name linux-server ; This template inherits other values from the generic-host template use generic-host ; By default, Linux hosts are checked round the clock check_period 24x7 ; Actively check the host every 5 minutes check_interval 5 ; Schedule host check retries at 1 minute intervals retry_interval 1 ; Check each Linux host 10 times (max) max_check_attempts 10 ; Default command to check Linux hosts check_command check-host-alive ; Linux admins hate to be woken up, so we only notify during the day ; Note that the notification_period variable is being overridden from ; the value that is inherited from the generic-host template! notification_period workhours ; Resend notifications every 2 hours notification_interval 120 ; Only send notifications for specific host states notification_options d,u,r ; Notifications get sent to the admins by default contact_groups admins ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! register 0 } # Windows host definition template - This is NOT a real host, just a template! define host { ; The name of this host template name windows-server ; Inherit default values from the generic-host template use generic-host ; By default, Windows servers are monitored round the clock check_period 24x7 ; Actively check the server every 5 minutes check_interval 5 ; Schedule host check retries at 1 minute intervals retry_interval 1 ; Check each server 10 times (max) max_check_attempts 10 ; Default command to check if servers are "alive" check_command check-host-alive ; Send notification out at any time - day or night notification_period 24x7 ; Resend notifications every 30 minutes notification_interval 30 ; Only send notifications for specific host states notification_options d,r ; Notifications get sent to the admins by default contact_groups admins ; Host groups that Windows servers should be a member of hostgroups windows-servers ; DONT REGISTER THIS - ITS JUST A TEMPLATE register 0 } # We define a generic printer template that can be used for most printers we monitor define host { ; The name of this host template name generic-printer ; Inherit default values from the generic-host template use generic-host ; By default, printers are monitored round the clock check_period 24x7 ; Actively check the printer every 5 minutes check_interval 5 ; Schedule host check retries at 1 minute intervals retry_interval 1 ; Check each printer 10 times (max) max_check_attempts 10 ; Default command to check if printers are "alive" check_command check-host-alive ; Printers are only used during the workday notification_period workhours ; Resend notifications every 30 minutes notification_interval 30 ; Only send notifications for specific host states notification_options d,r ; Notifications get sent to the admins by default contact_groups admins ; DONT REGISTER THIS - ITS JUST A TEMPLATE register 0 } # Define a template for switches that we can reuse define host { ; The name of this host template name generic-switch ; Inherit default values from the generic-host template use generic-host ; By default, switches are monitored round the clock check_period 24x7 ; Switches are checked every 5 minutes check_interval 5 ; Schedule host check retries at 1 minute intervals retry_interval 1 ; Check each switch 10 times (max) max_check_attempts 10 ; Default command to check if routers are "alive" check_command check-host-alive ; Send notifications at any time notification_period 24x7 ; Resend notifications every 30 minutes notification_interval 30 ; Only send notifications for specific host states notification_options d,r ; Notifications get sent to the admins by default contact_groups admins ; DONT REGISTER THIS - ITS JUST A TEMPLATE register 0 } ############################################################################### ############################################################################### # # SERVICE TEMPLATES # ############################################################################### ############################################################################### # Generic service definition template - This is NOT a real service, just a template! define service { ; The 'name' of this service template name generic-service ; Active service checks are enabled active_checks_enabled 1 ; Passive service checks are enabled/accepted passive_checks_enabled 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems) parallelize_check 1 ; We should obsess over this service (if necessary) obsess_over_service 1 ; Default is to NOT check service 'freshness' check_freshness 0 ; Service notifications are enabled notifications_enabled 1 ; Service event handler is enabled event_handler_enabled 1 ; Flap detection is enabled flap_detection_enabled 1 ; Process performance data process_perf_data 1 ; Retain status information across program restarts retain_status_information 1 ; Retain non-status information across program restarts retain_nonstatus_information 1 ; The service is not volatile is_volatile 0 ; The service can be checked at any time of the day check_period 24x7 ; Re-check the service up to 3 times in order to determine its final (hard) state max_check_attempts 3 ; Check the service every 10 minutes under normal conditions normal_check_interval 10 ; Re-check the service every two minutes until a hard state can be determined retry_check_interval 2 ; Notifications get sent out to everyone in the 'admins' group contact_groups admins ; Send notifications about warning, unknown, critical, and recovery events notification_options w,u,c,r ; Re-notify about service problems every hour notification_interval 60 ; Notifications can be sent out at any time notification_period 24x7 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! register 0 } # Local service definition template - This is NOT a real service, just a template! define service { ; The name of this service template name local-service ; Inherit default values from the generic-service definition use generic-service ; Re-check the service up to 4 times in order to determine its final (hard) state max_check_attempts 4 ; Check the service every 5 minutes under normal conditions normal_check_interval 5 ; Re-check the service every minute until a hard state can be determined retry_check_interval 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! register 0 } # vim:ts=4:sw=4:ft=nagios