le1t0-deprec 2.1.6.001

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. data/CHANGELOG +444 -0
  2. data/COPYING +19 -0
  3. data/LICENSE +339 -0
  4. data/README +154 -0
  5. data/THANKS +17 -0
  6. data/bin/depify +139 -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/deprec-1.x/deprec-1.x.quickstart +50 -0
  12. data/docs/deprec-1.x/notes.txt +12 -0
  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 +42 -0
  19. data/lib/deprec/capistrano_extensions.rb +446 -0
  20. data/lib/deprec/recipes.rb +7 -0
  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 +190 -0
  24. data/lib/deprec/recipes/ar_sendmail.rb +67 -0
  25. data/lib/deprec/recipes/aspell.rb +22 -0
  26. data/lib/deprec/recipes/canonical.rb +68 -0
  27. data/lib/deprec/recipes/cap.rb +39 -0
  28. data/lib/deprec/recipes/chef.rb +68 -0
  29. data/lib/deprec/recipes/collectd.rb +112 -0
  30. data/lib/deprec/recipes/db/couchdb.rb +107 -0
  31. data/lib/deprec/recipes/db/mysql.rb +194 -0
  32. data/lib/deprec/recipes/db/postgresql.rb +104 -0
  33. data/lib/deprec/recipes/db/sqlite.rb +37 -0
  34. data/lib/deprec/recipes/ddclient.rb +51 -0
  35. data/lib/deprec/recipes/deprec.rb +167 -0
  36. data/lib/deprec/recipes/deprecated.rb +71 -0
  37. data/lib/deprec/recipes/drbd.rb +137 -0
  38. data/lib/deprec/recipes/dummy.rb +22 -0
  39. data/lib/deprec/recipes/example.rb +115 -0
  40. data/lib/deprec/recipes/git.rb +97 -0
  41. data/lib/deprec/recipes/gitosis.rb.disabled +55 -0
  42. data/lib/deprec/recipes/glusterfs.rb +176 -0
  43. data/lib/deprec/recipes/god.rb +70 -0
  44. data/lib/deprec/recipes/haproxy.rb +115 -0
  45. data/lib/deprec/recipes/heartbeat.rb +138 -0
  46. data/lib/deprec/recipes/imagemagick/imagemagick_bin.rb +24 -0
  47. data/lib/deprec/recipes/imagemagick/imagemagick_src.rb +39 -0
  48. data/lib/deprec/recipes/integrity.rb +108 -0
  49. data/lib/deprec/recipes/iptables.rb +94 -0
  50. data/lib/deprec/recipes/java.rb +23 -0
  51. data/lib/deprec/recipes/keepalived.rb +78 -0
  52. data/lib/deprec/recipes/ldap.rb +52 -0
  53. data/lib/deprec/recipes/logrotate.rb +56 -0
  54. data/lib/deprec/recipes/lvm.rb +20 -0
  55. data/lib/deprec/recipes/memcache.rb +49 -0
  56. data/lib/deprec/recipes/mongodb.rb +94 -0
  57. data/lib/deprec/recipes/monit.rb +135 -0
  58. data/lib/deprec/recipes/mysql_proxy.rb +67 -0
  59. data/lib/deprec/recipes/nagios.rb +361 -0
  60. data/lib/deprec/recipes/network.rb +116 -0
  61. data/lib/deprec/recipes/ntp.rb +103 -0
  62. data/lib/deprec/recipes/php.rb +58 -0
  63. data/lib/deprec/recipes/postfix.rb +115 -0
  64. data/lib/deprec/recipes/profiles.rb +125 -0
  65. data/lib/deprec/recipes/raid/amcc_3ware.rb +21 -0
  66. data/lib/deprec/recipes/rails.rb +330 -0
  67. data/lib/deprec/recipes/redhat_cluster.rb +228 -0
  68. data/lib/deprec/recipes/redis.rb +90 -0
  69. data/lib/deprec/recipes/ruby/mri.rb +55 -0
  70. data/lib/deprec/recipes/ruby/ree.rb +40 -0
  71. data/lib/deprec/recipes/rvm.rb +32 -0
  72. data/lib/deprec/recipes/s3utils.rb +63 -0
  73. data/lib/deprec/recipes/sphinx/thinking_sphinx.rb +105 -0
  74. data/lib/deprec/recipes/sphinx/ultrasphinx.rb +86 -0
  75. data/lib/deprec/recipes/ssh.rb +147 -0
  76. data/lib/deprec/recipes/ssl.rb +56 -0
  77. data/lib/deprec/recipes/starling.rb +119 -0
  78. data/lib/deprec/recipes/svn.rb +171 -0
  79. data/lib/deprec/recipes/syslog.rb +63 -0
  80. data/lib/deprec/recipes/trac.rb.disabled +277 -0
  81. data/lib/deprec/recipes/tsung.rb +74 -0
  82. data/lib/deprec/recipes/ubuntu.rb +90 -0
  83. data/lib/deprec/recipes/users.rb +90 -0
  84. data/lib/deprec/recipes/utils.rb +58 -0
  85. data/lib/deprec/recipes/vnstat.rb +85 -0
  86. data/lib/deprec/recipes/web/apache.rb +143 -0
  87. data/lib/deprec/recipes/web/nginx.rb +172 -0
  88. data/lib/deprec/recipes/wordpress.rb.notworking +96 -0
  89. data/lib/deprec/recipes/wpmu.rb +103 -0
  90. data/lib/deprec/recipes/xen.rb +364 -0
  91. data/lib/deprec/recipes/xentools.rb +101 -0
  92. data/lib/deprec/recipes_minus_rails.rb +125 -0
  93. data/lib/deprec/templates/aoe/aoe-init +55 -0
  94. data/lib/deprec/templates/aoe/fence_aoemask +351 -0
  95. data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
  96. data/lib/deprec/templates/apache/ports.conf.erb +5 -0
  97. data/lib/deprec/templates/apache/status.conf.erb +17 -0
  98. data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
  99. data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
  100. data/lib/deprec/templates/chef/chef.json.erb +1 -0
  101. data/lib/deprec/templates/chef/solo.rb +2 -0
  102. data/lib/deprec/templates/collectd/collectd-init.d +153 -0
  103. data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
  104. data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
  105. data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
  106. data/lib/deprec/templates/deprec/caprc.erb +14 -0
  107. data/lib/deprec/templates/drbd/drbd.conf.erb +531 -0
  108. data/lib/deprec/templates/glusterfs/glusterfsd-init.erb +95 -0
  109. data/lib/deprec/templates/gnbd_client/cluster.conf.erb +21 -0
  110. data/lib/deprec/templates/gnbd_client/clvm-default.erb +3 -0
  111. data/lib/deprec/templates/gnbd_client/cman-default.erb +6 -0
  112. data/lib/deprec/templates/gnbd_client/gnbdimports.conf.erb +1 -0
  113. data/lib/deprec/templates/gnbd_server/cluster.conf.erb +20 -0
  114. data/lib/deprec/templates/gnbd_server/clvm-default.erb +3 -0
  115. data/lib/deprec/templates/gnbd_server/cman-default.erb +6 -0
  116. data/lib/deprec/templates/gnbd_server/gnbd-server-default.erb +1 -0
  117. data/lib/deprec/templates/gnbd_server/gnbdexports.conf.erb +1 -0
  118. data/lib/deprec/templates/god/god-conf.erb +2 -0
  119. data/lib/deprec/templates/god/god-init.erb +47 -0
  120. data/lib/deprec/templates/haproxy/haproxy-init.d +120 -0
  121. data/lib/deprec/templates/haproxy/haproxy.cfg.erb +31 -0
  122. data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
  123. data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
  124. data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
  125. data/lib/deprec/templates/integrity/apache_vhost.erb +4 -0
  126. data/lib/deprec/templates/integrity/config.ru.erb +21 -0
  127. data/lib/deprec/templates/integrity/config.yml.erb +43 -0
  128. data/lib/deprec/templates/iptables/firewall-default.erb +13 -0
  129. data/lib/deprec/templates/iptables/firewall-init.erb +171 -0
  130. data/lib/deprec/templates/keepalived/keepalived.conf.erb +18 -0
  131. data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
  132. data/lib/deprec/templates/mongodb/mongodb-init.d +88 -0
  133. data/lib/deprec/templates/mongrel/apache_vhost.conf.erb +148 -0
  134. data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
  135. data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
  136. data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
  137. data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
  138. data/lib/deprec/templates/mongrel/nginx_vhost.conf.erb +41 -0
  139. data/lib/deprec/templates/monit/monit-init-script +104 -0
  140. data/lib/deprec/templates/monit/monitrc.erb +250 -0
  141. data/lib/deprec/templates/monit/nothing.monitrc +0 -0
  142. data/lib/deprec/templates/mysql/create_databases.sql +20 -0
  143. data/lib/deprec/templates/mysql/database.yml.prod +6 -0
  144. data/lib/deprec/templates/mysql/database.yml.stage +6 -0
  145. data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
  146. data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
  147. data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
  148. data/lib/deprec/templates/mysql_proxy/mysql-proxy-default.erb +4 -0
  149. data/lib/deprec/templates/nagios/README +32 -0
  150. data/lib/deprec/templates/nagios/cgi.cfg.erb +357 -0
  151. data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
  152. data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
  153. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  154. data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
  155. data/lib/deprec/templates/nagios/nagios.cfg.erb +1325 -0
  156. data/lib/deprec/templates/nagios/nrpe.cfg.erb +222 -0
  157. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
  158. data/lib/deprec/templates/nagios/objects/commands.cfg.erb +265 -0
  159. data/lib/deprec/templates/nagios/objects/contacts.cfg.erb +89 -0
  160. data/lib/deprec/templates/nagios/objects/hosts.cfg.erb +114 -0
  161. data/lib/deprec/templates/nagios/objects/localhost.cfg.erb +116 -0
  162. data/lib/deprec/templates/nagios/objects/services.cfg.erb +165 -0
  163. data/lib/deprec/templates/nagios/objects/timeperiods.cfg.erb +94 -0
  164. data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
  165. data/lib/deprec/templates/network/hostname.erb +1 -0
  166. data/lib/deprec/templates/network/hosts.erb +2 -0
  167. data/lib/deprec/templates/network/interfaces.erb +18 -0
  168. data/lib/deprec/templates/network/resolv.conf.erb +6 -0
  169. data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
  170. data/lib/deprec/templates/nginx/mime.types.erb +70 -0
  171. data/lib/deprec/templates/nginx/nginx-init-script +62 -0
  172. data/lib/deprec/templates/nginx/nginx.conf.erb +125 -0
  173. data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
  174. data/lib/deprec/templates/nginx/nothing.conf +1 -0
  175. data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
  176. data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
  177. data/lib/deprec/templates/passenger/apache_vhost.erb +29 -0
  178. data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
  179. data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
  180. data/lib/deprec/templates/passenger/passenger.load.erb +3 -0
  181. data/lib/deprec/templates/postfix/aliases.erb +3 -0
  182. data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
  183. data/lib/deprec/templates/postfix/main.cf.erb +36 -0
  184. data/lib/deprec/templates/postfix/master.cf.erb +77 -0
  185. data/lib/deprec/templates/redis/redis-conf.erb +132 -0
  186. data/lib/deprec/templates/redis/redis-init.erb +50 -0
  187. data/lib/deprec/templates/s3utils/s3cfg +35 -0
  188. data/lib/deprec/templates/s3utils/s3config.yml +3 -0
  189. data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
  190. data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
  191. data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
  192. data/lib/deprec/templates/ssl/make-ssl-cert +138 -0
  193. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
  194. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
  195. data/lib/deprec/templates/starling/monit.conf.erb +14 -0
  196. data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
  197. data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
  198. data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
  199. data/lib/deprec/templates/syslog/syslogd.erb +13 -0
  200. data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
  201. data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
  202. data/lib/deprec/templates/trac/trac.ini.erb +169 -0
  203. data/lib/deprec/templates/trac/trac_deprec.png +0 -0
  204. data/lib/deprec/templates/trac/tracd-init.erb +43 -0
  205. data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
  206. data/lib/deprec/templates/tsung/tsung.xml.erb +47 -0
  207. data/lib/deprec/templates/vnstat/config.php +57 -0
  208. data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
  209. data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
  210. data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
  211. data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
  212. data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
  213. data/lib/deprec/templates/xen/xend-init.erb +57 -0
  214. data/lib/deprec/templates/xen/xendomains.erb +137 -0
  215. data/lib/deprec/templates/xentools/100-ubuntu-setup +26 -0
  216. data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
  217. data/lib/deprec/templates/xentools/30-disable-gettys +57 -0
  218. data/lib/deprec/templates/xentools/31-ubuntu-setup +32 -0
  219. data/lib/deprec/templates/xentools/40-setup-networking +145 -0
  220. data/lib/deprec/templates/xentools/98-custom +17 -0
  221. data/lib/deprec/templates/xentools/xen-tools.conf.erb +278 -0
  222. data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
  223. data/lib/deprec_cmd_completion.sh +26 -0
  224. data/lib/deprec_minus_rails.rb +12 -0
  225. data/lib/vmbuilder_plugins/all.rb +20 -0
  226. data/lib/vmbuilder_plugins/apt.rb +93 -0
  227. data/lib/vmbuilder_plugins/emerge.rb +76 -0
  228. data/lib/vmbuilder_plugins/gem.rb +100 -0
  229. data/lib/vmbuilder_plugins/std.rb +203 -0
  230. metadata +304 -0
@@ -0,0 +1,89 @@
1
+ ###############################################################################
2
+ # CONTACTS.CFG - SAMPLE CONTACT/CONTACTGROUP DEFINITIONS
3
+ #
4
+ # Last Modified: 05-31-2007
5
+ #
6
+ # NOTES: This config file provides you with some example contact and contact
7
+ # group definitions that you can reference in host and service
8
+ # definitions.
9
+ #
10
+ # You don't need to keep these definitions in a separate file from your
11
+ # other object definitions. This has been done just to make things
12
+ # easier to understand.
13
+ #
14
+ ###############################################################################
15
+
16
+
17
+
18
+ ###############################################################################
19
+ ###############################################################################
20
+ #
21
+ # CONTACTS
22
+ #
23
+ ###############################################################################
24
+ ###############################################################################
25
+
26
+ # Just one contact defined by default - the Nagios admin (that's you)
27
+ # This contact definition inherits a lot of default values from the 'generic-contact'
28
+ # template which is defined elsewhere.
29
+
30
+ define contact{
31
+ contact_name nagiosadmin ; Short name of user
32
+ use generic-contact ; Inherit default values from generic-contact template (defined above)
33
+ alias Nagios Admin ; Full name of user
34
+
35
+ email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
36
+ }
37
+
38
+
39
+
40
+ ###############################################################################
41
+ ###############################################################################
42
+ #
43
+ # CONTACT GROUPS
44
+ #
45
+ ###############################################################################
46
+ ###############################################################################
47
+
48
+ # We only have one contact in this simple configuration file, so there is
49
+ # no need to create more than one contact group.
50
+
51
+ define contactgroup{
52
+ contactgroup_name admins
53
+ alias Nagios Administrators
54
+ members nagiosadmin
55
+ }
56
+
57
+
58
+ ###############################################################################
59
+ ###############################################################################
60
+ #
61
+ # CONTACT TEMPLATES
62
+ #
63
+ ###############################################################################
64
+ ###############################################################################
65
+
66
+ # Generic contact definition template - This is NOT a real contact, just a template!
67
+
68
+ define contact{ # example contact
69
+ name contact_template
70
+ # contact_name name
71
+ # alias longer_name
72
+ # contactgroups contactgroup_names
73
+ host_notifications_enabled 0
74
+ service_notifications_enabled 0
75
+ host_notification_period 24x7
76
+ service_notification_period 24x7
77
+ host_notification_options d,u,r,f,s
78
+ service_notification_options w,u,c,r,f,s
79
+ host_notification_commands notify-host-by-email
80
+ service_notification_commands notify-service-by-email
81
+ # email user@address.com
82
+ # pager pager_number or pager_email_gateway
83
+ # addressx additional_contact_address
84
+ # can_submit_commands [0/1]
85
+ # retain_status_information [0/1]
86
+ # retain_nonstatus_information [0/1]
87
+ register 0
88
+ }
89
+
@@ -0,0 +1,114 @@
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
+ define hostgroup{
26
+ hostgroup_name mysql_servers
27
+ }
28
+
29
+ define hostgroup{
30
+ hostgroup_name mysql_slaves
31
+ }
32
+
33
+ define hostgroup{
34
+ hostgroup_name mail
35
+ }
36
+
37
+
38
+ ###############################################################################
39
+ ###############################################################################
40
+ #
41
+ # HOSTS
42
+ #
43
+ ###############################################################################
44
+ ###############################################################################
45
+
46
+ define host{
47
+ use server ; Name of host template to use
48
+ ; This host definition will inherit all variables that are defined
49
+ ; in (or inherited by) the linux-server host template definition.
50
+ host_name localhost
51
+ hostgroups servers
52
+ alias localhost
53
+ address 127.0.0.1
54
+ }
55
+
56
+ # define host {
57
+ # use server
58
+ # host_name app01
59
+ # hostgroups servers,app
60
+ # address app01
61
+ # }
62
+ #
63
+ # define host {
64
+ # use server
65
+ # host_name app02
66
+ # hostgroups servers,app
67
+ # address app02
68
+ # }
69
+
70
+ ###############################################################################
71
+ ###############################################################################
72
+ #
73
+ # HOST TEMPLATES
74
+ #
75
+ ###############################################################################
76
+ ###############################################################################
77
+
78
+ # Generic host definition template - This is NOT a real host, just a template!
79
+
80
+ define host{
81
+ name generic-host; The name of this host template
82
+ notifications_enabled 1 ; Host notifications are enabled
83
+ event_handler_enabled 1 ; Host event handler is enabled
84
+ flap_detection_enabled 1 ; Flap detection is enabled
85
+ failure_prediction_enabled 1 ; Failure prediction is enabled
86
+ process_perf_data 1 ; Process performance data
87
+ retain_status_information 1 ; Retain status information across program restarts
88
+ retain_nonstatus_information 1 ; Retain non-status information across program restarts
89
+ notification_period 24x7 ; Send host notifications at any time
90
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
91
+ }
92
+
93
+
94
+ # Linux host definition template - This is NOT a real host, just a template!
95
+
96
+ define host{
97
+ name server ; The name of this host template
98
+ use generic-host ; This template inherits other values from the generic-host template
99
+ check_period 24x7 ; By default, Linux hosts are checked round the clock
100
+ check_interval 5 ; Actively check the host every 5 minutes
101
+ retry_interval 1 ; Schedule host check retries at 1 minute intervals
102
+ max_check_attempts 10 ; Check each Linux host 10 times (max)
103
+ check_command check-host-alive ; Default command to check Linux hosts
104
+ notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
105
+ ; Note that the notification_period variable is being overridden from
106
+ ; the value that is inherited from the generic-host template!
107
+ notification_interval 120 ; Resend notifications every 2 hours
108
+ notification_options d,u,r ; Only send notifications for specific host states
109
+ contact_groups admins ; Notifications get sent to the admins by default
110
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
111
+ }
112
+
113
+
114
+
@@ -0,0 +1,116 @@
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
+ # SERVICE DEFINITIONS
17
+ #
18
+ ###############################################################################
19
+ ###############################################################################
20
+
21
+
22
+ # Define a service to "ping" the local machine
23
+
24
+ define service{
25
+ use local-service ; Name of service template to use
26
+ host_name localhost
27
+ service_description PING
28
+ check_command check_ping!100.0,20%!500.0,60%
29
+ }
30
+
31
+
32
+ # Define a service to check the disk space of the root partition
33
+ # on the local machine. Warning if < 20% free, critical if
34
+ # < 10% free space on partition.
35
+
36
+ define service{
37
+ use local-service ; Name of service template to use
38
+ host_name localhost
39
+ service_description Root Partition
40
+ check_command check_local_disk!20%!10%!/
41
+ }
42
+
43
+
44
+
45
+ # Define a service to check the number of currently logged in
46
+ # users on the local machine. Warning if > 20 users, critical
47
+ # if > 50 users.
48
+
49
+ define service{
50
+ use local-service ; Name of service template to use
51
+ host_name localhost
52
+ service_description Current Users
53
+ check_command check_local_users!20!50
54
+ }
55
+
56
+
57
+ # Define a service to check the number of currently running procs
58
+ # on the local machine. Warning if > 250 processes, critical if
59
+ # > 400 users.
60
+
61
+ define service{
62
+ use local-service ; Name of service template to use
63
+ host_name localhost
64
+ service_description Total Processes
65
+ check_command check_local_procs!250!400!RSZDT
66
+ }
67
+
68
+
69
+
70
+ # Define a service to check the load on the local machine.
71
+
72
+ define service{
73
+ use local-service ; Name of service template to use
74
+ host_name localhost
75
+ service_description Current Load
76
+ check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
77
+ }
78
+
79
+
80
+
81
+ # Define a service to check the swap usage the local machine.
82
+ # Critical if less than 10% of swap is free, warning if less than 20% is free
83
+
84
+ define service{
85
+ use local-service ; Name of service template to use
86
+ host_name localhost
87
+ service_description Swap Usage
88
+ check_command check_local_swap!20!10
89
+ }
90
+
91
+
92
+
93
+ # Define a service to check SSH on the local machine.
94
+ # Disable notifications for this service by default, as not all users may have SSH enabled.
95
+
96
+ define service{
97
+ use local-service ; Name of service template to use
98
+ host_name localhost
99
+ service_description SSH
100
+ check_command check_ssh
101
+ notifications_enabled 0
102
+ }
103
+
104
+
105
+
106
+ # Define a service to check HTTP on the local machine.
107
+ # Disable notifications for this service by default, as not all users may have HTTP enabled.
108
+
109
+ define service{
110
+ use local-service ; Name of service template to use
111
+ host_name localhost
112
+ service_description HTTP
113
+ check_command check_http
114
+ notifications_enabled 0
115
+ }
116
+
@@ -0,0 +1,165 @@
1
+ ###############################################################################
2
+ ###############################################################################
3
+ #
4
+ # SERVICE GROUPS
5
+ #
6
+ ###############################################################################
7
+ ###############################################################################
8
+
9
+ define servicegroup{
10
+ servicegroup_name disk
11
+ }
12
+
13
+ define servicegroup{
14
+ servicegroup_name memory
15
+ }
16
+ define servicegroup{
17
+ servicegroup_name cpu
18
+ }
19
+
20
+
21
+ ###############################################################################
22
+ ###############################################################################
23
+ #
24
+ # SERVICES
25
+ #
26
+ ###############################################################################
27
+ ###############################################################################
28
+
29
+ define service {
30
+ use generic-service ; Name of service template to use
31
+ hostgroup_name servers
32
+ service_description SSH
33
+ check_command check_ssh
34
+ }
35
+
36
+ define service{
37
+ use generic-service
38
+ hostgroup_name servers
39
+ service_description Memory
40
+ servicegroups memory
41
+ check_command check_nrpe!check_memory
42
+ }
43
+
44
+ define service{
45
+ use generic-service
46
+ hostgroup_name servers
47
+ service_description Swap
48
+ servicegroups memory
49
+ check_command check_nrpe!check_swap
50
+ notifications_enabled 0
51
+ }
52
+
53
+ define service{
54
+ use generic-service
55
+ hostgroup_name servers
56
+ service_description CPU
57
+ check_command check_nrpe!check_load
58
+ }
59
+
60
+ define service{
61
+ use generic-service
62
+ hostgroup_name servers
63
+ servicegroups disk
64
+ service_description Disk
65
+ check_command check_nrpe!check_xvda2
66
+ }
67
+
68
+ define service{
69
+ use generic-service
70
+ hostgroup_name servers
71
+ service_description NTP Time
72
+ check_command check_nrpe!check_ntp_time
73
+ }
74
+
75
+ define service{
76
+ use generic-service
77
+ hostgroup_name servers
78
+ service_description DNS
79
+ check_command check_dns
80
+ }
81
+
82
+ # define service {
83
+ # use generic-service ; Name of service template to use
84
+ # hostgroup_name mail
85
+ # service_description postfix smtp
86
+ # check_command check_nrpe!check_postfix_satellite
87
+ # }
88
+ #
89
+ # define service{
90
+ # use generic-service
91
+ # hostgroup_name mysql_servers
92
+ # service_description Mysql
93
+ # check_command check_nrpe!check_mysql
94
+ # }
95
+
96
+ # Check requests per second to Apache (via collectd)
97
+ #
98
+ # define service{
99
+ # use generic-service
100
+ # host_name localhost
101
+ # service_description apache_requests
102
+ # normal_check_interval 1
103
+ # retry_check_interval 1
104
+ # check_command check_apache_requests!www.example.com!10!20
105
+ # }
106
+
107
+ # Check URl is responding
108
+ #
109
+ # define service{
110
+ # use generic-service
111
+ # host_name example_host
112
+ # service_description www.example.com
113
+ # check_command check_url!www.example.com!http:\/\/www.example.com/some/path
114
+ # notifications_enabled 1
115
+ # }
116
+
117
+
118
+ ###############################################################################
119
+ ###############################################################################
120
+ #
121
+ # SERVICE TEMPLATES
122
+ #
123
+ ###############################################################################
124
+ ###############################################################################
125
+
126
+ # Generic service definition template - This is NOT a real service, just a template!
127
+
128
+ define service{
129
+ name generic-service ; The 'name' of this service template
130
+ active_checks_enabled 1 ; Active service checks are enabled
131
+ passive_checks_enabled 1 ; Passive service checks are enabled/accepted
132
+ parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
133
+ obsess_over_service 1 ; We should obsess over this service (if necessary)
134
+ check_freshness 0 ; Default is to NOT check service 'freshness'
135
+ notifications_enabled 1 ; Service notifications are enabled
136
+ event_handler_enabled 1 ; Service event handler is enabled
137
+ flap_detection_enabled 1 ; Flap detection is enabled
138
+ failure_prediction_enabled 1 ; Failure prediction is enabled
139
+ process_perf_data 1 ; Process performance data
140
+ retain_status_information 1 ; Retain status information across program restarts
141
+ retain_nonstatus_information 1 ; Retain non-status information across program restarts
142
+ is_volatile 0 ; The service is not volatile
143
+ check_period 24x7 ; The service can be checked at any time of the day
144
+ max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
145
+ normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
146
+ retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
147
+ contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
148
+ notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
149
+ notification_interval 60 ; Re-notify about service problems every hour
150
+ notification_period 24x7 ; Notifications can be sent out at any time
151
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
152
+ }
153
+
154
+ # Local service definition template - This is NOT a real service, just a template!
155
+
156
+ define service{
157
+ name local-service ; The name of this service template
158
+ use generic-service ; Inherit default values from the generic-service definition
159
+ max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
160
+ normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
161
+ retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
162
+ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
163
+ }
164
+
165
+