deprec 1.9.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. data/CHANGELOG +280 -0
  2. data/COPYING +19 -0
  3. data/LICENSE +339 -0
  4. data/README +152 -0
  5. data/THANKS +17 -0
  6. data/bin/depify +128 -0
  7. data/docs/EXAMPLE-installing_tracks.txt +41 -0
  8. data/docs/README.nagios +22 -0
  9. data/docs/README.rails +17 -0
  10. data/docs/config_gen_explained.txt +39 -0
  11. data/docs/{README.quickstart → deprec-1.x/deprec-1.x.quickstart} +4 -1
  12. data/docs/{building_edge_capistrano.txt → deprec-1.x/notes.txt} +6 -3
  13. data/docs/old/deprec_banner.gif +0 -0
  14. data/docs/windows_linux.txt +350 -0
  15. data/docs/xen/traffic_monitoring_with_vnstat.txt +95 -0
  16. data/docs/xen/xen-tools-notes.txt +31 -0
  17. data/docs/xen/xen_on_hardy.txt +39 -0
  18. data/lib/deprec.rb +8 -1
  19. data/lib/deprec/capistrano_extensions.rb +442 -0
  20. data/lib/deprec/recipes.rb +50 -233
  21. data/lib/deprec/recipes/aoe.rb +79 -0
  22. data/lib/deprec/recipes/app/mongrel.rb +213 -0
  23. data/lib/deprec/recipes/app/passenger.rb +197 -0
  24. data/lib/deprec/recipes/apt_mirror.rb +99 -0
  25. data/lib/deprec/recipes/ar_sendmail.rb +67 -0
  26. data/lib/deprec/recipes/canonical.rb +68 -0
  27. data/lib/deprec/recipes/db/mysql.rb +144 -0
  28. data/lib/deprec/recipes/db/postgresql.rb +104 -0
  29. data/lib/deprec/recipes/db/sqlite.rb +37 -0
  30. data/lib/deprec/recipes/ddclient.rb +51 -0
  31. data/lib/deprec/recipes/deprec.rb +199 -0
  32. data/lib/deprec/recipes/deprecated.rb +71 -0
  33. data/lib/deprec/recipes/example.rb +115 -0
  34. data/lib/deprec/recipes/git.rb +97 -0
  35. data/lib/deprec/recipes/gitosis.rb +48 -0
  36. data/lib/deprec/recipes/heartbeat.rb +138 -0
  37. data/lib/deprec/recipes/logrotate.rb +54 -0
  38. data/lib/deprec/recipes/lvm.rb +20 -0
  39. data/lib/deprec/recipes/memcache.rb +6 -2
  40. data/lib/deprec/recipes/monit.rb +143 -0
  41. data/lib/deprec/recipes/nagios.rb +305 -0
  42. data/lib/deprec/recipes/network.rb +93 -0
  43. data/lib/deprec/recipes/ntp.rb +103 -0
  44. data/lib/deprec/recipes/php.rb +58 -0
  45. data/lib/deprec/recipes/postfix.rb +115 -0
  46. data/lib/deprec/recipes/rails.rb +300 -55
  47. data/lib/deprec/recipes/ruby/mri.rb +55 -0
  48. data/lib/deprec/recipes/ruby/ree.rb +41 -0
  49. data/lib/deprec/recipes/sphinx.rb +86 -0
  50. data/lib/deprec/recipes/ssh.rb +85 -18
  51. data/lib/deprec/recipes/ssl.rb +55 -0
  52. data/lib/deprec/recipes/starling.rb +119 -0
  53. data/lib/deprec/recipes/svn.rb +163 -183
  54. data/lib/deprec/recipes/trac.rb +239 -62
  55. data/lib/deprec/recipes/ubuntu.rb +18 -100
  56. data/lib/deprec/recipes/users.rb +90 -0
  57. data/lib/deprec/recipes/utils.rb +58 -0
  58. data/lib/deprec/recipes/vnstat.rb +85 -0
  59. data/lib/deprec/recipes/web/apache.rb +119 -0
  60. data/lib/deprec/recipes/web/nginx.rb +172 -0
  61. data/lib/deprec/recipes/wordpress.rb +96 -0
  62. data/lib/deprec/recipes/wpmu.rb +103 -0
  63. data/lib/deprec/recipes/xen.rb +267 -0
  64. data/lib/deprec/recipes/xentools.rb +75 -0
  65. data/lib/deprec/templates/aoe/aoe-init +55 -0
  66. data/lib/deprec/templates/aoe/fence_aoemask +351 -0
  67. data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
  68. data/lib/deprec/templates/apt/sources.list +18 -0
  69. data/lib/deprec/templates/apt_mirror/apt-mirror-cron +4 -0
  70. data/lib/deprec/templates/apt_mirror/mirror.list +33 -0
  71. data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
  72. data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
  73. data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
  74. data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
  75. data/lib/deprec/templates/deprec/caprc.erb +14 -0
  76. data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
  77. data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
  78. data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
  79. data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
  80. data/lib/deprec/templates/mongrel/apache_vhost.erb +148 -0
  81. data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
  82. data/lib/deprec/{third_party/mongrel_cluster/resources/mongrel_cluster → templates/mongrel/mongrel_cluster-init-script} +19 -6
  83. data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
  84. data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
  85. data/lib/deprec/templates/mongrel/nginx_vhost.erb +41 -0
  86. data/lib/deprec/templates/monit/monit-init-script +104 -0
  87. data/lib/deprec/templates/monit/monitrc.erb +227 -0
  88. data/lib/deprec/templates/monit/nothing +0 -0
  89. data/lib/deprec/templates/mysql/create_databases.sql +20 -0
  90. data/lib/deprec/templates/mysql/database.yml.prod +6 -0
  91. data/lib/deprec/templates/mysql/database.yml.stage +6 -0
  92. data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
  93. data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
  94. data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
  95. data/lib/deprec/templates/nagios/cgi.cfg.erb +321 -0
  96. data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
  97. data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
  98. data/lib/deprec/templates/nagios/commands.cfg.erb +240 -0
  99. data/lib/deprec/templates/nagios/contacts.cfg.erb +57 -0
  100. data/lib/deprec/templates/nagios/hosts.cfg.erb +143 -0
  101. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  102. data/lib/deprec/templates/nagios/localhost.cfg.erb +157 -0
  103. data/lib/deprec/templates/nagios/nagios.cfg.erb +1274 -0
  104. data/lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb +45 -0
  105. data/lib/deprec/templates/nagios/nrpe.cfg.erb +210 -0
  106. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
  107. data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
  108. data/lib/deprec/templates/nagios/services.cfg.erb +79 -0
  109. data/lib/deprec/templates/nagios/templates.cfg.erb +9 -0
  110. data/lib/deprec/templates/nagios/timeperiods.cfg.erb +94 -0
  111. data/lib/deprec/templates/network/hostname.erb +1 -0
  112. data/lib/deprec/templates/network/hosts.erb +2 -0
  113. data/lib/deprec/templates/network/interfaces.erb +18 -0
  114. data/lib/deprec/templates/network/resolv.conf.erb +6 -0
  115. data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
  116. data/lib/deprec/templates/nginx/mime.types.erb +70 -0
  117. data/lib/deprec/templates/nginx/nginx-init-script +62 -0
  118. data/lib/deprec/templates/nginx/nginx.conf.erb +125 -0
  119. data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
  120. data/lib/deprec/templates/nginx/nothing.conf +1 -0
  121. data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
  122. data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
  123. data/lib/deprec/templates/passenger/apache_vhost.erb +21 -0
  124. data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
  125. data/lib/deprec/templates/passenger/passenger.load.erb +3 -0
  126. data/lib/deprec/templates/postfix/aliases.erb +3 -0
  127. data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
  128. data/lib/deprec/templates/{postfix_main.conf → postfix/main.cf.erb} +6 -8
  129. data/lib/deprec/templates/postfix/master.cf.erb +77 -0
  130. data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
  131. data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
  132. data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
  133. data/lib/deprec/templates/ssl/make-ssl-cert +138 -0
  134. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
  135. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
  136. data/lib/deprec/templates/starling/monit.conf.erb +14 -0
  137. data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
  138. data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
  139. data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
  140. data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
  141. data/lib/deprec/templates/trac/trac.ini.erb +169 -0
  142. data/lib/deprec/templates/trac/trac_deprec.png +0 -0
  143. data/lib/deprec/templates/trac/tracd-init.erb +43 -0
  144. data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
  145. data/lib/deprec/templates/vnstat/config.php +57 -0
  146. data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
  147. data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
  148. data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
  149. data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
  150. data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
  151. data/lib/deprec/templates/xen/xend-init.erb +57 -0
  152. data/lib/deprec/templates/xen/xendomains.erb +137 -0
  153. data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
  154. data/lib/deprec/templates/xentools/40-setup-networking +145 -0
  155. data/lib/deprec/templates/xentools/xen-tools.conf.erb +276 -0
  156. data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
  157. data/lib/deprec_cmd_completion.sh +26 -0
  158. data/lib/vmbuilder_plugins/all.rb +20 -0
  159. data/lib/vmbuilder_plugins/apt.rb +93 -0
  160. data/lib/vmbuilder_plugins/emerge.rb +76 -0
  161. data/lib/{deprec/third_party/vmbuilder/plugins → vmbuilder_plugins}/gem.rb +10 -17
  162. data/lib/{deprec/third_party/vmbuilder/plugins → vmbuilder_plugins}/std.rb +69 -19
  163. metadata +204 -55
  164. data/bin/deprec +0 -35
  165. data/docs/README.slicehost +0 -14
  166. data/docs/README.svn_trac +0 -19
  167. data/lib/deprec/capistrano_extensions/actor_extensions.rb +0 -89
  168. data/lib/deprec/capistrano_extensions/cli_extensions.rb +0 -38
  169. data/lib/deprec/capistrano_extensions/deprec_extensions.rb +0 -137
  170. data/lib/deprec/generators/deprec/USAGE +0 -11
  171. data/lib/deprec/generators/deprec/deprec_generator.rb +0 -24
  172. data/lib/deprec/generators/deprec/templates/deploy.rb +0 -90
  173. data/lib/deprec/generators/loader.rb +0 -20
  174. data/lib/deprec/recipes/apache.rb +0 -91
  175. data/lib/deprec/recipes/cache_svn.rb +0 -74
  176. data/lib/deprec/recipes/vmware.rb +0 -114
  177. data/lib/deprec/templates/trac.ini.erb +0 -106
  178. data/lib/deprec/third_party/THIRD_PARTY_README +0 -12
  179. data/lib/deprec/third_party/mongrel_cluster/LICENSE +0 -506
  180. data/lib/deprec/third_party/mongrel_cluster/recipes.rb +0 -96
  181. data/lib/deprec/third_party/railsmachine/LICENSE +0 -506
  182. data/lib/deprec/third_party/railsmachine/recipes/apache.rb +0 -92
  183. data/lib/deprec/third_party/railsmachine/recipes/mysql.rb +0 -73
  184. data/lib/deprec/third_party/railsmachine/recipes/templates/httpd-ssl.conf +0 -80
  185. data/lib/deprec/third_party/railsmachine/recipes/templates/httpd.conf +0 -57
  186. data/lib/deprec/third_party/vmbuilder/plugins.rb +0 -8
  187. data/lib/deprec/third_party/vmbuilder/plugins/apt.rb +0 -144
  188. data/resources/capistrano_include_dotfiles.patch +0 -17
@@ -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
+
@@ -0,0 +1,57 @@
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
+
@@ -0,0 +1,143 @@
1
+ ###############################################################################
2
+ ###############################################################################
3
+ #
4
+ # HOST GROUPS
5
+ #
6
+ ###############################################################################
7
+ ###############################################################################
8
+
9
+ define hostgroup{
10
+ hostgroup_name servers
11
+ }
12
+
13
+ define hostgroup{
14
+ hostgroup_name app
15
+ }
16
+
17
+ define hostgroup{
18
+ hostgroup_name web
19
+ }
20
+
21
+ define hostgroup{
22
+ hostgroup_name routers
23
+ }
24
+
25
+ ###############################################################################
26
+ ###############################################################################
27
+ #
28
+ # HOSTS
29
+ #
30
+ ###############################################################################
31
+ ###############################################################################
32
+
33
+ define host {
34
+ use server
35
+ host_name app01
36
+ hostgroups servers,app
37
+ address app01
38
+ }
39
+
40
+ define host {
41
+ use server
42
+ host_name app02
43
+ hostgroups servers.app
44
+ address app02
45
+ }
46
+
47
+ ###############################################################################
48
+ ###############################################################################
49
+ #
50
+ # HOST TEMPLATES
51
+ #
52
+ ###############################################################################
53
+ ###############################################################################
54
+
55
+ # Generic host definition template - This is NOT a real host, just a template!
56
+
57
+ define host{
58
+ name generic-host; The name of this host template
59
+ notifications_enabled 1 ; Host notifications are enabled
60
+ event_handler_enabled 1 ; Host event handler is enabled
61
+ flap_detection_enabled 1 ; Flap detection is enabled
62
+ failure_prediction_enabled 1 ; Failure prediction is enabled
63
+ process_perf_data 1 ; Process performance data
64
+ retain_status_information 1 ; Retain status information across program restarts
65
+ retain_nonstatus_information 1 ; Retain non-status information across program restarts
66
+ notification_period 24x7 ; Send host notifications at any time
67
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
68
+ }
69
+
70
+
71
+ # Linux host definition template - This is NOT a real host, just a template!
72
+
73
+ define host{
74
+ name linux-server ; The name of this host template
75
+ use generic-host ; This template inherits other values from the generic-host template
76
+ check_period 24x7 ; By default, Linux hosts are checked round the clock
77
+ check_interval 5 ; Actively check the host every 5 minutes
78
+ retry_interval 1 ; Schedule host check retries at 1 minute intervals
79
+ max_check_attempts 10 ; Check each Linux host 10 times (max)
80
+ check_command check-host-alive ; Default command to check Linux hosts
81
+ notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
82
+ ; Note that the notification_period variable is being overridden from
83
+ ; the value that is inherited from the generic-host template!
84
+ notification_interval 120 ; Resend notifications every 2 hours
85
+ notification_options d,u,r ; Only send notifications for specific host states
86
+ contact_groups admins ; Notifications get sent to the admins by default
87
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
88
+ }
89
+
90
+
91
+
92
+ # Windows host definition template - This is NOT a real host, just a template!
93
+
94
+ define host{
95
+ name windows-server ; The name of this host template
96
+ use generic-host ; Inherit default values from the generic-host template
97
+ check_period 24x7 ; By default, Windows servers are monitored round the clock
98
+ check_interval 5 ; Actively check the server every 5 minutes
99
+ retry_interval 1 ; Schedule host check retries at 1 minute intervals
100
+ max_check_attempts 10 ; Check each server 10 times (max)
101
+ check_command check-host-alive ; Default command to check if servers are "alive"
102
+ notification_period 24x7 ; Send notification out at any time - day or night
103
+ notification_interval 30 ; Resend notifications every 30 minutes
104
+ notification_options d,r ; Only send notifications for specific host states
105
+ contact_groups admins ; Notifications get sent to the admins by default
106
+ hostgroups windows-servers ; Host groups that Windows servers should be a member of
107
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
108
+ }
109
+
110
+
111
+ # We define a generic printer template that can be used for most printers we monitor
112
+
113
+ define host{
114
+ name generic-printer ; The name of this host template
115
+ use generic-host ; Inherit default values from the generic-host template
116
+ check_period 24x7 ; By default, printers are monitored round the clock
117
+ check_interval 5 ; Actively check the printer every 5 minutes
118
+ retry_interval 1 ; Schedule host check retries at 1 minute intervals
119
+ max_check_attempts 10 ; Check each printer 10 times (max)
120
+ check_command check-host-alive ; Default command to check if printers are "alive"
121
+ notification_period workhours ; Printers are only used during the workday
122
+ notification_interval 30 ; Resend notifications every 30 minutes
123
+ notification_options d,r ; Only send notifications for specific host states
124
+ contact_groups admins ; Notifications get sent to the admins by default
125
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
126
+ }
127
+
128
+
129
+ # Define a template for switches that we can reuse
130
+ define host{
131
+ name generic-switch ; The name of this host template
132
+ use generic-host ; Inherit default values from the generic-host template
133
+ check_period 24x7 ; By default, switches are monitored round the clock
134
+ check_interval 5 ; Switches are checked every 5 minutes
135
+ retry_interval 1 ; Schedule host check retries at 1 minute intervals
136
+ max_check_attempts 10 ; Check each switch 10 times (max)
137
+ check_command check-host-alive ; Default command to check if routers are "alive"
138
+ notification_period 24x7 ; Send notifications at any time
139
+ notification_interval 30 ; Resend notifications every 30 minutes
140
+ notification_options d,r ; Only send notifications for specific host states
141
+ contact_groups admins ; Notifications get sent to the admins by default
142
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
143
+ }
@@ -0,0 +1 @@
1
+ # access control for nagios web interface
@@ -0,0 +1,157 @@
1
+ ###############################################################################
2
+ # LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
3
+ #
4
+ # Last Modified: 05-31-2007
5
+ #
6
+ # NOTE: This config file is intended to serve as an *extremely* simple
7
+ # example of how you can create configuration entries to monitor
8
+ # the local (Linux) machine.
9
+ #
10
+ ###############################################################################
11
+
12
+
13
+
14
+
15
+ ###############################################################################
16
+ ###############################################################################
17
+ #
18
+ # HOST DEFINITION
19
+ #
20
+ ###############################################################################
21
+ ###############################################################################
22
+
23
+ # Define a host for the local machine
24
+
25
+ define host{
26
+ use linux-server ; Name of host template to use
27
+ ; This host definition will inherit all variables that are defined
28
+ ; in (or inherited by) the linux-server host template definition.
29
+ host_name localhost
30
+ alias localhost
31
+ address 127.0.0.1
32
+ }
33
+
34
+
35
+
36
+ ###############################################################################
37
+ ###############################################################################
38
+ #
39
+ # HOST GROUP DEFINITION
40
+ #
41
+ ###############################################################################
42
+ ###############################################################################
43
+
44
+ # Define an optional hostgroup for Linux machines
45
+
46
+ define hostgroup{
47
+ hostgroup_name linux-servers ; The name of the hostgroup
48
+ alias Linux Servers ; Long name of the group
49
+ members localhost ; Comma separated list of hosts that belong to this group
50
+ }
51
+
52
+
53
+
54
+ ###############################################################################
55
+ ###############################################################################
56
+ #
57
+ # SERVICE DEFINITIONS
58
+ #
59
+ ###############################################################################
60
+ ###############################################################################
61
+
62
+
63
+ # Define a service to "ping" the local machine
64
+
65
+ define service{
66
+ use local-service ; Name of service template to use
67
+ host_name localhost
68
+ service_description PING
69
+ check_command check_ping!100.0,20%!500.0,60%
70
+ }
71
+
72
+
73
+ # Define a service to check the disk space of the root partition
74
+ # on the local machine. Warning if < 20% free, critical if
75
+ # < 10% free space on partition.
76
+
77
+ define service{
78
+ use local-service ; Name of service template to use
79
+ host_name localhost
80
+ service_description Root Partition
81
+ check_command check_local_disk!20%!10%!/
82
+ }
83
+
84
+
85
+
86
+ # Define a service to check the number of currently logged in
87
+ # users on the local machine. Warning if > 20 users, critical
88
+ # if > 50 users.
89
+
90
+ define service{
91
+ use local-service ; Name of service template to use
92
+ host_name localhost
93
+ service_description Current Users
94
+ check_command check_local_users!20!50
95
+ }
96
+
97
+
98
+ # Define a service to check the number of currently running procs
99
+ # on the local machine. Warning if > 250 processes, critical if
100
+ # > 400 users.
101
+
102
+ define service{
103
+ use local-service ; Name of service template to use
104
+ host_name localhost
105
+ service_description Total Processes
106
+ check_command check_local_procs!250!400!RSZDT
107
+ }
108
+
109
+
110
+
111
+ # Define a service to check the load on the local machine.
112
+
113
+ define service{
114
+ use local-service ; Name of service template to use
115
+ host_name localhost
116
+ service_description Current Load
117
+ check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
118
+ }
119
+
120
+
121
+
122
+ # Define a service to check the swap usage the local machine.
123
+ # Critical if less than 10% of swap is free, warning if less than 20% is free
124
+
125
+ define service{
126
+ use local-service ; Name of service template to use
127
+ host_name localhost
128
+ service_description Swap Usage
129
+ check_command check_local_swap!20!10
130
+ }
131
+
132
+
133
+
134
+ # Define a service to check SSH on the local machine.
135
+ # Disable notifications for this service by default, as not all users may have SSH enabled.
136
+
137
+ define service{
138
+ use local-service ; Name of service template to use
139
+ host_name localhost
140
+ service_description SSH
141
+ check_command check_ssh
142
+ notifications_enabled 0
143
+ }
144
+
145
+
146
+
147
+ # Define a service to check HTTP on the local machine.
148
+ # Disable notifications for this service by default, as not all users may have HTTP enabled.
149
+
150
+ define service{
151
+ use local-service ; Name of service template to use
152
+ host_name localhost
153
+ service_description HTTP
154
+ check_command check_http
155
+ notifications_enabled 0
156
+ }
157
+