deprec 2.0.13 → 2.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -0
- data/lib/deprec/recipes/app/passenger.rb +12 -1
- data/lib/deprec/recipes/collectd.rb +112 -0
- data/lib/deprec/recipes/nagios.rb +82 -75
- data/lib/deprec/recipes/rails.rb +5 -0
- data/lib/deprec/recipes/utils.rb +17 -17
- data/lib/deprec/recipes/web/apache.rb +1 -0
- data/lib/deprec/recipes/xen.rb +6 -5
- data/lib/deprec/recipes_minus_rails.rb +1 -0
- data/lib/deprec/templates/nagios/README +32 -0
- data/lib/deprec/templates/nagios/cgi.cfg +332 -0
- data/lib/deprec/templates/nagios/htpasswd.users +0 -1
- data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
- data/lib/deprec/templates/nagios/{nagios.cfg.erb → nagios.cfg} +37 -14
- data/lib/deprec/templates/nagios/objects/commands.cfg +240 -0
- data/lib/deprec/templates/nagios/objects/contacts.cfg +55 -0
- data/lib/deprec/templates/nagios/{localhost.cfg.erb → objects/localhost.cfg} +0 -0
- data/lib/deprec/templates/nagios/objects/templates.cfg +190 -0
- data/lib/deprec/templates/nagios/{timeperiods.cfg.erb → objects/timeperiods.cfg} +0 -0
- data/lib/deprec/templates/nagios/resource.cfg +34 -0
- data/lib/deprec/templates/nagios_config.tgz +0 -0
- data/lib/deprec/templates/{nagios/nagios_apache_vhost.conf.erb → old/apache_vhost.erb} +0 -0
- data/lib/deprec/templates/{nagios → old}/cgi.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → old}/commands.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → old}/contacts.cfg.erb +0 -0
- data/lib/deprec/templates/old/htpasswd.users +1 -0
- data/lib/deprec/templates/old/localhost.cfg.erb +157 -0
- data/lib/deprec/templates/{nagios → old}/resource.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → old}/templates.cfg.erb +0 -0
- data/lib/deprec/templates/old/timeperiods.cfg.erb +94 -0
- data/lib/deprec/templates/passenger/apache_vhost.erb +3 -0
- data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
- metadata +24 -11
@@ -1,12 +1,12 @@
|
|
1
1
|
##############################################################################
|
2
2
|
#
|
3
|
-
# NAGIOS.CFG - Sample Main Config File for Nagios 3.
|
3
|
+
# NAGIOS.CFG - Sample Main Config File for Nagios 3.0.6
|
4
4
|
#
|
5
5
|
# Read the documentation for more information on this configuration
|
6
6
|
# file. I've provided some comments here, but things may not be so
|
7
7
|
# clear without further explanation.
|
8
8
|
#
|
9
|
-
# Last Modified:
|
9
|
+
# Last Modified: 10-15-2008
|
10
10
|
#
|
11
11
|
##############################################################################
|
12
12
|
|
@@ -27,13 +27,13 @@ log_file=/usr/local/nagios/var/nagios.log
|
|
27
27
|
# if you wish (as shown below), or keep them all in a single config file.
|
28
28
|
|
29
29
|
# You can specify individual object config files as shown below:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
|
31
|
+
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
|
32
|
+
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
|
33
|
+
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
|
34
34
|
|
35
35
|
# Definitions for monitoring the local (Linux) host
|
36
|
-
|
36
|
+
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
|
37
37
|
|
38
38
|
# Definitions for monitoring a Windows machine
|
39
39
|
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg
|
@@ -49,9 +49,6 @@ log_file=/usr/local/nagios/var/nagios.log
|
|
49
49
|
# extension) in a particular directory by using the cfg_dir
|
50
50
|
# directive as shown below:
|
51
51
|
|
52
|
-
cfg_dir=/usr/local/nagios/etc/objects
|
53
|
-
|
54
|
-
|
55
52
|
#cfg_dir=/usr/local/nagios/etc/servers
|
56
53
|
#cfg_dir=/usr/local/nagios/etc/printers
|
57
54
|
#cfg_dir=/usr/local/nagios/etc/switches
|
@@ -111,8 +108,7 @@ status_file=/usr/local/nagios/var/status.dat
|
|
111
108
|
|
112
109
|
|
113
110
|
# STATUS FILE UPDATE INTERVAL
|
114
|
-
#
|
115
|
-
# this option determines the frequency (in seconds) that
|
111
|
+
# This option determines the frequency (in seconds) that
|
116
112
|
# Nagios will periodically dump program, host, and
|
117
113
|
# service status data.
|
118
114
|
|
@@ -534,6 +530,28 @@ enable_predictive_service_dependency_checks=1
|
|
534
530
|
|
535
531
|
|
536
532
|
|
533
|
+
# SOFT STATE DEPENDENCIES
|
534
|
+
# This option determines whether or not Nagios will use soft state
|
535
|
+
# information when checking host and service dependencies. Normally
|
536
|
+
# Nagios will only use the latest hard host or service state when
|
537
|
+
# checking dependencies. If you want it to use the latest state (regardless
|
538
|
+
# of whether its a soft or hard state type), enable this option.
|
539
|
+
# Values:
|
540
|
+
# 0 = Don't use soft state dependencies (default)
|
541
|
+
# 1 = Use soft state dependencies
|
542
|
+
|
543
|
+
soft_state_dependencies=0
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
# TIME CHANGE ADJUSTMENT THRESHOLDS
|
548
|
+
# These options determine when Nagios will react to detected changes
|
549
|
+
# in system time (either forward or backwards).
|
550
|
+
|
551
|
+
#time_change_threshold=900
|
552
|
+
|
553
|
+
|
554
|
+
|
537
555
|
# AUTO-RESCHEDULING OPTION
|
538
556
|
# This option determines whether or not Nagios will attempt to
|
539
557
|
# automatically reschedule active host and service checks to
|
@@ -1230,7 +1248,8 @@ enable_environment_macros=1
|
|
1230
1248
|
# This option determines how much (if any) debugging information will
|
1231
1249
|
# be written to the debug file. OR values together to log multiple
|
1232
1250
|
# types of information.
|
1233
|
-
# Values:
|
1251
|
+
# Values:
|
1252
|
+
# -1 = Everything
|
1234
1253
|
# 0 = Nothing
|
1235
1254
|
# 1 = Functions
|
1236
1255
|
# 2 = Configuration
|
@@ -1239,7 +1258,11 @@ enable_environment_macros=1
|
|
1239
1258
|
# 16 = Host/service checks
|
1240
1259
|
# 32 = Notifications
|
1241
1260
|
# 64 = Event broker
|
1242
|
-
# 128 =
|
1261
|
+
# 128 = External commands
|
1262
|
+
# 256 = Commands
|
1263
|
+
# 512 = Scheduled downtime
|
1264
|
+
# 1024 = Comments
|
1265
|
+
# 2048 = Macros
|
1243
1266
|
|
1244
1267
|
debug_level=0
|
1245
1268
|
|
@@ -0,0 +1,240 @@
|
|
1
|
+
###############################################################################
|
2
|
+
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS 3.0.6
|
3
|
+
#
|
4
|
+
# Last Modified: 05-31-2007
|
5
|
+
#
|
6
|
+
# NOTES: This config file provides you with some example command definitions
|
7
|
+
# that you can reference in host, service, and contact definitions.
|
8
|
+
#
|
9
|
+
# You don't need to keep commands in a separate file from your other
|
10
|
+
# object definitions. This has been done just to make things easier to
|
11
|
+
# understand.
|
12
|
+
#
|
13
|
+
###############################################################################
|
14
|
+
|
15
|
+
|
16
|
+
################################################################################
|
17
|
+
#
|
18
|
+
# SAMPLE NOTIFICATION COMMANDS
|
19
|
+
#
|
20
|
+
# These are some example notification commands. They may or may not work on
|
21
|
+
# your system without modification. As an example, some systems will require
|
22
|
+
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
|
23
|
+
#
|
24
|
+
################################################################################
|
25
|
+
|
26
|
+
|
27
|
+
# 'notify-host-by-email' command definition
|
28
|
+
define command{
|
29
|
+
command_name notify-host-by-email
|
30
|
+
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
|
31
|
+
}
|
32
|
+
|
33
|
+
# 'notify-service-by-email' command definition
|
34
|
+
define command{
|
35
|
+
command_name notify-service-by-email
|
36
|
+
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
################################################################################
|
44
|
+
#
|
45
|
+
# SAMPLE HOST CHECK COMMANDS
|
46
|
+
#
|
47
|
+
################################################################################
|
48
|
+
|
49
|
+
|
50
|
+
# This command checks to see if a host is "alive" by pinging it
|
51
|
+
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
|
52
|
+
# average time to produce a critical error.
|
53
|
+
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)
|
54
|
+
|
55
|
+
# 'check-host-alive' command definition
|
56
|
+
define command{
|
57
|
+
command_name check-host-alive
|
58
|
+
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
################################################################################
|
65
|
+
#
|
66
|
+
# SAMPLE SERVICE CHECK COMMANDS
|
67
|
+
#
|
68
|
+
# These are some example service check commands. They may or may not work on
|
69
|
+
# your system, as they must be modified for your plugins. See the HTML
|
70
|
+
# documentation on the plugins for examples of how to configure command definitions.
|
71
|
+
#
|
72
|
+
# NOTE: The following 'check_local_...' functions are designed to monitor
|
73
|
+
# various metrics on the host that Nagios is running on (i.e. this one).
|
74
|
+
################################################################################
|
75
|
+
|
76
|
+
# 'check_local_disk' command definition
|
77
|
+
define command{
|
78
|
+
command_name check_local_disk
|
79
|
+
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
# 'check_local_load' command definition
|
84
|
+
define command{
|
85
|
+
command_name check_local_load
|
86
|
+
command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
# 'check_local_procs' command definition
|
91
|
+
define command{
|
92
|
+
command_name check_local_procs
|
93
|
+
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
# 'check_local_users' command definition
|
98
|
+
define command{
|
99
|
+
command_name check_local_users
|
100
|
+
command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
|
101
|
+
}
|
102
|
+
|
103
|
+
|
104
|
+
# 'check_local_swap' command definition
|
105
|
+
define command{
|
106
|
+
command_name check_local_swap
|
107
|
+
command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
# 'check_local_mrtgtraf' command definition
|
112
|
+
define command{
|
113
|
+
command_name check_local_mrtgtraf
|
114
|
+
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
################################################################################
|
119
|
+
# NOTE: The following 'check_...' commands are used to monitor services on
|
120
|
+
# both local and remote hosts.
|
121
|
+
################################################################################
|
122
|
+
|
123
|
+
# 'check_ftp' command definition
|
124
|
+
define command{
|
125
|
+
command_name check_ftp
|
126
|
+
command_line $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
# 'check_hpjd' command definition
|
131
|
+
define command{
|
132
|
+
command_name check_hpjd
|
133
|
+
command_line $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
|
134
|
+
}
|
135
|
+
|
136
|
+
|
137
|
+
# 'check_snmp' command definition
|
138
|
+
define command{
|
139
|
+
command_name check_snmp
|
140
|
+
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
# 'check_http' command definition
|
145
|
+
define command{
|
146
|
+
command_name check_http
|
147
|
+
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
|
148
|
+
}
|
149
|
+
|
150
|
+
|
151
|
+
# 'check_ssh' command definition
|
152
|
+
define command{
|
153
|
+
command_name check_ssh
|
154
|
+
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
# 'check_dhcp' command definition
|
159
|
+
define command{
|
160
|
+
command_name check_dhcp
|
161
|
+
command_line $USER1$/check_dhcp $ARG1$
|
162
|
+
}
|
163
|
+
|
164
|
+
|
165
|
+
# 'check_ping' command definition
|
166
|
+
define command{
|
167
|
+
command_name check_ping
|
168
|
+
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
|
169
|
+
}
|
170
|
+
|
171
|
+
|
172
|
+
# 'check_pop' command definition
|
173
|
+
define command{
|
174
|
+
command_name check_pop
|
175
|
+
command_line $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
|
176
|
+
}
|
177
|
+
|
178
|
+
|
179
|
+
# 'check_imap' command definition
|
180
|
+
define command{
|
181
|
+
command_name check_imap
|
182
|
+
command_line $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
|
183
|
+
}
|
184
|
+
|
185
|
+
|
186
|
+
# 'check_smtp' command definition
|
187
|
+
define command{
|
188
|
+
command_name check_smtp
|
189
|
+
command_line $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
|
190
|
+
}
|
191
|
+
|
192
|
+
|
193
|
+
# 'check_tcp' command definition
|
194
|
+
define command{
|
195
|
+
command_name check_tcp
|
196
|
+
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
# 'check_udp' command definition
|
201
|
+
define command{
|
202
|
+
command_name check_udp
|
203
|
+
command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
|
204
|
+
}
|
205
|
+
|
206
|
+
|
207
|
+
# 'check_nt' command definition
|
208
|
+
define command{
|
209
|
+
command_name check_nt
|
210
|
+
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
|
211
|
+
}
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
################################################################################
|
216
|
+
#
|
217
|
+
# SAMPLE PERFORMANCE DATA COMMANDS
|
218
|
+
#
|
219
|
+
# These are sample performance data commands that can be used to send performance
|
220
|
+
# data output to two text files (one for hosts, another for services). If you
|
221
|
+
# plan on simply writing performance data out to a file, consider using the
|
222
|
+
# host_perfdata_file and service_perfdata_file options in the main config file.
|
223
|
+
#
|
224
|
+
################################################################################
|
225
|
+
|
226
|
+
|
227
|
+
# 'process-host-perfdata' command definition
|
228
|
+
define command{
|
229
|
+
command_name process-host-perfdata
|
230
|
+
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
# 'process-service-perfdata' command definition
|
235
|
+
define command{
|
236
|
+
command_name process-service-perfdata
|
237
|
+
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" >> /usr/local/nagios/var/service-perfdata.out
|
238
|
+
}
|
239
|
+
|
240
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
###############################################################################
|
2
|
+
# CONTACTS.CFG - SAMPLE CONTACT/CONTACTGROUP DEFINITIONS
|
3
|
+
#
|
4
|
+
# Last Modified: 05-31-2007
|
5
|
+
#
|
6
|
+
# NOTES: This config file provides you with some example contact and contact
|
7
|
+
# group definitions that you can reference in host and service
|
8
|
+
# definitions.
|
9
|
+
#
|
10
|
+
# You don't need to keep these definitions in a separate file from your
|
11
|
+
# other object definitions. This has been done just to make things
|
12
|
+
# easier to understand.
|
13
|
+
#
|
14
|
+
###############################################################################
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
###############################################################################
|
19
|
+
###############################################################################
|
20
|
+
#
|
21
|
+
# CONTACTS
|
22
|
+
#
|
23
|
+
###############################################################################
|
24
|
+
###############################################################################
|
25
|
+
|
26
|
+
# Just one contact defined by default - the Nagios admin (that's you)
|
27
|
+
# This contact definition inherits a lot of default values from the 'generic-contact'
|
28
|
+
# template which is defined elsewhere.
|
29
|
+
|
30
|
+
define contact{
|
31
|
+
contact_name nagiosadmin ; Short name of user
|
32
|
+
use generic-contact ; Inherit default values from generic-contact template (defined above)
|
33
|
+
alias Nagios Admin ; Full name of user
|
34
|
+
|
35
|
+
email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
###############################################################################
|
41
|
+
###############################################################################
|
42
|
+
#
|
43
|
+
# CONTACT GROUPS
|
44
|
+
#
|
45
|
+
###############################################################################
|
46
|
+
###############################################################################
|
47
|
+
|
48
|
+
# We only have one contact in this simple configuration file, so there is
|
49
|
+
# no need to create more than one contact group.
|
50
|
+
|
51
|
+
define contactgroup{
|
52
|
+
contactgroup_name admins
|
53
|
+
alias Nagios Administrators
|
54
|
+
members nagiosadmin
|
55
|
+
}
|
File without changes
|
@@ -0,0 +1,190 @@
|
|
1
|
+
###############################################################################
|
2
|
+
# TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
|
3
|
+
#
|
4
|
+
# Last Modified: 10-03-2007
|
5
|
+
#
|
6
|
+
# NOTES: This config file provides you with some example object definition
|
7
|
+
# templates that are refered by other host, service, contact, etc.
|
8
|
+
# definitions in other config files.
|
9
|
+
#
|
10
|
+
# You don't need to keep these definitions in a separate file from your
|
11
|
+
# other object definitions. This has been done just to make things
|
12
|
+
# easier to understand.
|
13
|
+
#
|
14
|
+
###############################################################################
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
###############################################################################
|
19
|
+
###############################################################################
|
20
|
+
#
|
21
|
+
# CONTACT TEMPLATES
|
22
|
+
#
|
23
|
+
###############################################################################
|
24
|
+
###############################################################################
|
25
|
+
|
26
|
+
# Generic contact definition template - This is NOT a real contact, just a template!
|
27
|
+
|
28
|
+
define contact{
|
29
|
+
name generic-contact ; The name of this contact template
|
30
|
+
service_notification_period 24x7 ; service notifications can be sent anytime
|
31
|
+
host_notification_period 24x7 ; host notifications can be sent anytime
|
32
|
+
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
|
33
|
+
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
|
34
|
+
service_notification_commands notify-service-by-email ; send service notifications via email
|
35
|
+
host_notification_commands notify-host-by-email ; send host notifications via email
|
36
|
+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
###############################################################################
|
43
|
+
###############################################################################
|
44
|
+
#
|
45
|
+
# HOST TEMPLATES
|
46
|
+
#
|
47
|
+
###############################################################################
|
48
|
+
###############################################################################
|
49
|
+
|
50
|
+
# Generic host definition template - This is NOT a real host, just a template!
|
51
|
+
|
52
|
+
define host{
|
53
|
+
name generic-host ; The name of this host template
|
54
|
+
notifications_enabled 1 ; Host notifications are enabled
|
55
|
+
event_handler_enabled 1 ; Host event handler is enabled
|
56
|
+
flap_detection_enabled 1 ; Flap detection is enabled
|
57
|
+
failure_prediction_enabled 1 ; Failure prediction is enabled
|
58
|
+
process_perf_data 1 ; Process performance data
|
59
|
+
retain_status_information 1 ; Retain status information across program restarts
|
60
|
+
retain_nonstatus_information 1 ; Retain non-status information across program restarts
|
61
|
+
notification_period 24x7 ; Send host notifications at any time
|
62
|
+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
# Linux host definition template - This is NOT a real host, just a template!
|
67
|
+
|
68
|
+
define host{
|
69
|
+
name linux-server ; The name of this host template
|
70
|
+
use generic-host ; This template inherits other values from the generic-host template
|
71
|
+
check_period 24x7 ; By default, Linux hosts are checked round the clock
|
72
|
+
check_interval 5 ; Actively check the host every 5 minutes
|
73
|
+
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
74
|
+
max_check_attempts 10 ; Check each Linux host 10 times (max)
|
75
|
+
check_command check-host-alive ; Default command to check Linux hosts
|
76
|
+
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
|
77
|
+
; Note that the notification_period variable is being overridden from
|
78
|
+
; the value that is inherited from the generic-host template!
|
79
|
+
notification_interval 120 ; Resend notifications every 2 hours
|
80
|
+
notification_options d,u,r ; Only send notifications for specific host states
|
81
|
+
contact_groups admins ; Notifications get sent to the admins by default
|
82
|
+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
# Windows host definition template - This is NOT a real host, just a template!
|
88
|
+
|
89
|
+
define host{
|
90
|
+
name windows-server ; The name of this host template
|
91
|
+
use generic-host ; Inherit default values from the generic-host template
|
92
|
+
check_period 24x7 ; By default, Windows servers are monitored round the clock
|
93
|
+
check_interval 5 ; Actively check the server every 5 minutes
|
94
|
+
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
95
|
+
max_check_attempts 10 ; Check each server 10 times (max)
|
96
|
+
check_command check-host-alive ; Default command to check if servers are "alive"
|
97
|
+
notification_period 24x7 ; Send notification out at any time - day or night
|
98
|
+
notification_interval 30 ; Resend notifications every 30 minutes
|
99
|
+
notification_options d,r ; Only send notifications for specific host states
|
100
|
+
contact_groups admins ; Notifications get sent to the admins by default
|
101
|
+
hostgroups windows-servers ; Host groups that Windows servers should be a member of
|
102
|
+
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
# We define a generic printer template that can be used for most printers we monitor
|
107
|
+
|
108
|
+
define host{
|
109
|
+
name generic-printer ; The name of this host template
|
110
|
+
use generic-host ; Inherit default values from the generic-host template
|
111
|
+
check_period 24x7 ; By default, printers are monitored round the clock
|
112
|
+
check_interval 5 ; Actively check the printer every 5 minutes
|
113
|
+
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
114
|
+
max_check_attempts 10 ; Check each printer 10 times (max)
|
115
|
+
check_command check-host-alive ; Default command to check if printers are "alive"
|
116
|
+
notification_period workhours ; Printers are only used during the workday
|
117
|
+
notification_interval 30 ; Resend notifications every 30 minutes
|
118
|
+
notification_options d,r ; Only send notifications for specific host states
|
119
|
+
contact_groups admins ; Notifications get sent to the admins by default
|
120
|
+
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
# Define a template for switches that we can reuse
|
125
|
+
define host{
|
126
|
+
name generic-switch ; The name of this host template
|
127
|
+
use generic-host ; Inherit default values from the generic-host template
|
128
|
+
check_period 24x7 ; By default, switches are monitored round the clock
|
129
|
+
check_interval 5 ; Switches are checked every 5 minutes
|
130
|
+
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
131
|
+
max_check_attempts 10 ; Check each switch 10 times (max)
|
132
|
+
check_command check-host-alive ; Default command to check if routers are "alive"
|
133
|
+
notification_period 24x7 ; Send notifications at any time
|
134
|
+
notification_interval 30 ; Resend notifications every 30 minutes
|
135
|
+
notification_options d,r ; Only send notifications for specific host states
|
136
|
+
contact_groups admins ; Notifications get sent to the admins by default
|
137
|
+
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
138
|
+
}
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
###############################################################################
|
144
|
+
###############################################################################
|
145
|
+
#
|
146
|
+
# SERVICE TEMPLATES
|
147
|
+
#
|
148
|
+
###############################################################################
|
149
|
+
###############################################################################
|
150
|
+
|
151
|
+
# Generic service definition template - This is NOT a real service, just a template!
|
152
|
+
|
153
|
+
define service{
|
154
|
+
name generic-service ; The 'name' of this service template
|
155
|
+
active_checks_enabled 1 ; Active service checks are enabled
|
156
|
+
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
|
157
|
+
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
|
158
|
+
obsess_over_service 1 ; We should obsess over this service (if necessary)
|
159
|
+
check_freshness 0 ; Default is to NOT check service 'freshness'
|
160
|
+
notifications_enabled 1 ; Service notifications are enabled
|
161
|
+
event_handler_enabled 1 ; Service event handler is enabled
|
162
|
+
flap_detection_enabled 1 ; Flap detection is enabled
|
163
|
+
failure_prediction_enabled 1 ; Failure prediction is enabled
|
164
|
+
process_perf_data 1 ; Process performance data
|
165
|
+
retain_status_information 1 ; Retain status information across program restarts
|
166
|
+
retain_nonstatus_information 1 ; Retain non-status information across program restarts
|
167
|
+
is_volatile 0 ; The service is not volatile
|
168
|
+
check_period 24x7 ; The service can be checked at any time of the day
|
169
|
+
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
|
170
|
+
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
|
171
|
+
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
|
172
|
+
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
|
173
|
+
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
|
174
|
+
notification_interval 60 ; Re-notify about service problems every hour
|
175
|
+
notification_period 24x7 ; Notifications can be sent out at any time
|
176
|
+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
# Local service definition template - This is NOT a real service, just a template!
|
181
|
+
|
182
|
+
define service{
|
183
|
+
name local-service ; The name of this service template
|
184
|
+
use generic-service ; Inherit default values from the generic-service definition
|
185
|
+
max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
|
186
|
+
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
|
187
|
+
retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
|
188
|
+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
|
189
|
+
}
|
190
|
+
|