Empact-deprec 1.99.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/CHANGELOG +170 -0
  2. data/COPYING +19 -0
  3. data/LICENSE +339 -0
  4. data/README +136 -0
  5. data/THANKS +5 -0
  6. data/bin/depify +133 -0
  7. data/docs/ANNOUNCE.deprec2 +47 -0
  8. data/docs/README.install +88 -0
  9. data/docs/README.nagios +28 -0
  10. data/docs/README.rails +20 -0
  11. data/docs/README.svn +31 -0
  12. data/docs/ROADMAP.txt +74 -0
  13. data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
  14. data/docs/deprec-1.x/notes.txt +12 -0
  15. data/docs/deprec_banner.gif +0 -0
  16. data/lib/deprec.rb +8 -0
  17. data/lib/deprec/capistrano_extensions.rb +378 -0
  18. data/lib/deprec/recipes.rb +40 -0
  19. data/lib/deprec/recipes/aoe.rb +117 -0
  20. data/lib/deprec/recipes/apache.rb +179 -0
  21. data/lib/deprec/recipes/ar_sendmail.rb +65 -0
  22. data/lib/deprec/recipes/canonical.rb +57 -0
  23. data/lib/deprec/recipes/deprec.rb +155 -0
  24. data/lib/deprec/recipes/deprecated.rb +71 -0
  25. data/lib/deprec/recipes/example.rb +115 -0
  26. data/lib/deprec/recipes/git.rb +168 -0
  27. data/lib/deprec/recipes/gitosis.rb +47 -0
  28. data/lib/deprec/recipes/god.rb +107 -0
  29. data/lib/deprec/recipes/heartbeat.rb +138 -0
  30. data/lib/deprec/recipes/iptables.rb +53 -0
  31. data/lib/deprec/recipes/logrotate.rb +51 -0
  32. data/lib/deprec/recipes/lvm.rb +20 -0
  33. data/lib/deprec/recipes/memcached.rb +102 -0
  34. data/lib/deprec/recipes/mongrel.rb +209 -0
  35. data/lib/deprec/recipes/monit.rb +130 -0
  36. data/lib/deprec/recipes/mysql.rb +115 -0
  37. data/lib/deprec/recipes/nagios.rb +302 -0
  38. data/lib/deprec/recipes/network.rb +84 -0
  39. data/lib/deprec/recipes/nginx.rb +154 -0
  40. data/lib/deprec/recipes/ntp.rb +96 -0
  41. data/lib/deprec/recipes/php.rb +99 -0
  42. data/lib/deprec/recipes/postfix.rb +105 -0
  43. data/lib/deprec/recipes/rails.rb +302 -0
  44. data/lib/deprec/recipes/ruby.rb +66 -0
  45. data/lib/deprec/recipes/sphinx.rb +83 -0
  46. data/lib/deprec/recipes/ssh.rb +93 -0
  47. data/lib/deprec/recipes/svn.rb +169 -0
  48. data/lib/deprec/recipes/swiftiply.rb +108 -0
  49. data/lib/deprec/recipes/thin.rb +201 -0
  50. data/lib/deprec/recipes/trac.rb +277 -0
  51. data/lib/deprec/recipes/ubuntu.rb +20 -0
  52. data/lib/deprec/recipes/users.rb +90 -0
  53. data/lib/deprec/recipes/utils.rb +39 -0
  54. data/lib/deprec/recipes/xen.rb +259 -0
  55. data/lib/deprec/templates/aoe/aoe-init +55 -0
  56. data/lib/deprec/templates/aoe/fence_aoemask +351 -0
  57. data/lib/deprec/templates/apache/httpd-vhost-app.conf.erb +144 -0
  58. data/lib/deprec/templates/apache/httpd.conf +465 -0
  59. data/lib/deprec/templates/apache/index.html.erb +37 -0
  60. data/lib/deprec/templates/apache/master.css +72 -0
  61. data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
  62. data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
  63. data/lib/deprec/templates/coraid/aoe-init +55 -0
  64. data/lib/deprec/templates/deprec/caprc.erb +14 -0
  65. data/lib/deprec/templates/god/god-init-script +71 -0
  66. data/lib/deprec/templates/god/god-notifications +0 -0
  67. data/lib/deprec/templates/god/god_mongrel.erb +81 -0
  68. data/lib/deprec/templates/god/god_mysql.erb +50 -0
  69. data/lib/deprec/templates/god/god_nginx.erb +61 -0
  70. data/lib/deprec/templates/god/god_thin.erb +80 -0
  71. data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
  72. data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
  73. data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
  74. data/lib/deprec/templates/iptables/iptables.up.erb +41 -0
  75. data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
  76. data/lib/deprec/templates/memcached/memcached-init-script +65 -0
  77. data/lib/deprec/templates/memcached/memcached.conf.erb +46 -0
  78. data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
  79. data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
  80. data/lib/deprec/templates/mongrel/mongrel_cluster.logrotate.d +14 -0
  81. data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
  82. data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
  83. data/lib/deprec/templates/monit/monit-init-script +104 -0
  84. data/lib/deprec/templates/monit/monitrc.erb +227 -0
  85. data/lib/deprec/templates/monit/nothing +0 -0
  86. data/lib/deprec/templates/mysql/create_databases.sql +20 -0
  87. data/lib/deprec/templates/mysql/database.yml.prod +6 -0
  88. data/lib/deprec/templates/mysql/database.yml.stage +6 -0
  89. data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
  90. data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
  91. data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
  92. data/lib/deprec/templates/nagios/cgi.cfg.erb +321 -0
  93. data/lib/deprec/templates/nagios/commands.cfg.erb +240 -0
  94. data/lib/deprec/templates/nagios/contacts.cfg.erb +75 -0
  95. data/lib/deprec/templates/nagios/hosts.cfg.erb +70 -0
  96. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  97. data/lib/deprec/templates/nagios/localhost.cfg.erb +157 -0
  98. data/lib/deprec/templates/nagios/nagios.cfg.erb +1274 -0
  99. data/lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb +45 -0
  100. data/lib/deprec/templates/nagios/nrpe.cfg.erb +208 -0
  101. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
  102. data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
  103. data/lib/deprec/templates/nagios/services.cfg.erb +7 -0
  104. data/lib/deprec/templates/nagios/templates.cfg.erb +190 -0
  105. data/lib/deprec/templates/nagios/timeperiods.cfg.erb +94 -0
  106. data/lib/deprec/templates/network/hostname.erb +1 -0
  107. data/lib/deprec/templates/network/hosts.erb +2 -0
  108. data/lib/deprec/templates/network/interfaces.erb +18 -0
  109. data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
  110. data/lib/deprec/templates/nginx/mime.types.erb +70 -0
  111. data/lib/deprec/templates/nginx/nginx-init-script +62 -0
  112. data/lib/deprec/templates/nginx/nginx.conf.erb +53 -0
  113. data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
  114. data/lib/deprec/templates/nginx/nothing.conf +1 -0
  115. data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +45 -0
  116. data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
  117. data/lib/deprec/templates/postfix/aliases.erb +3 -0
  118. data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
  119. data/lib/deprec/templates/postfix/main.cf.erb +41 -0
  120. data/lib/deprec/templates/postfix/master.cf.erb +77 -0
  121. data/lib/deprec/templates/rails/database.yml.erb +6 -0
  122. data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
  123. data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
  124. data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
  125. data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
  126. data/lib/deprec/templates/swiftiply/swiftiply-init-script +61 -0
  127. data/lib/deprec/templates/swiftiply/swiftiply.yml.erb +11 -0
  128. data/lib/deprec/templates/thin/thin-init-script +51 -0
  129. data/lib/deprec/templates/thin/thin.yml.erb +11 -0
  130. data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
  131. data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
  132. data/lib/deprec/templates/trac/trac.ini.erb +169 -0
  133. data/lib/deprec/templates/trac/trac_deprec.png +0 -0
  134. data/lib/deprec/templates/trac/tracd-init.erb +43 -0
  135. data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
  136. data/lib/deprec/templates/xen/15-disable-hwclock +40 -0
  137. data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
  138. data/lib/deprec/templates/xen/xen-tools.conf.erb +220 -0
  139. data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
  140. data/lib/deprec/templates/xen/xend-init.erb +69 -0
  141. data/lib/deprec/templates/xen/xendomains.erb +137 -0
  142. data/lib/deprec/templates/xen/xm.tmpl.erb +85 -0
  143. data/lib/vmbuilder_plugins/all.rb +20 -0
  144. data/lib/vmbuilder_plugins/apt.rb +93 -0
  145. data/lib/vmbuilder_plugins/emerge.rb +76 -0
  146. data/lib/vmbuilder_plugins/gem.rb +90 -0
  147. data/lib/vmbuilder_plugins/std.rb +203 -0
  148. metadata +207 -0
@@ -0,0 +1,321 @@
1
+ #################################################################
2
+ #
3
+ # CGI.CFG - Sample CGI Configuration File for Nagios 3.0b7
4
+ #
5
+ # Last Modified: 10-07-2007
6
+ #
7
+ #################################################################
8
+
9
+
10
+ # MAIN CONFIGURATION FILE
11
+ # This tells the CGIs where to find your main configuration file.
12
+ # The CGIs will read the main and host config files for any other
13
+ # data they might need.
14
+
15
+ main_config_file=/usr/local/nagios/etc/nagios.cfg
16
+
17
+
18
+
19
+ # PHYSICAL HTML PATH
20
+ # This is the path where the HTML files for Nagios reside. This
21
+ # value is used to locate the logo images needed by the statusmap
22
+ # and statuswrl CGIs.
23
+
24
+ physical_html_path=/usr/local/nagios/share
25
+
26
+
27
+
28
+ # URL HTML PATH
29
+ # This is the path portion of the URL that corresponds to the
30
+ # physical location of the Nagios HTML files (as defined above).
31
+ # This value is used by the CGIs to locate the online documentation
32
+ # and graphics. If you access the Nagios pages with an URL like
33
+ # http://www.myhost.com/nagios, this value should be '/nagios'
34
+ # (without the quotes).
35
+
36
+ url_html_path=/nagios
37
+
38
+
39
+
40
+ # CONTEXT-SENSITIVE HELP
41
+ # This option determines whether or not a context-sensitive
42
+ # help icon will be displayed for most of the CGIs.
43
+ # Values: 0 = disables context-sensitive help
44
+ # 1 = enables context-sensitive help
45
+
46
+ show_context_help=0
47
+
48
+
49
+
50
+ # PENDING STATES OPTION
51
+ # This option determines what states should be displayed in the web
52
+ # interface for hosts/services that have not yet been checked.
53
+ # Values: 0 = leave hosts/services that have not been check yet in their original state
54
+ # 1 = mark hosts/services that have not been checked yet as PENDING
55
+
56
+ use_pending_states=1
57
+
58
+
59
+
60
+
61
+ # AUTHENTICATION USAGE
62
+ # This option controls whether or not the CGIs will use any
63
+ # authentication when displaying host and service information, as
64
+ # well as committing commands to Nagios for processing.
65
+ #
66
+ # Read the HTML documentation to learn how the authorization works!
67
+ #
68
+ # NOTE: It is a really *bad* idea to disable authorization, unless
69
+ # you plan on removing the command CGI (cmd.cgi)! Failure to do
70
+ # so will leave you wide open to kiddies messing with Nagios and
71
+ # possibly hitting you with a denial of service attack by filling up
72
+ # your drive by continuously writing to your command file!
73
+ #
74
+ # Setting this value to 0 will cause the CGIs to *not* use
75
+ # authentication (bad idea), while any other value will make them
76
+ # use the authentication functions (the default).
77
+
78
+ use_authentication=1
79
+
80
+
81
+
82
+ # DEFAULT USER
83
+ # Setting this variable will define a default user name that can
84
+ # access pages without authentication. This allows people within a
85
+ # secure domain (i.e., behind a firewall) to see the current status
86
+ # without authenticating. You may want to use this to avoid basic
87
+ # authentication if you are not using a secure server since basic
88
+ # authentication transmits passwords in the clear.
89
+ #
90
+ # Important: Do not define a default username unless you are
91
+ # running a secure web server and are sure that everyone who has
92
+ # access to the CGIs has been authenticated in some manner! If you
93
+ # define this variable, anyone who has not authenticated to the web
94
+ # server will inherit all rights you assign to this user!
95
+
96
+ #default_user_name=guest
97
+
98
+
99
+
100
+ # SYSTEM/PROCESS INFORMATION ACCESS
101
+ # This option is a comma-delimited list of all usernames that
102
+ # have access to viewing the Nagios process information as
103
+ # provided by the Extended Information CGI (extinfo.cgi). By
104
+ # default, *no one* has access to this unless you choose to
105
+ # not use authorization. You may use an asterisk (*) to
106
+ # authorize any user who has authenticated to the web server.
107
+
108
+ authorized_for_system_information=nagiosadmin
109
+
110
+
111
+
112
+ # CONFIGURATION INFORMATION ACCESS
113
+ # This option is a comma-delimited list of all usernames that
114
+ # can view ALL configuration information (hosts, commands, etc).
115
+ # By default, users can only view configuration information
116
+ # for the hosts and services they are contacts for. You may use
117
+ # an asterisk (*) to authorize any user who has authenticated
118
+ # to the web server.
119
+
120
+ authorized_for_configuration_information=nagiosadmin
121
+
122
+
123
+
124
+ # SYSTEM/PROCESS COMMAND ACCESS
125
+ # This option is a comma-delimited list of all usernames that
126
+ # can issue shutdown and restart commands to Nagios via the
127
+ # command CGI (cmd.cgi). Users in this list can also change
128
+ # the program mode to active or standby. By default, *no one*
129
+ # has access to this unless you choose to not use authorization.
130
+ # You may use an asterisk (*) to authorize any user who has
131
+ # authenticated to the web server.
132
+
133
+ authorized_for_system_commands=nagiosadmin
134
+
135
+
136
+
137
+ # GLOBAL HOST/SERVICE VIEW ACCESS
138
+ # These two options are comma-delimited lists of all usernames that
139
+ # can view information for all hosts and services that are being
140
+ # monitored. By default, users can only view information
141
+ # for hosts or services that they are contacts for (unless you
142
+ # you choose to not use authorization). You may use an asterisk (*)
143
+ # to authorize any user who has authenticated to the web server.
144
+
145
+
146
+ authorized_for_all_services=nagiosadmin
147
+ authorized_for_all_hosts=nagiosadmin
148
+
149
+
150
+
151
+ # GLOBAL HOST/SERVICE COMMAND ACCESS
152
+ # These two options are comma-delimited lists of all usernames that
153
+ # can issue host or service related commands via the command
154
+ # CGI (cmd.cgi) for all hosts and services that are being monitored.
155
+ # By default, users can only issue commands for hosts or services
156
+ # that they are contacts for (unless you you choose to not use
157
+ # authorization). You may use an asterisk (*) to authorize any
158
+ # user who has authenticated to the web server.
159
+
160
+ authorized_for_all_service_commands=nagiosadmin
161
+ authorized_for_all_host_commands=nagiosadmin
162
+
163
+
164
+
165
+
166
+ # STATUSMAP BACKGROUND IMAGE
167
+ # This option allows you to specify an image to be used as a
168
+ # background in the statusmap CGI. It is assumed that the image
169
+ # resides in the HTML images path (i.e. /usr/local/nagios/share/images).
170
+ # This path is automatically determined by appending "/images"
171
+ # to the path specified by the 'physical_html_path' directive.
172
+ # Note: The image file may be in GIF, PNG, JPEG, or GD2 format.
173
+ # However, I recommend that you convert your image to GD2 format
174
+ # (uncompressed), as this will cause less CPU load when the CGI
175
+ # generates the image.
176
+
177
+ #statusmap_background_image=smbackground.gd2
178
+
179
+
180
+
181
+ # DEFAULT STATUSMAP LAYOUT METHOD
182
+ # This option allows you to specify the default layout method
183
+ # the statusmap CGI should use for drawing hosts. If you do
184
+ # not use this option, the default is to use user-defined
185
+ # coordinates. Valid options are as follows:
186
+ # 0 = User-defined coordinates
187
+ # 1 = Depth layers
188
+ # 2 = Collapsed tree
189
+ # 3 = Balanced tree
190
+ # 4 = Circular
191
+ # 5 = Circular (Marked Up)
192
+
193
+ default_statusmap_layout=5
194
+
195
+
196
+
197
+ # DEFAULT STATUSWRL LAYOUT METHOD
198
+ # This option allows you to specify the default layout method
199
+ # the statuswrl (VRML) CGI should use for drawing hosts. If you
200
+ # do not use this option, the default is to use user-defined
201
+ # coordinates. Valid options are as follows:
202
+ # 0 = User-defined coordinates
203
+ # 2 = Collapsed tree
204
+ # 3 = Balanced tree
205
+ # 4 = Circular
206
+
207
+ default_statuswrl_layout=4
208
+
209
+
210
+
211
+ # STATUSWRL INCLUDE
212
+ # This option allows you to include your own objects in the
213
+ # generated VRML world. It is assumed that the file
214
+ # resides in the HTML path (i.e. /usr/local/nagios/share).
215
+
216
+ #statuswrl_include=myworld.wrl
217
+
218
+
219
+
220
+ # PING SYNTAX
221
+ # This option determines what syntax should be used when
222
+ # attempting to ping a host from the WAP interface (using
223
+ # the statuswml CGI. You must include the full path to
224
+ # the ping binary, along with all required options. The
225
+ # $HOSTADDRESS$ macro is substituted with the address of
226
+ # the host before the command is executed.
227
+ # Please note that the syntax for the ping binary is
228
+ # notorious for being different on virtually ever *NIX
229
+ # OS and distribution, so you may have to tweak this to
230
+ # work on your system.
231
+
232
+ ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
233
+
234
+
235
+
236
+ # REFRESH RATE
237
+ # This option allows you to specify the refresh rate in seconds
238
+ # of various CGIs (status, statusmap, extinfo, and outages).
239
+
240
+ refresh_rate=90
241
+
242
+
243
+
244
+ # ESCAPE HTML TAGS
245
+ # This option determines whether HTML tags in host and service
246
+ # status output is escaped in the web interface. If enabled,
247
+ # your plugin output will not be able to contain clickable links.
248
+
249
+ escape_html_tags=1
250
+
251
+
252
+
253
+
254
+ # SOUND OPTIONS
255
+ # These options allow you to specify an optional audio file
256
+ # that should be played in your browser window when there are
257
+ # problems on the network. The audio files are used only in
258
+ # the status CGI. Only the sound for the most critical problem
259
+ # will be played. Order of importance (higher to lower) is as
260
+ # follows: unreachable hosts, down hosts, critical services,
261
+ # warning services, and unknown services. If there are no
262
+ # visible problems, the sound file optionally specified by
263
+ # 'normal_sound' variable will be played.
264
+ #
265
+ #
266
+ # <varname>=<sound_file>
267
+ #
268
+ # Note: All audio files must be placed in the /media subdirectory
269
+ # under the HTML path (i.e. /usr/local/nagios/share/media/).
270
+
271
+ #host_unreachable_sound=hostdown.wav
272
+ #host_down_sound=hostdown.wav
273
+ #service_critical_sound=critical.wav
274
+ #service_warning_sound=warning.wav
275
+ #service_unknown_sound=warning.wav
276
+ #normal_sound=noproblem.wav
277
+
278
+
279
+
280
+ # URL TARGET FRAMES
281
+ # These options determine the target frames in which notes and
282
+ # action URLs will open.
283
+
284
+ action_url_target=_blank
285
+ notes_url_target=_blank
286
+
287
+
288
+
289
+
290
+ # LOCK AUTHOR NAMES OPTION
291
+ # This option determines whether users can change the author name
292
+ # when submitting comments, scheduling downtime. If disabled, the
293
+ # author names will be locked into their contact name, as defined in Nagios.
294
+ # Values: 0 = allow editing author names
295
+ # 1 = lock author names (disallow editing)
296
+
297
+ lock_author_names=1
298
+
299
+
300
+
301
+
302
+ # SPLUNK INTEGRATION OPTIONS
303
+ # These options allow you to enable integration with Splunk
304
+ # in the web interface. If enabled, you'll be presented with
305
+ # "Splunk It" links in various places in the CGIs (log file,
306
+ # alert history, host/service detail, etc). Useful if you're
307
+ # trying to research why a particular problem occurred.
308
+ # For more information on Splunk, visit http://www.splunk.com/
309
+
310
+ # This option determines whether the Splunk integration is enabled
311
+ # Values: 0 = disable Splunk integration
312
+ # 1 = enable Splunk integration
313
+
314
+ #enable_splunk_integration=1
315
+
316
+
317
+ # This option should be the URL used to access your instance of Splunk
318
+
319
+ #splunk_url=http://127.0.0.1:8000/
320
+
321
+
@@ -0,0 +1,240 @@
1
+ ###############################################################################
2
+ # COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS 3.0b7
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" | /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$" | /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
+