|
From: Ethan G. <ega...@us...> - 2007-02-28 19:16:04
|
Update of /cvsroot/nagios/nagios/sample-config/template-object In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11394/sample-config/template-object Modified Files: commands.cfg.in localhost.cfg.in Added Files: printer.cfg.in Log Message: Doc updates, sample config files, misc other stuff Index: commands.cfg.in =================================================================== RCS file: /cvsroot/nagios/nagios/sample-config/template-object/commands.cfg.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** commands.cfg.in 27 Feb 2007 15:07:12 -0000 1.3 --- commands.cfg.in 28 Feb 2007 19:15:53 -0000 1.4 *************** *** 124,128 **** define command{ command_name check_hpjd ! command_line $USER1$/check_hpjd -H $HOSTADDRESS$ -C public } --- 124,128 ---- define command{ command_name check_hpjd ! command_line $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$ } --- NEW FILE: printer.cfg.in --- ############################################################################### # PRINTER.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING A NETWORK PRINTER # # Last Modified: 02-28-2007 # # NOTE: This config file assumes that you are using the sample configuration # files that get installed with the Nagios quickstart guide: # commands.cfg # localhost.cfg # ############################################################################### # We define a generic printer template that can be used for most printers we monitor define host{ name generic-printer ; The name of this host template use generic-host ; Inherit default values from the generic-host template check_period 24x7 ; By default, printers are monitored round the clock check_interval 5 ; Actively check the printer every 5 minutes retry_interval 1 ; Schedule host check retries at 1 minute intervals max_check_attempts 10 ; Check each printer 10 times (max) check_command check-host-alive ; Default command to check if printers are "alive" notification_period workhours ; Printers are only used during the workday notification_interval 30 ; Resend notifications every 30 minutes notification_options d,r ; Only send notifications for specific host states contact_groups admins ; Notifications get sent to the admins by default register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE } # Define a host for the printer we'll be monitoring # Change the host_name, alias, and address to fit your situation define host{ use generic-printer ; Inherit default values from a template host_name hplj2605dn ; The name we're giving to this printer alias HP LaserJet 2605dn ; A longer name associated with the printer address 192.168.1.30 ; IP address of the printer hostgroups allhosts ; Host groups this printer is associated with } # Define an optional hostgroup for printers # Change the members directive to match the name of the host you define above define hostgroup{ hostgroup_name laserjet-printers ; The name of the hostgroup alias HP LaserJet Printers ; Long name of the group members hplj2605dn ; Comma separated list of hosts that belong to this group } # Create a service for monitoring the status of the printer # Change the host_name to match the name of the host you defined above # If the printer has an SNMP community string other than "public", change the check_command directive to reflect that define service{ use generic-service ; Inherit values from a template host_name hplj2605dn ; The name of the host the service is associated with service_description Printer Status ; The service description check_command check_hpjd!-C public ; The command used to monitor the service normal_check_interval 10 ; Check the service every 10 minutes under normal conditions retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined } Index: localhost.cfg.in =================================================================== RCS file: /cvsroot/nagios/nagios/sample-config/template-object/localhost.cfg.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** localhost.cfg.in 27 Feb 2007 15:07:12 -0000 1.6 --- localhost.cfg.in 28 Feb 2007 19:15:53 -0000 1.7 *************** *** 191,196 **** define hostgroup{ ! hostgroup_name allservers ! alias All Servers members localhost } --- 191,196 ---- define hostgroup{ ! hostgroup_name allhosts ! alias All Hosts members localhost } *************** *** 223,227 **** retain_nonstatus_information 1 ; Retain non-status information across program restarts is_volatile 0 ; The service is not volatile ! register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } --- 223,235 ---- retain_nonstatus_information 1 ; Retain non-status information across program restarts is_volatile 0 ; The service is not volatile ! check_period 24x7 ; The service can be checked at any time of the day ! max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state ! normal_check_interval 10 ; Check the service every 10 minutes under normal conditions ! retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined ! contact_groups admins ; Notifications get sent out to everyone in the 'admins' group ! notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events ! notification_interval 60 ; Re-notify about service problems every hour ! notification_period 24x7 ; Notifications can be sent out at any time ! register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } *************** *** 232,243 **** name local-service ; The name of this service template use generic-service ; Inherit default values from the generic-service definition - check_period 24x7 ; The service can be checked at any time of the day max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state normal_check_interval 5 ; Check the service every 5 minutes under normal conditions retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined - contact_groups admins ; Notifications get sent out to everyone in the 'admins' group - notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events - notification_interval 60 ; Re-notify about service problems every hour - notification_period 24x7 ; Notifications can be sent out at any time register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } --- 240,246 ---- *************** *** 339,352 **** } - - # Define a service to check DHCP server availability. - # Disable notifications for this service by default, as not all users may be using DHCP - - define service{ - use local-service ; Name of service template to use - host_name localhost - service_description DHCP - check_command check_dhcp - notifications_enabled 0 - } - --- 342,343 ---- |