deprec 2.0.15 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/CHANGELOG +7 -1
  2. data/lib/deprec/capistrano_extensions.rb +1 -1
  3. data/lib/deprec/recipes/collectd.rb +60 -79
  4. data/lib/deprec/recipes/haproxy.rb +105 -0
  5. data/lib/deprec/recipes/nagios.rb +90 -72
  6. data/lib/deprec/recipes/postfix.rb +1 -1
  7. data/lib/deprec/recipes/ssh.rb +1 -1
  8. data/lib/deprec/recipes/syslog.rb +63 -0
  9. data/lib/deprec/recipes/utils.rb +1 -1
  10. data/lib/deprec/recipes_minus_rails.rb +2 -0
  11. data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
  12. data/lib/deprec/templates/nagios/{cgi.cfg → cgi.cfg.erb} +27 -2
  13. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  14. data/lib/deprec/templates/nagios/{nagios.cfg → nagios.cfg.erb} +35 -7
  15. data/lib/deprec/templates/nagios/nrpe.cfg.erb +15 -3
  16. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +1 -1
  17. data/lib/deprec/templates/nagios/objects/{commands.cfg → commands.cfg.erb} +27 -2
  18. data/lib/deprec/templates/nagios/objects/{contacts.cfg → contacts.cfg.erb} +23 -0
  19. data/lib/deprec/templates/nagios/{hosts.cfg.erb → objects/hosts.cfg.erb} +30 -54
  20. data/lib/deprec/templates/{old → nagios/objects}/localhost.cfg.erb +0 -41
  21. data/lib/deprec/templates/nagios/{services.cfg.erb → objects/services.cfg.erb} +88 -2
  22. data/lib/deprec/templates/{old → nagios/objects}/timeperiods.cfg.erb +0 -0
  23. data/lib/deprec/templates/{old → nagios}/resource.cfg.erb +1 -1
  24. data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
  25. data/lib/deprec/templates/syslog/syslogd.erb +13 -0
  26. metadata +16 -22
  27. data/lib/deprec/templates/nagios/objects/localhost.cfg +0 -157
  28. data/lib/deprec/templates/nagios/objects/templates.cfg +0 -190
  29. data/lib/deprec/templates/nagios/objects/timeperiods.cfg +0 -94
  30. data/lib/deprec/templates/nagios/resource.cfg +0 -34
  31. data/lib/deprec/templates/nagios_config.tgz +0 -0
  32. data/lib/deprec/templates/old/apache_vhost.erb +0 -45
  33. data/lib/deprec/templates/old/cgi.cfg.erb +0 -321
  34. data/lib/deprec/templates/old/commands.cfg.erb +0 -240
  35. data/lib/deprec/templates/old/contacts.cfg.erb +0 -57
  36. data/lib/deprec/templates/old/htpasswd.users +0 -1
  37. data/lib/deprec/templates/old/templates.cfg.erb +0 -9
@@ -1,94 +0,0 @@
1
- ###############################################################################
2
- # TIMEPERIODS.CFG - SAMPLE TIMEPERIOD DEFINITIONS
3
- #
4
- # Last Modified: 05-31-2007
5
- #
6
- # NOTES: This config file provides you with some example timeperiod definitions
7
- # that you can reference in host, service, contact, and dependency
8
- # definitions.
9
- #
10
- # You don't need to keep timeperiods in a separate file from your other
11
- # object definitions. This has been done just to make things easier to
12
- # understand.
13
- #
14
- ###############################################################################
15
-
16
-
17
-
18
- ###############################################################################
19
- ###############################################################################
20
- #
21
- # TIME PERIODS
22
- #
23
- ###############################################################################
24
- ###############################################################################
25
-
26
- # This defines a timeperiod where all times are valid for checks,
27
- # notifications, etc. The classic "24x7" support nightmare. :-)
28
- define timeperiod{
29
- timeperiod_name 24x7
30
- alias 24 Hours A Day, 7 Days A Week
31
- sunday 00:00-24:00
32
- monday 00:00-24:00
33
- tuesday 00:00-24:00
34
- wednesday 00:00-24:00
35
- thursday 00:00-24:00
36
- friday 00:00-24:00
37
- saturday 00:00-24:00
38
- }
39
-
40
-
41
- # 'workhours' timeperiod definition
42
- define timeperiod{
43
- timeperiod_name workhours
44
- alias Normal Work Hours
45
- monday 09:00-17:00
46
- tuesday 09:00-17:00
47
- wednesday 09:00-17:00
48
- thursday 09:00-17:00
49
- friday 09:00-17:00
50
- }
51
-
52
-
53
- # 'none' timeperiod definition
54
- define timeperiod{
55
- timeperiod_name none
56
- alias No Time Is A Good Time
57
- }
58
-
59
-
60
- # Some U.S. holidays
61
- # Note: The timeranges for each holiday are meant to *exclude* the holidays from being
62
- # treated as a valid time for notifications, etc. You probably don't want your pager
63
- # going off on New Year's. Although you're employer might... :-)
64
- define timeperiod{
65
- name us-holidays
66
- timeperiod_name us-holidays
67
- alias U.S. Holidays
68
-
69
- january 1 00:00-00:00 ; New Years
70
- monday -1 may 00:00-00:00 ; Memorial Day (last Monday in May)
71
- july 4 00:00-00:00 ; Independence Day
72
- monday 1 september 00:00-00:00 ; Labor Day (first Monday in September)
73
- thursday -1 november 00:00-00:00 ; Thanksgiving (last Thursday in November)
74
- december 25 00:00-00:00 ; Christmas
75
- }
76
-
77
-
78
- # This defines a modified "24x7" timeperiod that covers every day of the
79
- # year, except for U.S. holidays (defined in the timeperiod above).
80
- define timeperiod{
81
- timeperiod_name 24x7_sans_holidays
82
- alias 24x7 Sans Holidays
83
-
84
- use us-holidays ; Get holiday exceptions from other timeperiod
85
-
86
- sunday 00:00-24:00
87
- monday 00:00-24:00
88
- tuesday 00:00-24:00
89
- wednesday 00:00-24:00
90
- thursday 00:00-24:00
91
- friday 00:00-24:00
92
- saturday 00:00-24:00
93
- }
94
-
@@ -1,34 +0,0 @@
1
- ###########################################################################
2
- #
3
- # RESOURCE.CFG - Sample Resource File for Nagios 3.0.6
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
-
Binary file
@@ -1,45 +0,0 @@
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>
@@ -1,321 +0,0 @@
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
-