Репозитории ALT
S: | 3.0.6-alt16 |
5.1: | 3.0.6-alt1 |
4.1: | 3.0.3-alt1.M41.1 |
4.0: | 2.7-alt1 |
3.0: | 2.0-alt0.b3.1 |
Группа :: Мониторинг
Пакет: nagios
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: nagios-3.0.6-alt-config.patch
Скачать
Скачать
--- nagios-3.0.6/sample-config/cgi.cfg.in.p4 2008-12-01 04:13:11 +1000
+++ nagios-3.0.6/sample-config/cgi.cfg.in 2009-01-12 10:18:33 +1000
@@ -12,7 +12,7 @@
# The CGIs will read the main and host config files for any other
# data they might need.
-main_config_file=@sysconfdir@/nagios.cfg
+main_config_file=@sysconfdir@/nagios/nagios.cfg
@@ -21,7 +21,7 @@ main_config_file=@sysconfdir@/nagios.cfg
# value is used to locate the logo images needed by the statusmap
# and statuswrl CGIs.
-physical_html_path=@datadir@
+physical_html_path=@datadir@/nagios/html
@@ -43,7 +43,7 @@ url_html_path=@htmurl@
# Values: 0 = disables context-sensitive help
# 1 = enables context-sensitive help
-show_context_help=0
+show_context_help=1
@@ -116,7 +116,7 @@ use_ssl_authentication=0
# not use authorization. You may use an asterisk (*) to
# authorize any user who has authenticated to the web server.
-authorized_for_system_information=nagiosadmin
+authorized_for_system_information=nagios
@@ -128,7 +128,7 @@ authorized_for_system_information=nagios
# an asterisk (*) to authorize any user who has authenticated
# to the web server.
-authorized_for_configuration_information=nagiosadmin
+authorized_for_configuration_information=nagios
@@ -141,7 +141,7 @@ authorized_for_configuration_information
# You may use an asterisk (*) to authorize any user who has
# authenticated to the web server.
-authorized_for_system_commands=nagiosadmin
+authorized_for_system_commands=nagios
@@ -154,8 +154,8 @@ authorized_for_system_commands=nagiosadm
# to authorize any user who has authenticated to the web server.
-authorized_for_all_services=nagiosadmin
-authorized_for_all_hosts=nagiosadmin
+authorized_for_all_services=nagios
+authorized_for_all_hosts=nagios
@@ -168,8 +168,8 @@ authorized_for_all_hosts=nagiosadmin
# authorization). You may use an asterisk (*) to authorize any
# user who has authenticated to the web server.
-authorized_for_all_service_commands=nagiosadmin
-authorized_for_all_host_commands=nagiosadmin
+authorized_for_all_service_commands=nagios
+authorized_for_all_host_commands=nagios
@@ -188,7 +188,6 @@ authorized_for_all_host_commands=nagiosa
#statusmap_background_image=smbackground.gd2
-
# DEFAULT STATUSMAP LAYOUT METHOD
# This option allows you to specify the default layout method
# the statusmap CGI should use for drawing hosts. If you do
@@ -204,7 +203,6 @@ authorized_for_all_host_commands=nagiosa
default_statusmap_layout=5
-
# DEFAULT STATUSWRL LAYOUT METHOD
# This option allows you to specify the default layout method
# the statuswrl (VRML) CGI should use for drawing hosts. If you
@@ -218,11 +216,10 @@ default_statusmap_layout=5
default_statuswrl_layout=4
-
# STATUSWRL INCLUDE
# This option allows you to include your own objects in the
# generated VRML world. It is assumed that the file
-# resides in the HTML path (i.e. /usr/local/nagios/share).
+# resides in the HTML path (i.e. /usr/share/nagios/html).
#statuswrl_include=myworld.wrl
@@ -243,7 +240,6 @@ default_statuswrl_layout=4
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
-
# REFRESH RATE
# This option allows you to specify the refresh rate in seconds
# of various CGIs (status, statusmap, extinfo, and outages).
@@ -261,7 +257,6 @@ escape_html_tags=1
-
# SOUND OPTIONS
# These options allow you to specify an optional audio file
# that should be played in your browser window when there are
--- nagios-3.0.6/sample-config/httpd.conf.in.p4 2005-11-27 08:47:52 +1000
+++ nagios-3.0.6/sample-config/httpd.conf.in 2009-01-12 10:18:33 +1000
@@ -6,9 +6,9 @@
# configuration file. Customize the paths, etc. as
# needed to fit your system.
-ScriptAlias @cgiurl@ "@sbindir@"
+ScriptAlias @cgiurl@ "@libexecdir/nagios/cgi@"
-<Directory "@sbindir@">
+<Directory "@libexecdir/nagios/cgi@">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
@@ -19,13 +19,13 @@ ScriptAlias @cgiurl@ "@sbindir@"
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
- AuthUserFile @sysconfdir@/htpasswd.users
+ AuthUserFile @sysconfdir@/nagios/htpasswd.users
Require valid-user
</Directory>
-Alias @htmurl@ "@datadir@"
+Alias @htmurl@ "@datadir@/nagios/html"
-<Directory "@datadir@">
+<Directory "@datadir@/nagios/html">
# SSLRequireSSL
Options None
AllowOverride None
@@ -36,7 +36,7 @@ Alias @htmurl@ "@datadir@"
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
- AuthUserFile @sysconfdir@/htpasswd.users
+ AuthUserFile @sysconfdir@/nagios/htpasswd.users
Require valid-user
</Directory>
--- nagios-3.0.6/sample-config/nagios.cfg.in.p4 2009-01-12 10:18:33 +1000
+++ nagios-3.0.6/sample-config/nagios.cfg.in 2009-01-12 10:18:33 +1000
@@ -16,8 +16,7 @@
# for historical purposes. This should be the first option specified
# in the config file!!!
-log_file=@localstatedir@/nagios.log
-
+log_file=/var/log/nagios/nagios.log
# OBJECT CONFIGURATION FILE(S)
@@ -27,33 +26,34 @@ log_file=@localstatedir@/nagios.log
# if you wish (as shown below), or keep them all in a single config file.
# You can specify individual object config files as shown below:
-cfg_file=@sysconfdir@/objects/commands.cfg
-cfg_file=@sysconfdir@/objects/contacts.cfg
-cfg_file=@sysconfdir@/objects/timeperiods.cfg
-cfg_file=@sysconfdir@/objects/templates.cfg
+#cfg_file=@sysconfdir@/nagios/objects/commands.cfg
+#cfg_file=@sysconfdir@/nagios/objects/contacts.cfg
+#cfg_file=@sysconfdir@/nagios/objects/templates.cfg
+#cfg_file=@sysconfdir@/nagios/objects/timeperiods.cfg
# Definitions for monitoring the local (Linux) host
-cfg_file=@sysconfdir@/objects/localhost.cfg
+#cfg_file=@sysconfdir@/nagios/objects/localhost.cfg
# Definitions for monitoring a Windows machine
-#cfg_file=@sysconfdir@/objects/windows.cfg
+#cfg_file=@sysconfdir@/nagios/examples/windows.cfg
# Definitions for monitoring a router/switch
-#cfg_file=@sysconfdir@/objects/switch.cfg
+#cfg_file=@sysconfdir@/nagios/examples/switch.cfg
# Definitions for monitoring a network printer
-#cfg_file=@sysconfdir@/objects/printer.cfg
+#cfg_file=@sysconfdir@/nagios/examples/printer.cfg
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
-#cfg_dir=@sysconfdir@/servers
-#cfg_dir=@sysconfdir@/printers
-#cfg_dir=@sysconfdir@/switches
-#cfg_dir=@sysconfdir@/routers
-
+cfg_dir=@sysconfdir@/nagios/commands
+cfg_dir=@sysconfdir@/nagios/templates
+cfg_dir=@sysconfdir@/nagios/timeperiods
+cfg_dir=@sysconfdir@/nagios/contacts
+cfg_dir=@sysconfdir@/nagios/objects
+cfg_dir=@sysconfdir@/nagios/extinfo
@@ -64,8 +64,7 @@ cfg_file=@sysconfdir@/objects/localhost.
# directly) in order to prevent inconsistencies that can occur
# when the config files are modified after Nagios starts.
-object_cache_file=@localstatedir@/objects.cache
-
+object_cache_file=@localstatedir@/lib/nagios/objects.cache
# PRE-CACHED OBJECT FILE
@@ -80,7 +79,7 @@ object_cache_file=@localstatedir@/object
# Read the documentation section on optimizing Nagios to find our more
# about how this feature works.
-precached_object_file=@localstatedir@/objects.precache
+precached_object_file=@localstatedir@/lib/nagios/objects.precache
@@ -93,8 +92,7 @@ precached_object_file=@localstatedir@/ob
# defined as macros in this file and restrictive permissions (600)
# can be placed on this file.
-resource_file=@sysconfdir@/resource.cfg
-
+resource_file=@sysconfdir@/nagios/resource.cfg
# STATUS FILE
@@ -103,8 +101,7 @@ resource_file=@sysconfdir@/resource.cfg
# The contents of the status file are deleted every time Nagios
# restarts.
-status_file=@localstatedir@/status.dat
-
+status_file=@localstatedir@/lib/nagios/status.dat
# STATUS FILE UPDATE INTERVAL
@@ -123,7 +120,6 @@ status_update_interval=10
nagios_user=@nagios_user@
-
# NAGIOS GROUP
# This determines the effective group that Nagios should run as.
# You can either supply a group name or a GID.
@@ -131,7 +127,6 @@ nagios_user=@nagios_user@
nagios_group=@nagios_grp@
-
# EXTERNAL COMMAND OPTION
# This option allows you to specify whether or not Nagios should check
# for external commands (in the command file defined below). By default
@@ -161,7 +156,6 @@ check_external_commands=1
command_check_interval=-1
-
# EXTERNAL COMMAND FILE
# This is the file that Nagios checks for external command requests.
# It is also where the command CGI will write commands that are submitted
@@ -170,7 +164,7 @@ command_check_interval=-1
# directory level instead of on the file, as the file is deleted every
# time its contents are processed.
-command_file=@localstatedir@/rw/nagios.cmd
+command_file=@localstatedir@/lib/nagios/rw/nagios.cmd
@@ -191,14 +185,13 @@ external_command_buffer_slots=4096
lock_file=@lockfile@
-
# TEMP FILE
# This is a temporary file that is used as scratch space when Nagios
# updates the status log, cleans the comment file, etc. This file
# is created, used, and deleted throughout the time that Nagios is
# running.
-temp_file=@localstatedir@/nagios.tmp
+temp_file=@localstatedir@/lib/nagios/nagios.tmp
@@ -206,7 +199,7 @@ temp_file=@localstatedir@/nagios.tmp
# This is path where Nagios can create temp files for service and
# host check results, etc.
-temp_path=@TMPDIR@
+temp_path=@localstatedir@/lib/nagios/tmp
@@ -219,7 +212,6 @@ temp_path=@TMPDIR@
event_broker_options=-1
-
# EVENT BROKER MODULE(S)
# This directive is used to specify an event broker module that should
# by loaded by Nagios at startup. Use multiple directives if you want
@@ -246,7 +238,6 @@ event_broker_options=-1
#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0
-
# LOG ROTATION METHOD
# This is the log rotation method that Nagios should use to rotate
# the main log file. Values are as follows..
@@ -264,7 +255,7 @@ log_rotation_method=d
# This is the directory where archived (rotated) log files should be
# placed (assuming you've chosen to do log rotation).
-log_archive_path=@localstatedir@/archives
+log_archive_path=/var/log/nagios/archives
@@ -272,7 +263,7 @@ log_archive_path=@localstatedir@/archive
# If you want messages logged to the syslog facility, as well as the
# Nagios log file set this option to 1. If not, set it to 0.
-use_syslog=1
+use_syslog=0
@@ -551,7 +542,6 @@ soft_state_dependencies=0
#time_change_threshold=900
-
# AUTO-RESCHEDULING OPTION
# This option determines whether or not Nagios will attempt to
# automatically reschedule active host and service checks to
@@ -637,7 +627,7 @@ retain_state_information=1
# This file is used only if the preserve_state_information
# variable is set to 1.
-state_retention_file=@localstatedir@/retention.dat
+state_retention_file=@localstatedir@/lib/nagios/retention.dat
@@ -825,8 +815,8 @@ process_performance_data=0
# Performance data is only written to these files if the
# enable_performance_data option (above) is set to 1.
-#host_perfdata_file=/tmp/host-perfdata
-#service_perfdata_file=/tmp/service-perfdata
+host_perfdata_file=/var/lib/nagios/tmp/host-perfdata
+service_perfdata_file=/var/lib/nagios/tmp/service-perfdata
@@ -998,7 +988,7 @@ service_freshness_check_interval=60
# manner.
# Values: 1 = enabled freshness checking, 0 = disable freshness checking
-check_host_freshness=0
+check_host_freshness=1
@@ -1059,7 +1049,7 @@ high_host_flap_threshold=20.0
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
#
-date_format=us
+date_format=iso8601
@@ -1089,7 +1079,7 @@ date_format=us
# embedded Perl interpreter) is located. If you didn't compile
# Nagios with embedded Perl support, this option has no effect.
-p1_file=@libdir@/nagios/p1.pl
+p1_file=@libexecdir@/nagios/p1.pl
@@ -1149,7 +1139,7 @@ illegal_macro_output_chars=`~$&|'"<>
# group names/descriptions in some fields of various object types.
# Values: 1 = enable regexp matching, 0 = disable regexp matching
-use_regexp_matching=0
+use_regexp_matching=1
@@ -1163,7 +1153,7 @@ use_regexp_matching=0
# all the time (which can be annoying).
# Values: 1 = enable true matching, 0 = disable true matching
-use_true_regexp_matching=0
+use_true_regexp_matching=1
@@ -1281,7 +1271,7 @@ debug_verbosity=1
# DEBUG FILE
# This option determines where Nagios should write debugging information.
-debug_file=@localstatedir@/nagios.debug
+debug_file=@localstatedir@/lib/nagios/nagios.debug
--- nagios-3.0.6/sample-config/resource.cfg.in.p4 2003-09-12 10:57:51 +1100
+++ nagios-3.0.6/sample-config/resource.cfg.in 2009-01-12 10:18:33 +1000
@@ -23,10 +23,10 @@
###########################################################################
# Sets $USER1$ to be the path to the plugins
-$USER1$=@libexecdir@
+$USER1$=@libexecdir@/nagios/plugins
# Sets $USER2$ to be the path to event handlers
-#$USER2$=@libexecdir@/eventhandlers
+$USER2$=@libexecdir@/nagios/eventhandlers
# Store some usernames and passwords (hidden from the CGIs)
#$USER3$=someuser
--- nagios-3.0.6/sample-config/template-object/commands.cfg.in.p4 2007-06-10 03:43:04 +1100
+++ nagios-3.0.6/sample-config/template-object/commands.cfg.in 2009-01-12 10:18:33 +1000
@@ -12,7 +12,6 @@
#
###############################################################################
-
################################################################################
#
# SAMPLE NOTIFICATION COMMANDS
@@ -22,8 +21,6 @@
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
#
################################################################################
-
-
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
@@ -37,181 +34,6 @@ define command{
}
-
-
-
-################################################################################
-#
-# SAMPLE HOST CHECK COMMANDS
-#
-################################################################################
-
-
-# This command checks to see if a host is "alive" by pinging it
-# The check must result in a 100% packet loss or 5 second (5000ms) round trip
-# average time to produce a critical error.
-# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)
-
-# 'check-host-alive' command definition
-define command{
- command_name check-host-alive
- command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
- }
-
-
-
-
-################################################################################
-#
-# SAMPLE SERVICE CHECK COMMANDS
-#
-# These are some example service check commands. They may or may not work on
-# your system, as they must be modified for your plugins. See the HTML
-# documentation on the plugins for examples of how to configure command definitions.
-#
-# NOTE: The following 'check_local_...' functions are designed to monitor
-# various metrics on the host that Nagios is running on (i.e. this one).
-################################################################################
-
-# 'check_local_disk' command definition
-define command{
- command_name check_local_disk
- command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
- }
-
-
-# 'check_local_load' command definition
-define command{
- command_name check_local_load
- command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
- }
-
-
-# 'check_local_procs' command definition
-define command{
- command_name check_local_procs
- command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
- }
-
-
-# 'check_local_users' command definition
-define command{
- command_name check_local_users
- command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
- }
-
-
-# 'check_local_swap' command definition
-define command{
- command_name check_local_swap
- command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
- }
-
-
-# 'check_local_mrtgtraf' command definition
-define command{
- command_name check_local_mrtgtraf
- command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
- }
-
-
-################################################################################
-# NOTE: The following 'check_...' commands are used to monitor services on
-# both local and remote hosts.
-################################################################################
-
-# 'check_ftp' command definition
-define command{
- command_name check_ftp
- command_line $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_hpjd' command definition
-define command{
- command_name check_hpjd
- command_line $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_snmp' command definition
-define command{
- command_name check_snmp
- command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_http' command definition
-define command{
- command_name check_http
- command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_ssh' command definition
-define command{
- command_name check_ssh
- command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
- }
-
-
-# 'check_dhcp' command definition
-define command{
- command_name check_dhcp
- command_line $USER1$/check_dhcp $ARG1$
- }
-
-
-# 'check_ping' command definition
-define command{
- command_name check_ping
- command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
- }
-
-
-# 'check_pop' command definition
-define command{
- command_name check_pop
- command_line $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_imap' command definition
-define command{
- command_name check_imap
- command_line $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_smtp' command definition
-define command{
- command_name check_smtp
- command_line $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_tcp' command definition
-define command{
- command_name check_tcp
- command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
- }
-
-
-# 'check_udp' command definition
-define command{
- command_name check_udp
- command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
- }
-
-
-# 'check_nt' command definition
-define command{
- command_name check_nt
- command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
- }
-
-
-
################################################################################
#
# SAMPLE PERFORMANCE DATA COMMANDS
@@ -222,19 +44,14 @@ define command{
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################
-
-
# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> @localstatedir@/host-perfdata.out
}
-
# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> @localstatedir@/service-perfdata.out
}
-
-
--- nagios-3.0.6/sample-config/template-object/contacts.cfg.in.p4 2007-06-10 03:43:04 +1100
+++ nagios-3.0.6/sample-config/template-object/contacts.cfg.in 2009-01-12 10:18:33 +1000
@@ -13,8 +13,6 @@
#
###############################################################################
-
-
###############################################################################
###############################################################################
#
@@ -22,19 +20,15 @@
#
###############################################################################
###############################################################################
-
# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact'
# template which is defined elsewhere.
-
define contact{
- contact_name nagiosadmin ; Short name of user
- use generic-contact ; Inherit default values from generic-contact template (defined above)
- alias Nagios Admin ; Full name of user
-
- email @nagios_user@@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
- }
-
+ contact_name nagios ; Short name of user
+ use generic-contact ; Inherit default values from generic-contact template (defined above)
+ alias Nagios Admin ; Full name of user
+ email @nagios_user@@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
+ }
###############################################################################
@@ -44,12 +38,11 @@ define contact{
#
###############################################################################
###############################################################################
-
# 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 nagiosadmin
- }
+ contactgroup_name admins
+ alias Nagios Administrators
+ members nagios
+ }
--- nagios-3.0.6/sample-config/template-object/localhost.cfg.in.p4 2007-06-10 03:43:05 +1100
+++ nagios-3.0.6/sample-config/template-object/localhost.cfg.in 2009-01-12 10:18:33 +1000
@@ -9,9 +9,6 @@
#
###############################################################################
-
-
-
###############################################################################
###############################################################################
#
@@ -23,14 +20,14 @@
# Define a host for the local machine
define host{
- use linux-server ; Name of host template to use
- ; This host definition will inherit all variables that are defined
- ; in (or inherited by) the linux-server host template definition.
- host_name localhost
- alias localhost
- address 127.0.0.1
- }
-
+ ; Name of host template to use
+ ; This host definition will inherit all variables that are defined
+ ; in (or inherited by) the linux-server host template definition.
+ use linux-server
+ host_name localhost
+ alias localhost
+ address 127.0.0.1
+ }
###############################################################################
@@ -40,15 +37,12 @@ define host{
#
###############################################################################
###############################################################################
-
# Define an optional hostgroup for Linux machines
-
define hostgroup{
- hostgroup_name linux-servers ; The name of the hostgroup
- alias Linux Servers ; Long name of the group
- members localhost ; Comma separated list of hosts that belong to this group
- }
-
+ hostgroup_name linux-servers ; The name of the hostgroup
+ alias Linux Servers ; Long name of the group
+ members localhost ; Comma separated list of hosts that belong to this group
+ }
###############################################################################
@@ -58,100 +52,77 @@ define hostgroup{
#
###############################################################################
###############################################################################
-
-
# Define a service to "ping" the local machine
-
define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description PING
+ use local-service ; Name of service template to use
+ host_name localhost
+ service_description PING
check_command check_ping!100.0,20%!500.0,60%
- }
-
-
-# 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 local-service ; Name of service template to use
- host_name localhost
- service_description Root Partition
- check_command check_local_disk!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 local-service ; Name of service template to use
- host_name localhost
- service_description Current Users
- check_command check_local_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 local-service ; Name of service template to use
- host_name localhost
- service_description Total Processes
+ use local-service ; Name of service template to use
+ host_name localhost
+ service_description Total Processes
check_command check_local_procs!250!400!RSZDT
- }
-
-
+ }
# Define a service to check the load on the local machine.
-
define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description Current Load
+ use local-service ; Name of service template to use
+ host_name localhost
+ service_description Current Load
check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
- }
+ }
+# 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 local-service ; Name of service template to use
+# host_name localhost
+# service_description Root Partition
+# check_command check_local_disk!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 local-service ; Name of service template to use
+# host_name localhost
+# service_description Current Users
+# check_command check_local_users!20!50
+# }
# Define a service to check the swap usage the local machine.
# Critical if less than 10% of swap is free, warning if less than 20% is free
-
-define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description Swap Usage
- check_command check_local_swap!20!10
- }
-
-
+#define service{
+# use local-service ; Name of service template to use
+# host_name localhost
+# service_description Swap Usage
+# check_command check_local_swap!20!10
+# }
# Define a service to check SSH on the local machine.
# Disable notifications for this service by default, as not all users may have SSH enabled.
-
-define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description SSH
- check_command check_ssh
- notifications_enabled 0
- }
-
-
+#define service{
+# use local-service ; Name of service template to use
+# host_name localhost
+# service_description SSH
+# check_command check_ssh
+# notifications_enabled 0
+# }
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
-
-define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description HTTP
- check_command check_http
- notifications_enabled 0
- }
-
+#define service{
+# use local-service ; Name of service template to use
+# host_name localhost
+# service_description HTTP
+# check_command check_http
+# notifications_enabled 0
+# }
--- nagios-3.0.6/sample-config/template-object/printer.cfg.in.p4 2007-10-04 08:43:14 +1100
+++ nagios-3.0.6/sample-config/template-object/printer.cfg.in 2009-01-12 10:18:33 +1000
@@ -8,9 +8,6 @@
#
###############################################################################
-
-
-
###############################################################################
###############################################################################
#
@@ -21,16 +18,13 @@
# 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 network-printers ; Host groups this printer is associated with
- }
-
-
+#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 network-printers ; Host groups this printer is associated with
+# }
###############################################################################
@@ -40,15 +34,11 @@ define host{
#
###############################################################################
###############################################################################
-
# A hostgroup for network printers
-
-define hostgroup{
- hostgroup_name network-printers ; The name of the hostgroup
- alias Network Printers ; Long name of the group
- }
-
-
+#define hostgroup{
+# hostgroup_name network-printers ; The name of the hostgroup
+# alias Network Printers ; Long name of the group
+# }
###############################################################################
@@ -58,28 +48,24 @@ define hostgroup{
#
###############################################################################
###############################################################################
-
# 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
- }
-
+#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
+# }
# Create a service for "pinging" the printer occassionally. Useful for monitoring RTA, packet loss, etc.
-
-define service{
- use generic-service
- host_name hplj2605dn
- service_description PING
- check_command check_ping!3000.0,80%!5000.0,100%
- normal_check_interval 10
- retry_check_interval 1
- }
+#define service{
+# use generic-service
+# host_name hplj2605dn
+# service_description PING
+# check_command check_ping!3000.0,80%!5000.0,100%
+# normal_check_interval 10
+# retry_check_interval 1
+# }
--- nagios-3.0.6/sample-config/template-object/switch.cfg.in.p4 2007-10-04 08:43:14 +1100
+++ nagios-3.0.6/sample-config/template-object/switch.cfg.in 2009-01-12 10:18:33 +1000
@@ -8,9 +8,6 @@
#
###############################################################################
-
-
-
###############################################################################
###############################################################################
#
@@ -18,18 +15,14 @@
#
###############################################################################
###############################################################################
-
# Define the switch that we'll be monitoring
-
-define host{
- use generic-switch ; Inherit default values from a template
- host_name linksys-srw224p ; The name we're giving to this switch
- alias Linksys SRW224P Switch ; A longer name associated with the switch
- address 192.168.1.253 ; IP address of the switch
- hostgroups switches ; Host groups this switch is associated with
- }
-
-
+#define host{
+# use generic-switch ; Inherit default values from a template
+# host_name linksys-srw224p ; The name we're giving to this switch
+# alias Linksys SRW224P Switch ; A longer name associated with the switch
+# address 192.168.1.253 ; IP address of the switch
+# hostgroups switches ; Host groups this switch is associated with
+# }
###############################################################################
@@ -39,15 +32,11 @@ define host{
#
###############################################################################
###############################################################################
-
# Create a new hostgroup for switches
-
-define hostgroup{
- hostgroup_name switches ; The name of the hostgroup
- alias Network Switches ; Long name of the group
- }
-
-
+#define hostgroup{
+# hostgroup_name switches ; The name of the hostgroup
+# alias Network Switches ; Long name of the group
+# }
###############################################################################
@@ -57,57 +46,36 @@ define hostgroup{
#
###############################################################################
###############################################################################
-
# Create a service to PING to switch
-
-define service{
- use generic-service ; Inherit values from a template
- host_name linksys-srw224p ; The name of the host the service is associated with
- service_description PING ; The service description
- check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
- normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
- retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
- }
-
-
-# Monitor uptime via SNMP
-
-define service{
- use generic-service ; Inherit values from a template
- host_name linksys-srw224p
- service_description Uptime
- check_command check_snmp!-C public -o sysUpTime.0
- }
-
-
+#define service{
+# use generic-service ; Inherit values from a template
+# host_name linksys-srw224p ; The name of the host the service is associated with
+# service_description PING ; The service description
+# check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
+# normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
+# retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
+# }
+
+# Monitor uptime via SNMP -- see nagios-plugins-snmp package
+#define service{
+# use generic-service ; Inherit values from a template
+# host_name linksys-srw224p
+# service_description Uptime
+# check_command check_snmp!-C public -o sysUpTime.0
+# }
# Monitor Port 1 status via SNMP
-
-define service{
- use generic-service ; Inherit values from a template
- host_name linksys-srw224p
- service_description Port 1 Link Status
- check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
- }
-
-
+#define service{
+# use generic-service ; Inherit values from a template
+# host_name linksys-srw224p
+# service_description Port 1 Link Status
+# check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
+# }
# Monitor bandwidth via MRTG logs
-
-define service{
- use generic-service ; Inherit values from a template
- host_name linksys-srw224p
- service_description Port 1 Bandwidth Usage
- check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.253_1.log!AVG!1000000,1000000!5000000,5000000!10
- }
-
-
-
-
-
-
-
-
-
-
-
+#define service{
+# use generic-service ; Inherit values from a template
+# host_name linksys-srw224p
+# service_description Port 1 Bandwidth Usage
+# check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.253_1.log!AVG!1000000,1000000!5000000,5000000!10
+# }
--- nagios-3.0.6/sample-config/template-object/templates.cfg.in.p4 2007-10-04 08:43:14 +1100
+++ nagios-3.0.6/sample-config/template-object/templates.cfg.in 2009-01-12 10:18:33 +1000
@@ -13,8 +13,6 @@
#
###############################################################################
-
-
###############################################################################
###############################################################################
#
@@ -22,21 +20,17 @@
#
###############################################################################
###############################################################################
-
# Generic contact definition template - This is NOT a real contact, just a template!
-
define contact{
- name generic-contact ; The name of this contact template
- service_notification_period 24x7 ; service notifications can be sent anytime
- host_notification_period 24x7 ; host notifications can be sent anytime
- service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
- host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
- service_notification_commands notify-service-by-email ; send service notifications via email
- host_notification_commands notify-host-by-email ; send host notifications via email
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
- }
-
-
+ name generic-contact ; The name of this contact template
+ service_notification_period 24x7 ; service notifications can be sent anytime
+ host_notification_period 24x7 ; host notifications can be sent anytime
+ service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
+ host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
+ service_notification_commands notify-service-by-email ; send service notifications via email
+ host_notification_commands notify-host-by-email ; send host notifications via email
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
+ }
###############################################################################
@@ -46,100 +40,88 @@ define contact{
#
###############################################################################
###############################################################################
-
# 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
- notification_period 24x7 ; Send host notifications at any time
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
- }
-
+ 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
+ notification_period 24x7 ; Send host notifications at any time
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
+ }
# Linux host definition template - This is NOT a real host, just a template!
-
define host{
- name linux-server ; The name of this host template
- use generic-host ; This template inherits other values from the generic-host template
- check_period 24x7 ; By default, Linux hosts are checked round the clock
- check_interval 5 ; Actively check the host every 5 minutes
- retry_interval 1 ; Schedule host check retries at 1 minute intervals
- max_check_attempts 10 ; Check each Linux host 10 times (max)
- check_command check-host-alive ; Default command to check Linux hosts
- notification_period workhours ; 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_interval 120 ; Resend notifications every 2 hours
- notification_options d,u,r ; Only send notifications for specific host states
- contact_groups admins ; Notifications get sent to the admins by default
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
+ name linux-server ; The name of this host template
+ use generic-host ; This template inherits other values from the generic-host template
+ check_period 24x7 ; By default, Linux hosts are checked round the clock
+ check_interval 5 ; Actively check the host every 5 minutes
+ retry_interval 1 ; Schedule host check retries at 1 minute intervals
+ max_check_attempts 10 ; Check each Linux host 10 times (max)
+ check_command check-host-alive ; Default command to check Linux hosts
+ notification_period workhours ; 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_interval 120 ; Resend notifications every 2 hours
+ notification_options d,u,r ; Only send notifications for specific host states
+ contact_groups admins ; Notifications get sent to the admins by default
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
-
-
# Windows host definition template - This is NOT a real host, just a template!
-
define host{
- name windows-server ; The name of this host template
- use generic-host ; Inherit default values from the generic-host template
- check_period 24x7 ; By default, Windows servers are monitored round the clock
+ name windows-server ; The name of this host template
+ use generic-host ; Inherit default values from the generic-host template
+ check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
- notification_period 24x7 ; Send notification out at any time - day or night
+ notification_period 24x7 ; Send notification out at any time - day or night
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
- hostgroups windows-servers ; Host groups that Windows servers should be a member of
- register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
+ contact_groups admins ; Notifications get sent to the admins by default
+ hostgroups windows-servers ; Host groups that Windows servers should be a member of
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
-
# 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
+ 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_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
+ contact_groups admins ; Notifications get sent to the admins by default
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
-
# Define a template for switches that we can reuse
define host{
- name generic-switch ; The name of this host template
- use generic-host ; Inherit default values from the generic-host template
- check_period 24x7 ; By default, switches are monitored round the clock
+ name generic-switch ; The name of this host template
+ use generic-host ; Inherit default values from the generic-host template
+ check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
- notification_period 24x7 ; Send notifications at any time
+ notification_period 24x7 ; Send notifications at any time
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
+ contact_groups admins ; Notifications get sent to the admins by default
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
-
-
###############################################################################
###############################################################################
#
@@ -147,44 +129,39 @@ define host{
#
###############################################################################
###############################################################################
-
# Generic service definition template - This is NOT a real service, just a template!
-
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
- 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!
- }
-
+ 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
+ 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!
+ }
# Local service definition template - This is NOT a real service, just a template!
-
define service{
- name local-service ; The name of this service template
- use generic-service ; Inherit default values from the generic-service definition
- 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
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
+ name local-service ; The name of this service template
+ use generic-service ; Inherit default values from the generic-service definition
+ 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
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
-
--- nagios-3.0.6/sample-config/template-object/timeperiods.cfg.in.p4 2007-06-10 03:43:07 +1100
+++ nagios-3.0.6/sample-config/template-object/timeperiods.cfg.in 2009-01-12 10:18:33 +1000
@@ -13,8 +13,6 @@
#
###############################################################################
-
-
###############################################################################
###############################################################################
#
@@ -22,25 +20,23 @@
#
###############################################################################
###############################################################################
-
# 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
- }
-
+ 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
+ }
# 'workhours' timeperiod definition
define timeperiod{
- timeperiod_name workhours
+ timeperiod_name workhours
alias Normal Work Hours
monday 09:00-17:00
tuesday 09:00-17:00
@@ -49,46 +45,41 @@ define timeperiod{
friday 09:00-17:00
}
-
# 'none' timeperiod definition
define timeperiod{
- timeperiod_name none
+ timeperiod_name none
alias No Time Is A Good Time
}
-
# Some U.S. holidays
# Note: The timeranges for each holiday are meant to *exclude* the holidays from being
# treated as a valid time for notifications, etc. You probably don't want your pager
# going off on New Year's. Although you're employer might... :-)
define timeperiod{
- name us-holidays
- timeperiod_name us-holidays
- alias U.S. Holidays
-
- january 1 00:00-00:00 ; New Years
- monday -1 may 00:00-00:00 ; Memorial Day (last Monday in May)
- july 4 00:00-00:00 ; Independence Day
- monday 1 september 00:00-00:00 ; Labor Day (first Monday in September)
- thursday -1 november 00:00-00:00 ; Thanksgiving (last Thursday in November)
- december 25 00:00-00:00 ; Christmas
- }
-
+ timeperiod_name us-holidays
+ name us-holidays
+ alias U.S. Holidays
+
+ january 1 00:00-00:00 ; New Years
+ monday -1 may 00:00-00:00 ; Memorial Day (last Monday in May)
+ july 4 00:00-00:00 ; Independence Day
+ monday 1 september 00:00-00:00 ; Labor Day (first Monday in September)
+ thursday -1 november 00:00-00:00 ; Thanksgiving (last Thursday in November)
+ december 25 00:00-00:00 ; Christmas
+ }
# This defines a modified "24x7" timeperiod that covers every day of the
# year, except for U.S. holidays (defined in the timeperiod above).
define timeperiod{
- timeperiod_name 24x7_sans_holidays
- alias 24x7 Sans Holidays
-
- use us-holidays ; Get holiday exceptions from other timeperiod
-
- 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
- }
-
+ timeperiod_name 24x7_sans_holidays
+ alias 24x7 Sans Holidays
+ use us-holidays ; Get holiday exceptions from other timeperiod
+
+ 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
+ }
--- nagios-3.0.6/sample-config/template-object/windows.cfg.in.p4 2007-06-19 03:56:33 +1100
+++ nagios-3.0.6/sample-config/template-object/windows.cfg.in 2009-01-12 10:18:33 +1000
@@ -8,9 +8,6 @@
#
###############################################################################
-
-
-
###############################################################################
###############################################################################
#
@@ -18,18 +15,14 @@
#
###############################################################################
###############################################################################
-
# Define a host for the Windows machine we'll be monitoring
# Change the host_name, alias, and address to fit your situation
-
-define host{
- use windows-server ; Inherit default values from a template
- host_name winserver ; The name we're giving to this host
- alias My Windows Server ; A longer name associated with the host
- address 192.168.1.2 ; IP address of the host
- }
-
-
+#define host{
+# use windows-server ; Inherit default values from a template
+# host_name winserver ; The name we're giving to this host
+# alias My Windows Server ; A longer name associated with the host
+# address 192.168.1.2 ; IP address of the host
+# }
###############################################################################
@@ -39,17 +32,12 @@ define host{
#
###############################################################################
###############################################################################
-
-
# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group
-
-define hostgroup{
- hostgroup_name windows-servers ; The name of the hostgroup
- alias Windows Servers ; Long name of the group
- }
-
-
+#define hostgroup{
+# hostgroup_name windows-servers ; The name of the hostgroup
+# alias Windows Servers ; Long name of the group
+# }
###############################################################################
@@ -59,87 +47,65 @@ define hostgroup{
#
###############################################################################
###############################################################################
-
-
# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description NSClient++ Version
- check_command check_nt!CLIENTVERSION
- }
-
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description NSClient++ Version
+# check_command check_nt!CLIENTVERSION
+# }
# Create a service for monitoring the uptime of the server
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description Uptime
- check_command check_nt!UPTIME
- }
-
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description Uptime
+# check_command check_nt!UPTIME
+# }
# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description CPU Load
- check_command check_nt!CPULOAD!-l 5,80,90
- }
-
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description CPU Load
+# check_command check_nt!CPULOAD!-l 5,80,90
+# }
# Create a service for monitoring
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description Memory Usage
- check_command check_nt!MEMUSE!-w 80 -c 90
- }
-
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description Memory Usage
+# check_command check_nt!MEMUSE!-w 80 -c 90
+# }
# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description C:\ Drive Space
- check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
- }
-
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description C:\ Drive Space
+# check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
+# }
# Create a service for monitoring the W3SVC service
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description W3SVC
- check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
- }
-
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description W3SVC
+# check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
+# }
# Create a service for monitoring the Explorer.exe process
# Change the host_name to match the name of the host you defined above
-
-define service{
- use generic-service
- host_name winserver
- service_description Explorer
- check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
- }
-
+#define service{
+# use generic-service
+# host_name winserver
+# service_description Explorer
+# check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
+# }