deprec 2.0.13 → 2.0.15

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 (33) hide show
  1. data/CHANGELOG +8 -0
  2. data/lib/deprec/recipes/app/passenger.rb +12 -1
  3. data/lib/deprec/recipes/collectd.rb +112 -0
  4. data/lib/deprec/recipes/nagios.rb +82 -75
  5. data/lib/deprec/recipes/rails.rb +5 -0
  6. data/lib/deprec/recipes/utils.rb +17 -17
  7. data/lib/deprec/recipes/web/apache.rb +1 -0
  8. data/lib/deprec/recipes/xen.rb +6 -5
  9. data/lib/deprec/recipes_minus_rails.rb +1 -0
  10. data/lib/deprec/templates/nagios/README +32 -0
  11. data/lib/deprec/templates/nagios/cgi.cfg +332 -0
  12. data/lib/deprec/templates/nagios/htpasswd.users +0 -1
  13. data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
  14. data/lib/deprec/templates/nagios/{nagios.cfg.erb → nagios.cfg} +37 -14
  15. data/lib/deprec/templates/nagios/objects/commands.cfg +240 -0
  16. data/lib/deprec/templates/nagios/objects/contacts.cfg +55 -0
  17. data/lib/deprec/templates/nagios/{localhost.cfg.erb → objects/localhost.cfg} +0 -0
  18. data/lib/deprec/templates/nagios/objects/templates.cfg +190 -0
  19. data/lib/deprec/templates/nagios/{timeperiods.cfg.erb → objects/timeperiods.cfg} +0 -0
  20. data/lib/deprec/templates/nagios/resource.cfg +34 -0
  21. data/lib/deprec/templates/nagios_config.tgz +0 -0
  22. data/lib/deprec/templates/{nagios/nagios_apache_vhost.conf.erb → old/apache_vhost.erb} +0 -0
  23. data/lib/deprec/templates/{nagios → old}/cgi.cfg.erb +0 -0
  24. data/lib/deprec/templates/{nagios → old}/commands.cfg.erb +0 -0
  25. data/lib/deprec/templates/{nagios → old}/contacts.cfg.erb +0 -0
  26. data/lib/deprec/templates/old/htpasswd.users +1 -0
  27. data/lib/deprec/templates/old/localhost.cfg.erb +157 -0
  28. data/lib/deprec/templates/{nagios → old}/resource.cfg.erb +0 -0
  29. data/lib/deprec/templates/{nagios → old}/templates.cfg.erb +0 -0
  30. data/lib/deprec/templates/old/timeperiods.cfg.erb +94 -0
  31. data/lib/deprec/templates/passenger/apache_vhost.erb +3 -0
  32. data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
  33. metadata +24 -11
@@ -0,0 +1,34 @@
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
+
@@ -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
+
@@ -0,0 +1,94 @@
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
+
@@ -6,6 +6,9 @@
6
6
  ServerAlias <%= domain.sub(/.*?\./, "assets#{counter}.") %>
7
7
  <%- end %>
8
8
  DocumentRoot "<%= passenger_document_root %>"
9
+ CustomLog <%= apache_log_dir %>/<%= application %>-access.log combined
10
+ ErrorLog <%= apache_log_dir %>/<%= application %>-error.log
11
+
9
12
  RailsEnv <%= rails_env %>
10
13
  # RailsAllowModRewrite <%= passenger_rails_allow_mod_rewrite %>
11
14
  #
@@ -0,0 +1,12 @@
1
+ <%= shared_path %>/log/<%= rails_env %>.log {
2
+ daily
3
+ missingok
4
+ rotate 30
5
+ compress
6
+ delaycompress
7
+ sharedscripts
8
+ dateext
9
+ postrotate
10
+ touch <%= current_path %>/tmp/restart.txt
11
+ endscript
12
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.13
4
+ version: 2.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bailey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-05 00:00:00 +10:00
12
+ date: 2009-08-10 00:00:00 +10:00
13
13
  default_executable: depify
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -50,6 +50,7 @@ files:
50
50
  - lib/deprec/recipes/ar_sendmail.rb
51
51
  - lib/deprec/recipes/canonical.rb
52
52
  - lib/deprec/recipes/chef.rb
53
+ - lib/deprec/recipes/collectd.rb
53
54
  - lib/deprec/recipes/db/couchdb.rb
54
55
  - lib/deprec/recipes/db/mysql.rb
55
56
  - lib/deprec/recipes/db/postgresql.rb
@@ -124,22 +125,24 @@ files:
124
125
  - lib/deprec/templates/mysql/my.cnf.erb
125
126
  - lib/deprec/templates/mysql/sphinx.conf.prod
126
127
  - lib/deprec/templates/mysql/sphinx.conf.stage
127
- - lib/deprec/templates/nagios/cgi.cfg.erb
128
+ - lib/deprec/templates/nagios/cgi.cfg
128
129
  - lib/deprec/templates/nagios/check_linux_free_memory.pl
129
130
  - lib/deprec/templates/nagios/check_mongrel_cluster.rb
130
- - lib/deprec/templates/nagios/commands.cfg.erb
131
- - lib/deprec/templates/nagios/contacts.cfg.erb
132
131
  - lib/deprec/templates/nagios/hosts.cfg.erb
133
132
  - lib/deprec/templates/nagios/htpasswd.users
134
- - lib/deprec/templates/nagios/localhost.cfg.erb
135
- - lib/deprec/templates/nagios/nagios.cfg.erb
136
- - lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb
133
+ - lib/deprec/templates/nagios/mrtg.cfg
134
+ - lib/deprec/templates/nagios/nagios.cfg
137
135
  - lib/deprec/templates/nagios/nrpe.cfg.erb
138
136
  - lib/deprec/templates/nagios/nrpe.xinetd.erb
139
- - lib/deprec/templates/nagios/resource.cfg.erb
137
+ - lib/deprec/templates/nagios/objects/commands.cfg
138
+ - lib/deprec/templates/nagios/objects/contacts.cfg
139
+ - lib/deprec/templates/nagios/objects/localhost.cfg
140
+ - lib/deprec/templates/nagios/objects/templates.cfg
141
+ - lib/deprec/templates/nagios/objects/timeperiods.cfg
142
+ - lib/deprec/templates/nagios/README
143
+ - lib/deprec/templates/nagios/resource.cfg
140
144
  - lib/deprec/templates/nagios/services.cfg.erb
141
- - lib/deprec/templates/nagios/templates.cfg.erb
142
- - lib/deprec/templates/nagios/timeperiods.cfg.erb
145
+ - lib/deprec/templates/nagios_config.tgz
143
146
  - lib/deprec/templates/network/hostname.erb
144
147
  - lib/deprec/templates/network/hosts.erb
145
148
  - lib/deprec/templates/network/interfaces.erb
@@ -152,7 +155,17 @@ files:
152
155
  - lib/deprec/templates/nginx/nothing.conf
153
156
  - lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
154
157
  - lib/deprec/templates/ntp/ntp.conf.erb
158
+ - lib/deprec/templates/old/apache_vhost.erb
159
+ - lib/deprec/templates/old/cgi.cfg.erb
160
+ - lib/deprec/templates/old/commands.cfg.erb
161
+ - lib/deprec/templates/old/contacts.cfg.erb
162
+ - lib/deprec/templates/old/htpasswd.users
163
+ - lib/deprec/templates/old/localhost.cfg.erb
164
+ - lib/deprec/templates/old/resource.cfg.erb
165
+ - lib/deprec/templates/old/templates.cfg.erb
166
+ - lib/deprec/templates/old/timeperiods.cfg.erb
155
167
  - lib/deprec/templates/passenger/apache_vhost.erb
168
+ - lib/deprec/templates/passenger/logrotate.conf.erb
156
169
  - lib/deprec/templates/passenger/passenger.conf.erb
157
170
  - lib/deprec/templates/passenger/passenger.load.erb
158
171
  - lib/deprec/templates/postfix/aliases.erb