Empact-deprec 1.99.21
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +170 -0
- data/COPYING +19 -0
- data/LICENSE +339 -0
- data/README +136 -0
- data/THANKS +5 -0
- data/bin/depify +133 -0
- data/docs/ANNOUNCE.deprec2 +47 -0
- data/docs/README.install +88 -0
- data/docs/README.nagios +28 -0
- data/docs/README.rails +20 -0
- data/docs/README.svn +31 -0
- data/docs/ROADMAP.txt +74 -0
- data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
- data/docs/deprec-1.x/notes.txt +12 -0
- data/docs/deprec_banner.gif +0 -0
- data/lib/deprec.rb +8 -0
- data/lib/deprec/capistrano_extensions.rb +378 -0
- data/lib/deprec/recipes.rb +40 -0
- data/lib/deprec/recipes/aoe.rb +117 -0
- data/lib/deprec/recipes/apache.rb +179 -0
- data/lib/deprec/recipes/ar_sendmail.rb +65 -0
- data/lib/deprec/recipes/canonical.rb +57 -0
- data/lib/deprec/recipes/deprec.rb +155 -0
- data/lib/deprec/recipes/deprecated.rb +71 -0
- data/lib/deprec/recipes/example.rb +115 -0
- data/lib/deprec/recipes/git.rb +168 -0
- data/lib/deprec/recipes/gitosis.rb +47 -0
- data/lib/deprec/recipes/god.rb +107 -0
- data/lib/deprec/recipes/heartbeat.rb +138 -0
- data/lib/deprec/recipes/iptables.rb +53 -0
- data/lib/deprec/recipes/logrotate.rb +51 -0
- data/lib/deprec/recipes/lvm.rb +20 -0
- data/lib/deprec/recipes/memcached.rb +102 -0
- data/lib/deprec/recipes/mongrel.rb +209 -0
- data/lib/deprec/recipes/monit.rb +130 -0
- data/lib/deprec/recipes/mysql.rb +115 -0
- data/lib/deprec/recipes/nagios.rb +302 -0
- data/lib/deprec/recipes/network.rb +84 -0
- data/lib/deprec/recipes/nginx.rb +154 -0
- data/lib/deprec/recipes/ntp.rb +96 -0
- data/lib/deprec/recipes/php.rb +99 -0
- data/lib/deprec/recipes/postfix.rb +105 -0
- data/lib/deprec/recipes/rails.rb +302 -0
- data/lib/deprec/recipes/ruby.rb +66 -0
- data/lib/deprec/recipes/sphinx.rb +83 -0
- data/lib/deprec/recipes/ssh.rb +93 -0
- data/lib/deprec/recipes/svn.rb +169 -0
- data/lib/deprec/recipes/swiftiply.rb +108 -0
- data/lib/deprec/recipes/thin.rb +201 -0
- data/lib/deprec/recipes/trac.rb +277 -0
- data/lib/deprec/recipes/ubuntu.rb +20 -0
- data/lib/deprec/recipes/users.rb +90 -0
- data/lib/deprec/recipes/utils.rb +39 -0
- data/lib/deprec/recipes/xen.rb +259 -0
- data/lib/deprec/templates/aoe/aoe-init +55 -0
- data/lib/deprec/templates/aoe/fence_aoemask +351 -0
- data/lib/deprec/templates/apache/httpd-vhost-app.conf.erb +144 -0
- data/lib/deprec/templates/apache/httpd.conf +465 -0
- data/lib/deprec/templates/apache/index.html.erb +37 -0
- data/lib/deprec/templates/apache/master.css +72 -0
- data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
- data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
- data/lib/deprec/templates/coraid/aoe-init +55 -0
- data/lib/deprec/templates/deprec/caprc.erb +14 -0
- data/lib/deprec/templates/god/god-init-script +71 -0
- data/lib/deprec/templates/god/god-notifications +0 -0
- data/lib/deprec/templates/god/god_mongrel.erb +81 -0
- data/lib/deprec/templates/god/god_mysql.erb +50 -0
- data/lib/deprec/templates/god/god_nginx.erb +61 -0
- data/lib/deprec/templates/god/god_thin.erb +80 -0
- data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
- data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
- data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
- data/lib/deprec/templates/iptables/iptables.up.erb +41 -0
- data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
- data/lib/deprec/templates/memcached/memcached-init-script +65 -0
- data/lib/deprec/templates/memcached/memcached.conf.erb +46 -0
- data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster.logrotate.d +14 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
- data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
- data/lib/deprec/templates/monit/monit-init-script +104 -0
- data/lib/deprec/templates/monit/monitrc.erb +227 -0
- data/lib/deprec/templates/monit/nothing +0 -0
- data/lib/deprec/templates/mysql/create_databases.sql +20 -0
- data/lib/deprec/templates/mysql/database.yml.prod +6 -0
- data/lib/deprec/templates/mysql/database.yml.stage +6 -0
- data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
- data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
- data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
- data/lib/deprec/templates/nagios/cgi.cfg.erb +321 -0
- data/lib/deprec/templates/nagios/commands.cfg.erb +240 -0
- data/lib/deprec/templates/nagios/contacts.cfg.erb +75 -0
- data/lib/deprec/templates/nagios/hosts.cfg.erb +70 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -0
- data/lib/deprec/templates/nagios/localhost.cfg.erb +157 -0
- data/lib/deprec/templates/nagios/nagios.cfg.erb +1274 -0
- data/lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb +45 -0
- data/lib/deprec/templates/nagios/nrpe.cfg.erb +208 -0
- data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
- data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
- data/lib/deprec/templates/nagios/services.cfg.erb +7 -0
- data/lib/deprec/templates/nagios/templates.cfg.erb +190 -0
- data/lib/deprec/templates/nagios/timeperiods.cfg.erb +94 -0
- data/lib/deprec/templates/network/hostname.erb +1 -0
- data/lib/deprec/templates/network/hosts.erb +2 -0
- data/lib/deprec/templates/network/interfaces.erb +18 -0
- data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
- data/lib/deprec/templates/nginx/mime.types.erb +70 -0
- data/lib/deprec/templates/nginx/nginx-init-script +62 -0
- data/lib/deprec/templates/nginx/nginx.conf.erb +53 -0
- data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
- data/lib/deprec/templates/nginx/nothing.conf +1 -0
- data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +45 -0
- data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
- data/lib/deprec/templates/postfix/aliases.erb +3 -0
- data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
- data/lib/deprec/templates/postfix/main.cf.erb +41 -0
- data/lib/deprec/templates/postfix/master.cf.erb +77 -0
- data/lib/deprec/templates/rails/database.yml.erb +6 -0
- data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
- data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
- data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
- data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
- data/lib/deprec/templates/swiftiply/swiftiply-init-script +61 -0
- data/lib/deprec/templates/swiftiply/swiftiply.yml.erb +11 -0
- data/lib/deprec/templates/thin/thin-init-script +51 -0
- data/lib/deprec/templates/thin/thin.yml.erb +11 -0
- data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
- data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
- data/lib/deprec/templates/trac/trac.ini.erb +169 -0
- data/lib/deprec/templates/trac/trac_deprec.png +0 -0
- data/lib/deprec/templates/trac/tracd-init.erb +43 -0
- data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
- data/lib/deprec/templates/xen/15-disable-hwclock +40 -0
- data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
- data/lib/deprec/templates/xen/xen-tools.conf.erb +220 -0
- data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
- data/lib/deprec/templates/xen/xend-init.erb +69 -0
- data/lib/deprec/templates/xen/xendomains.erb +137 -0
- data/lib/deprec/templates/xen/xm.tmpl.erb +85 -0
- data/lib/vmbuilder_plugins/all.rb +20 -0
- data/lib/vmbuilder_plugins/apt.rb +93 -0
- data/lib/vmbuilder_plugins/emerge.rb +76 -0
- data/lib/vmbuilder_plugins/gem.rb +90 -0
- data/lib/vmbuilder_plugins/std.rb +203 -0
- metadata +207 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
<VirtualHost *:80>
|
2
|
+
ServerName <%= domain %>
|
3
|
+
DocumentRoot "/usr/local/nagios/share"
|
4
|
+
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
|
5
|
+
Alias /nagios "/usr/local/nagios/share"
|
6
|
+
|
7
|
+
<Directory "/usr/local/nagios/sbin">
|
8
|
+
# SSLRequireSSL
|
9
|
+
Options ExecCGI
|
10
|
+
AllowOverride None
|
11
|
+
Order allow,deny
|
12
|
+
Allow from all
|
13
|
+
# Order deny,allow
|
14
|
+
# Deny from all
|
15
|
+
# Allow from 127.0.0.1
|
16
|
+
AuthName "Nagios Access"
|
17
|
+
AuthType Basic
|
18
|
+
AuthUserFile /usr/local/nagios/etc/htpasswd.users
|
19
|
+
Require valid-user
|
20
|
+
</Directory>
|
21
|
+
|
22
|
+
<Directory "/usr/local/nagios/share">
|
23
|
+
# SSLRequireSSL
|
24
|
+
Options None
|
25
|
+
AllowOverride None
|
26
|
+
Order allow,deny
|
27
|
+
Allow from all
|
28
|
+
# Order deny,allow
|
29
|
+
# Deny from all
|
30
|
+
# Allow from 127.0.0.1
|
31
|
+
AuthName "Nagios Access"
|
32
|
+
AuthType Basic
|
33
|
+
AuthUserFile /usr/local/nagios/etc/htpasswd.users
|
34
|
+
Require valid-user
|
35
|
+
</Directory>
|
36
|
+
|
37
|
+
# Deflate
|
38
|
+
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
|
39
|
+
BrowserMatch ^Mozilla/4 gzip-only-text/html
|
40
|
+
BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
41
|
+
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
42
|
+
|
43
|
+
ErrorLog logs/nagios.sct-error_log
|
44
|
+
CustomLog logs/nagios.sct-access_log combined
|
45
|
+
</VirtualHost>
|
@@ -0,0 +1,208 @@
|
|
1
|
+
#############################################################################
|
2
|
+
# Sample NRPE Config File
|
3
|
+
# Written by: Ethan Galstad (nagios@nagios.org)
|
4
|
+
#
|
5
|
+
# Last Modified: 03-09-2007
|
6
|
+
#
|
7
|
+
# NOTES:
|
8
|
+
# This is a sample configuration file for the NRPE daemon. It needs to be
|
9
|
+
# located on the remote host that is running the NRPE daemon, not the host
|
10
|
+
# from which the check_nrpe client is being executed.
|
11
|
+
#############################################################################
|
12
|
+
|
13
|
+
|
14
|
+
# PID FILE
|
15
|
+
# The name of the file in which the NRPE daemon should write it's process ID
|
16
|
+
# number. The file is only written if the NRPE daemon is started by the root
|
17
|
+
# user and is running in standalone mode.
|
18
|
+
|
19
|
+
pid_file=/var/run/nrpe.pid
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
# PORT NUMBER
|
24
|
+
# Port number we should wait for connections on.
|
25
|
+
# NOTE: This must be a non-priviledged port (i.e. > 1024).
|
26
|
+
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
27
|
+
|
28
|
+
server_port=5666
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# SERVER ADDRESS
|
33
|
+
# Address that nrpe should bind to in case there are more than one interface
|
34
|
+
# and you do not want nrpe to bind on all interfaces.
|
35
|
+
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
36
|
+
|
37
|
+
#server_address=127.0.0.1
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# NRPE USER
|
42
|
+
# This determines the effective user that the NRPE daemon should run as.
|
43
|
+
# You can either supply a username or a UID.
|
44
|
+
#
|
45
|
+
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
46
|
+
|
47
|
+
nrpe_user=nagios
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
# NRPE GROUP
|
52
|
+
# This determines the effective group that the NRPE daemon should run as.
|
53
|
+
# You can either supply a group name or a GID.
|
54
|
+
#
|
55
|
+
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
56
|
+
|
57
|
+
nrpe_group=nagios
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# ALLOWED HOST ADDRESSES
|
62
|
+
# This is an optional comma-delimited list of IP address or hostnames
|
63
|
+
# that are allowed to talk to the NRPE daemon.
|
64
|
+
#
|
65
|
+
# Note: The daemon only does rudimentary checking of the client's IP
|
66
|
+
# address. I would highly recommend adding entries in your /etc/hosts.allow
|
67
|
+
# file to allow only the specified host to connect to the port
|
68
|
+
# you are running this daemon on.
|
69
|
+
#
|
70
|
+
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
71
|
+
|
72
|
+
allowed_hosts=127.0.0.1
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
# COMMAND ARGUMENT PROCESSING
|
77
|
+
# This option determines whether or not the NRPE daemon will allow clients
|
78
|
+
# to specify arguments to commands that are executed. This option only works
|
79
|
+
# if the daemon was configured with the --enable-command-args configure script
|
80
|
+
# option.
|
81
|
+
#
|
82
|
+
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
|
83
|
+
# Read the SECURITY file for information on some of the security implications
|
84
|
+
# of enabling this variable.
|
85
|
+
#
|
86
|
+
# Values: 0=do not allow arguments, 1=allow command arguments
|
87
|
+
|
88
|
+
dont_blame_nrpe=0
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
# COMMAND PREFIX
|
93
|
+
# This option allows you to prefix all commands with a user-defined string.
|
94
|
+
# A space is automatically added between the specified prefix string and the
|
95
|
+
# command line from the command definition.
|
96
|
+
#
|
97
|
+
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
|
98
|
+
# Usage scenario:
|
99
|
+
# Execute restricted commmands using sudo. For this to work, you need to add
|
100
|
+
# the nagios user to your /etc/sudoers. An example entry for alllowing
|
101
|
+
# execution of the plugins from might be:
|
102
|
+
#
|
103
|
+
# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
|
104
|
+
#
|
105
|
+
# This lets the nagios user run all commands in that directory (and only them)
|
106
|
+
# without asking for a password. If you do this, make sure you don't give
|
107
|
+
# random users write access to that directory or its contents!
|
108
|
+
|
109
|
+
# command_prefix=/usr/bin/sudo
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
# DEBUGGING OPTION
|
114
|
+
# This option determines whether or not debugging messages are logged to the
|
115
|
+
# syslog facility.
|
116
|
+
# Values: 0=debugging off, 1=debugging on
|
117
|
+
|
118
|
+
debug=0
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
# COMMAND TIMEOUT
|
123
|
+
# This specifies the maximum number of seconds that the NRPE daemon will
|
124
|
+
# allow plugins to finish executing before killing them off.
|
125
|
+
|
126
|
+
command_timeout=60
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
# CONNECTION TIMEOUT
|
131
|
+
# This specifies the maximum number of seconds that the NRPE daemon will
|
132
|
+
# wait for a connection to be established before exiting. This is sometimes
|
133
|
+
# seen where a network problem stops the SSL being established even though
|
134
|
+
# all network sessions are connected. This causes the nrpe daemons to
|
135
|
+
# accumulate, eating system resources. Do not set this too low.
|
136
|
+
|
137
|
+
connection_timeout=300
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
# WEEK RANDOM SEED OPTION
|
142
|
+
# This directive allows you to use SSL even if your system does not have
|
143
|
+
# a /dev/random or /dev/urandom (on purpose or because the necessary patches
|
144
|
+
# were not applied). The random number generator will be seeded from a file
|
145
|
+
# which is either a file pointed to by the environment valiable $RANDFILE
|
146
|
+
# or $HOME/.rnd. If neither exists, the pseudo random number generator will
|
147
|
+
# be initialized and a warning will be issued.
|
148
|
+
# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness
|
149
|
+
|
150
|
+
#allow_weak_random_seed=1
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
# INCLUDE CONFIG FILE
|
155
|
+
# This directive allows you to include definitions from an external config file.
|
156
|
+
|
157
|
+
#include=<somefile.cfg>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
# INCLUDE CONFIG DIRECTORY
|
162
|
+
# This directive allows you to include definitions from config files (with a
|
163
|
+
# .cfg extension) in one or more directories (with recursion).
|
164
|
+
|
165
|
+
#include_dir=<somedirectory>
|
166
|
+
#include_dir=<someotherdirectory>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
# COMMAND DEFINITIONS
|
171
|
+
# Command definitions that this daemon will run. Definitions
|
172
|
+
# are in the following format:
|
173
|
+
#
|
174
|
+
# command[<command_name>]=<command_line>
|
175
|
+
#
|
176
|
+
# When the daemon receives a request to return the results of <command_name>
|
177
|
+
# it will execute the command specified by the <command_line> argument.
|
178
|
+
#
|
179
|
+
# Unlike Nagios, the command line cannot contain macros - it must be
|
180
|
+
# typed exactly as it should be executed.
|
181
|
+
#
|
182
|
+
# Note: Any plugins that are used in the command lines must reside
|
183
|
+
# on the machine that this daemon is running on! The examples below
|
184
|
+
# assume that you have plugins installed in a /usr/local/nagios/libexec
|
185
|
+
# directory. Also note that you will have to modify the definitions below
|
186
|
+
# to match the argument format the plugins expect. Remember, these are
|
187
|
+
# examples only!
|
188
|
+
|
189
|
+
|
190
|
+
# The following examples use hardcoded command arguments...
|
191
|
+
|
192
|
+
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
|
193
|
+
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
|
194
|
+
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
|
195
|
+
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
|
196
|
+
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
|
197
|
+
|
198
|
+
|
199
|
+
# The following examples allow user-supplied arguments and can
|
200
|
+
# only be used if the NRPE daemon was compiled with support for
|
201
|
+
# command arguments *AND* the dont_blame_nrpe directive in this
|
202
|
+
# config file is set to '1'. This poses a potential security risk, so
|
203
|
+
# make sure you read the SECURITY file before doing this.
|
204
|
+
|
205
|
+
#command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
|
206
|
+
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
|
207
|
+
#command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
|
208
|
+
#command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# default: on
|
2
|
+
# description: NRPE (Nagios Remote Plugin Executor)
|
3
|
+
service nrpe
|
4
|
+
{
|
5
|
+
flags = REUSE
|
6
|
+
socket_type = stream
|
7
|
+
port = 5666
|
8
|
+
wait = no
|
9
|
+
user = nagios
|
10
|
+
group = nagios
|
11
|
+
server = /usr/local/nagios/bin/nrpe
|
12
|
+
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
|
13
|
+
log_on_failure += USERID
|
14
|
+
disable = no
|
15
|
+
only_from = 127.0.0.1 <%= nagios_host %>
|
16
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
###########################################################################
|
2
|
+
#
|
3
|
+
# RESOURCE.CFG - Sample Resource File for Nagios 3.0b7
|
4
|
+
#
|
5
|
+
# Last Modified: 09-10-2003
|
6
|
+
#
|
7
|
+
# You can define $USERx$ macros in this file, which can in turn be used
|
8
|
+
# in command definitions in your host config file(s). $USERx$ macros are
|
9
|
+
# useful for storing sensitive information such as usernames, passwords,
|
10
|
+
# etc. They are also handy for specifying the path to plugins and
|
11
|
+
# event handlers - if you decide to move the plugins or event handlers to
|
12
|
+
# a different directory in the future, you can just update one or two
|
13
|
+
# $USERx$ macros, instead of modifying a lot of command definitions.
|
14
|
+
#
|
15
|
+
# The CGIs will not attempt to read the contents of resource files, so
|
16
|
+
# you can set restrictive permissions (600 or 660) on them.
|
17
|
+
#
|
18
|
+
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
|
19
|
+
#
|
20
|
+
# Resource files may also be used to store configuration directives for
|
21
|
+
# external data sources like MySQL...
|
22
|
+
#
|
23
|
+
###########################################################################
|
24
|
+
|
25
|
+
# Sets $USER1$ to be the path to the plugins
|
26
|
+
$USER1$=/usr/local/nagios/libexec
|
27
|
+
|
28
|
+
# Sets $USER2$ to be the path to event handlers
|
29
|
+
#$USER2$=/usr/local/nagios/libexec/eventhandlers
|
30
|
+
|
31
|
+
# Store some usernames and passwords (hidden from the CGIs)
|
32
|
+
#$USER3$=someuser
|
33
|
+
#$USER4$=somepassword
|
34
|
+
|
@@ -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
|
+
|