deprec 2.0.15 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,240 +0,0 @@
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
-
@@ -1,57 +0,0 @@
1
- ###############################################################################
2
- ###############################################################################
3
- #
4
- # CONTACT GROUPS
5
- #
6
- ###############################################################################
7
- ###############################################################################
8
-
9
- # We only have one contact in this simple configuration file, so there is
10
- # no need to create more than one contact group.
11
-
12
- define contactgroup{
13
- contactgroup_name admins
14
- alias Nagios Administrators
15
- members nagiosadmin
16
- }
17
-
18
- ###############################################################################
19
- ###############################################################################
20
- #
21
- # CONTACTS
22
- #
23
- ###############################################################################
24
- ###############################################################################
25
-
26
- define contact{
27
- contact_name nagiosadmin ; Short name of user
28
- use generic-contact (defined above)
29
- alias Nagios Admin ; Full name of user
30
-
31
- email root@localhost ; << CHANGE TO YOUR EMAIL ADDRESS
32
- }
33
-
34
- ###############################################################################
35
- ###############################################################################
36
- #
37
- # CONTACT TEMPLATES
38
- #
39
- ###############################################################################
40
- ###############################################################################
41
-
42
- define contact{
43
- name generic-contact
44
- service_notification_period 24x7
45
- host_notification_period 24x7
46
- service_notification_options w,u,c,r,f,s
47
- host_notification_options d,u,r,f,s
48
- service_notification_commands notify-service-by-email
49
- host_notification_commands notify-host-by-email
50
- register 0
51
- }
52
-
53
-
54
-
55
-
56
-
57
-
@@ -1 +0,0 @@
1
- # access control for nagios web interface