define host { use generic-host host_name afnog alias African Network Operators Group address 196.216.2.34 parents apricot-gw } define host { use generic-host host_name apricot-gw alias Apricot GW router address 169.223.8.1 parents gateway } ############################################################################### # contacts.cfg ############################################################################### ############################################################################### ############################################################################### # # CONTACTS # ############################################################################### ############################################################################### # In this simple config file, a single contact will receive all alerts. define contact{ contact_name root alias Root service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r host_notification_options d,r service_notification_commands notify-by-email host_notification_commands host-notify-by-email email root@localhost } ############################################################################### ############################################################################### # # CONTACT GROUPS # ############################################################################### ############################################################################### # We only have one contact in this simple configuration file, so there is # no need to create more than one contact group. define contactgroup{ contactgroup_name admins alias Nagios Administrators members root } ## ## Extended Host and Service Information ## define hostextinfo { host_name apricot-gw 2d_coords 500,0 icon_image cook/router.png icon_image_alt Router vrml_image router.png statusmap_image cook/router.gd2 } define hostextinfo { host_name gateway 2d_coords 500,100 icon_image cook/network_switch.png icon_image_alt Network Switch vrml_image network_switch.png statusmap_image cook/network_switch.gd2 } define hostextinfo { host_name rtr1 2d_coords 200,300 icon_image cook/router.png icon_image_alt Router vrml_image Cisco2600.png statusmap_image cook/router.gd2 } define hostextinfo { host_name rtr2 2d_coords 300,300 icon_image cook/router.png icon_image_alt Router vrml_image router.png statusmap_image cook/router.gd2 } define hostextinfo { host_name rtr3 2d_coords 400,300 icon_image cook/router.png icon_image_alt Router vrml_image router.png statusmap_image cook/router.gd2 } define hostextinfo { host_name rtr4 2d_coords 500,300 icon_image cook/router.png icon_image_alt Router vrml_image router.png statusmap_image cook/router.gd2 } define hostextinfo { host_name switch1 2d_coords 250,400 icon_image cook/network_switch.png icon_image_alt Network Switch vrml_image network_switch.png statusmap_image cook/network_switch.gd2 } define hostextinfo { host_name switch2 2d_coords 450,400 icon_image cook/network_switch.png icon_image_alt Network Switch vrml_image network_switch.png statusmap_image cook/network_switch.gd2 } define hostextinfo { host_name sageduck 2d_coords 300,0 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name shell 2d_coords 350,0 icon_image base/redhat.png icon_image_alt Red Hat Enterprise Linux vrml_image redhat.png statusmap_image base/redhat.gd2 } define hostextinfo { host_name nsrc 2d_coords 250,0 icon_image base/redhat.png icon_image_alt Red Hat Enterprise Linux vrml_image redhat.png statusmap_image base/redhat.gd2 } define hostextinfo { host_name afnog 2d_coords 200,0 icon_image base/freebsd40.png icon_image_alt FreeBSD vrml_image freebsd40.png statusmap_image base/freebsd40.gd2 } define hostextinfo { host_name localhost 2d_coords 200,100 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc1 2d_coords 0,500 notes_url http://noc.mgmt.conference.apricot.net/trac/apricot/wiki/PC1 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc2 2d_coords 50,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc3 2d_coords 100,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc4 2d_coords 150,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc5 2d_coords 200,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc6 2d_coords 250,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc7 2d_coords 300,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc8 2d_coords 350,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc9 2d_coords 400,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc10 2d_coords 450,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc11 2d_coords 500,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc12 2d_coords 550,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc13 2d_coords 600,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc14 2d_coords 650,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } define hostextinfo { host_name pc15 2d_coords 700,500 icon_image base/ubuntu.png icon_image_alt Debian GNU/Linux vrml_image ubuntu.png statusmap_image base/ubuntu.gd2 } # Generic host definition template - This is NOT a real host, just a template! 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_period 24x7 notification_options d,u,r contact_groups admins register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! } # generic service template definition 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 admins register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } # a host definition for the gateway of the default route define host { host_name gateway alias Default Gateway address 169.223.2.1 use generic-host } # Some generic hostgroup definitions # A simple wildcard hostgroup # define hostgroup { # hostgroup_name all # alias All Servers # members * # } # A list of your Debian GNU/Linux servers define hostgroup { hostgroup_name debian-servers alias Debian GNU/Linux Servers members localhost } # A list of your web servers define hostgroup { hostgroup_name http-servers alias HTTP servers members localhost } # A list of your ssh-accessible servers define hostgroup { hostgroup_name ssh-servers alias SSH servers members localhost } # nagios doesn't like monitoring hosts without services, so this is # a group for devices that have no other "services" monitorable # (like routers w/out snmp for example) define hostgroup { hostgroup_name ping-servers alias Pingable servers members gateway } # hostgroup definition for APRICOT 2008 Network Management Workshop define hostgroup { hostgroup_name apricot-pcs alias Apricot PCs running Debian GNU/Linux members pc1,pc2,pc3,pc4,pc5,pc6,pc7,pc8,pc9,pc10,pc11,pc12,pc13,pc14,pc15 } # hostgroup definition for APRICOT 2008 Network Management Workshop define hostgroup { hostgroup_name cisco-routers alias Cisco 2800 Routers at APRICOT 2008 members rtr1,rtr2,rtr3,rtr4,apricot-gw } # hostgroup definition for APRICOT 2008 Network Management Workshop define hostgroup { hostgroup_name switches alias Cisco Switches at APRICOT 2008 members gateway,switch1,switch2 } # hostgroup definition for APRICOT 2008 Network Management Workshop define hostgroup { hostgroup_name internet-srv alias Internet servers members sageduck,shell,afnog } # A simple configuration file for monitoring the local host # This can serve as an example for configuring other servers; # Custom services specific to this host are added here, but services # defined in nagios2-common_services.cfg may also apply. # define host{ use generic-host ; Name of host template to use host_name localhost alias localhost address 127.0.0.1 } # Define a service to check the disk space of the root partition # on the local machine. Warning if < 20% free, critical if # < 10% free space on partition. define service{ use generic-service ; Name of service template to use host_name localhost service_description Disk Space check_command check_all_disks!20%!10% } # Define a service to check the number of currently logged in # users on the local machine. Warning if > 20 users, critical # if > 50 users. define service{ use generic-service ; Name of service template to use host_name localhost service_description Current Users check_command check_users!20!50 } # Define a service to check the number of currently running procs # on the local machine. Warning if > 250 processes, critical if # > 400 users. define service{ use generic-service ; Name of service template to use host_name localhost service_description Total Processes check_command check_procs!250!400 } # Define a service to check the load on the local machine. define service{ use generic-service ; Name of service template to use host_name localhost service_description Current Load check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0 } define host { use generic-host host_name nsrc alias Network Startup Resource Center address 128.223.162.29 parents apricot-gw } define host { use generic-host host_name pc10 alias PC 10 at Apricot address 169.223.2.195 parents switch2 } define host { use generic-host host_name pc11 alias PC 11 at Apricot address 169.223.2.196 parents switch2 } define host { use generic-host host_name pc12 alias PC 12 at Apricot address 169.223.2.197 parents switch2 } define host { use generic-host host_name pc13 alias PC 13 at Apricot address 169.223.2.226 parents switch2 } define host { use generic-host host_name pc14 alias PC 14 at Apricot address 169.223.2.227 parents switch2 } define host { use generic-host host_name pc15 alias PC 15 at Apricot address 169.223.2.228 parents switch2 } define host { use generic-host host_name pc1 alias PC 1 at Apricot address 169.223.2.130 parents switch1 } define host { use generic-host host_name pc2 alias PC 2 at Apricot address 169.223.2.131 parents switch1 } define host { use generic-host host_name pc3 alias PC 3 at Apricot address 169.223.2.132 parents switch1 } define host { use generic-host host_name pc4 alias PC 4 at Apricot address 169.223.2.133 parents switch1 } define host { use generic-host host_name pc5 alias PC 5 at Apricot address 169.223.2.162 parents switch1 } define host { use generic-host host_name pc6 alias PC 6 at Apricot address 169.223.2.163 parents switch1 } define host { use generic-host host_name pc7 alias PC 7 at Apricot address 169.223.2.164 parents switch1 } define host { use generic-host host_name pc8 alias PC 8 at Apricot address 169.223.2.165 parents switch1 } define host { use generic-host host_name pc9 alias PC 9 at Apricot address 169.223.2.194 parents switch2 } define host { use generic-host host_name rtr1 alias router 1 on backbone address 169.223.2.51 } define host { use generic-host host_name rtr2 alias router 2 on backbone address 169.223.2.52 } define host { use generic-host host_name rtr3 alias router 3 on backbone address 169.223.2.53 } define host { use generic-host host_name rtr4 alias router 4 on backbone address 169.223.2.54 } define host { use generic-host host_name sageduck alias SageDuck.ORG address 201.215.224.47 parents apricot-gw } # check that web services are running define service { hostgroup_name http-servers,apricot-pcs,internet-srv service_description HTTP check_command check_http use generic-service notification_interval 0 ; set > 0 if you want to be renotified } # check that ssh services are running define service { hostgroup_name ssh-servers, apricot-pcs, cisco-routers, internet-srv service_description SSH check_command check_ssh use generic-service notification_interval 0 ; set > 0 if you want to be renotified } # check that telnet is responding define service { hostgroup_name switches service_description Telnet check_command check_telnet use generic-service notification_interval 0 ; set > 0 if you want to be renotified } # check that ping-only hosts are up define service { hostgroup_name ping-servers service_description PING check_command check_ping!100.0,20%!500.0,60% use generic-service notification_interval 0 ; set > 0 if you want to be renotified } define host { use generic-host host_name shell alias U of O main user box: shell.uoregon.edu address 128.223.142.32 parents apricot-gw } define host { use generic-host host_name switch1 alias switch 1 APRICOT 2008 address 169.223.2.158 parents rtr1,rtr2 } define host { use generic-host host_name switch2 alias switch 2 APRICOT 2008 address 169.223.2.222 parents rtr3,rtr4 } ############################################################################### # timeperiods.cfg ############################################################################### # This defines a timeperiod where all times are valid for checks, # notifications, etc. The classic "24x7" support nightmare. :-) define timeperiod{ timeperiod_name 24x7 alias 24 Hours A Day, 7 Days A Week 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 } # Here is a slightly friendlier period during work hours define timeperiod{ timeperiod_name workhours alias Standard Work Hours monday 09:00-17:00 tuesday 09:00-17:00 wednesday 09:00-17:00 thursday 09:00-17:00 friday 09:00-17:00 } # The complement of workhours define timeperiod{ timeperiod_name nonworkhours alias Non-Work Hours sunday 00:00-24:00 monday 00:00-09:00,17:00-24:00 tuesday 00:00-09:00,17:00-24:00 wednesday 00:00-09:00,17:00-24:00 thursday 00:00-09:00,17:00-24:00 friday 00:00-09:00,17:00-24:00 saturday 00:00-24:00 } # This one is a favorite: never :) define timeperiod{ timeperiod_name never alias Never } # end of file define host { use generic-host host_name wrc alias ws.edu.isoc.org address 128.223.162.19 parents apricot-gw }