deprec 2.0.15 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/CHANGELOG +7 -1
  2. data/lib/deprec/capistrano_extensions.rb +1 -1
  3. data/lib/deprec/recipes/collectd.rb +60 -79
  4. data/lib/deprec/recipes/haproxy.rb +105 -0
  5. data/lib/deprec/recipes/nagios.rb +90 -72
  6. data/lib/deprec/recipes/postfix.rb +1 -1
  7. data/lib/deprec/recipes/ssh.rb +1 -1
  8. data/lib/deprec/recipes/syslog.rb +63 -0
  9. data/lib/deprec/recipes/utils.rb +1 -1
  10. data/lib/deprec/recipes_minus_rails.rb +2 -0
  11. data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
  12. data/lib/deprec/templates/nagios/{cgi.cfg → cgi.cfg.erb} +27 -2
  13. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  14. data/lib/deprec/templates/nagios/{nagios.cfg → nagios.cfg.erb} +35 -7
  15. data/lib/deprec/templates/nagios/nrpe.cfg.erb +15 -3
  16. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +1 -1
  17. data/lib/deprec/templates/nagios/objects/{commands.cfg → commands.cfg.erb} +27 -2
  18. data/lib/deprec/templates/nagios/objects/{contacts.cfg → contacts.cfg.erb} +23 -0
  19. data/lib/deprec/templates/nagios/{hosts.cfg.erb → objects/hosts.cfg.erb} +30 -54
  20. data/lib/deprec/templates/{old → nagios/objects}/localhost.cfg.erb +0 -41
  21. data/lib/deprec/templates/nagios/{services.cfg.erb → objects/services.cfg.erb} +88 -2
  22. data/lib/deprec/templates/{old → nagios/objects}/timeperiods.cfg.erb +0 -0
  23. data/lib/deprec/templates/{old → nagios}/resource.cfg.erb +1 -1
  24. data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
  25. data/lib/deprec/templates/syslog/syslogd.erb +13 -0
  26. metadata +16 -22
  27. data/lib/deprec/templates/nagios/objects/localhost.cfg +0 -157
  28. data/lib/deprec/templates/nagios/objects/templates.cfg +0 -190
  29. data/lib/deprec/templates/nagios/objects/timeperiods.cfg +0 -94
  30. data/lib/deprec/templates/nagios/resource.cfg +0 -34
  31. data/lib/deprec/templates/nagios_config.tgz +0 -0
  32. data/lib/deprec/templates/old/apache_vhost.erb +0 -45
  33. data/lib/deprec/templates/old/cgi.cfg.erb +0 -321
  34. data/lib/deprec/templates/old/commands.cfg.erb +0 -240
  35. data/lib/deprec/templates/old/contacts.cfg.erb +0 -57
  36. data/lib/deprec/templates/old/htpasswd.users +0 -1
  37. data/lib/deprec/templates/old/templates.cfg.erb +0 -9
@@ -12,7 +12,7 @@ Capistrano::Configuration.instance(:must_exist).load do
12
12
  end
13
13
 
14
14
  # Install dependencies for Postfix
15
- task :install_deps do
15
+ task :install_deps, :roles => :mail do
16
16
  # mutt and mailx are useful tools for testing mail
17
17
  # e.g. echo test | mail test@gmail.com
18
18
  apt.install( {:base => %w(postfix mutt mailx)}, :stable )
@@ -74,7 +74,7 @@ Capistrano::Configuration.instance(:must_exist).load do
74
74
  # If the user has specified a key Capistrano should use
75
75
  if ssh_options[:keys]
76
76
  deprec2.mkdir '.ssh', :mode => 0700
77
- put(ssh_options[:keys].collect{|key| File.read(key)}.join("\n"), '.ssh/authorized_keys', :mode => 0600 )
77
+ put(ssh_options[:keys].collect{|key| File.read("#{key}.pub")}.join("\n"), '.ssh/authorized_keys', :mode => 0600 )
78
78
 
79
79
  # Try to find the current users public key
80
80
  elsif keys = %w[id_rsa id_dsa identity].collect { |f| "#{ENV['HOME']}/.ssh/#{f}.pub" if File.exists?("#{ENV['HOME']}/.ssh/#{f}.pub") }.compact
@@ -0,0 +1,63 @@
1
+ # Copyright 2006-2009 by Mike Bailey. All rights reserved.
2
+ Capistrano::Configuration.instance(:must_exist).load do
3
+ namespace :deprec do
4
+ namespace :syslog do
5
+
6
+ set(:syslog_server) { Capistrano::CLI.ui.ask 'Enter Syslog server hostname' }
7
+
8
+ desc "Install syslog"
9
+ task :install do
10
+ install_deps
11
+ end
12
+
13
+ # install dependencies for sysklogd
14
+ task :install_deps do
15
+ apt.install( {:base => %w(sysklogd)}, :stable )
16
+ end
17
+
18
+ SYSTEM_CONFIG_FILES[:syslog] = [
19
+
20
+ { :template => 'syslog.conf.erb',
21
+ :path => '/etc/syslog.conf',
22
+ :mode => 0644,
23
+ :owner => 'root:root'},
24
+
25
+ { :template => 'syslogd.erb',
26
+ :path => '/etc/defaults/syslogd',
27
+ :mode => 0644,
28
+ :owner => 'root:root'}
29
+
30
+ ]
31
+
32
+ desc "Generate Syslog configs"
33
+ task :config_gen do
34
+ SYSTEM_CONFIG_FILES[:syslog].each do |file|
35
+ deprec2.render_template(:syslog, file)
36
+ end
37
+ end
38
+
39
+ desc "Push Syslog config files to server"
40
+ task :config, :roles => :all_hosts, :except => {:syslog_master => true} do
41
+ deprec2.push_configs(:syslog, SYSTEM_CONFIG_FILES[:syslog])
42
+ restart
43
+ end
44
+
45
+ desc "Start Syslog"
46
+ task :start, :roles => :all_hosts, :except => { :syslog_master => true } do
47
+ run "#{sudo} /etc/init.d/sysklogd start"
48
+ end
49
+
50
+ desc "Stop Syslog"
51
+ task :stop, :roles => :all_hosts, :except => { :syslog_master => true } do
52
+ run "#{sudo} /etc/init.d/sysklogd stop"
53
+ end
54
+
55
+ desc "Restart Syslog"
56
+ task :restart, :roles => :all_hosts, :except => { :syslog_master => true } do
57
+ run "#{sudo} /etc/init.d/sysklogd restart"
58
+ end
59
+
60
+ end
61
+
62
+ end
63
+ end
@@ -41,7 +41,7 @@ Capistrano::Configuration.instance(:must_exist).load do
41
41
 
42
42
  desc "Install some useful utils"
43
43
  task :other do
44
- apps = %w(vim-full tree)
44
+ apps = %w(vim-full tree psmisc)
45
45
  apt.install( {:base => apps}, :stable )
46
46
  end
47
47
 
@@ -45,7 +45,9 @@ require "#{File.dirname(__FILE__)}/recipes/monit"
45
45
  require "#{File.dirname(__FILE__)}/recipes/network"
46
46
  require "#{File.dirname(__FILE__)}/recipes/nagios"
47
47
  require "#{File.dirname(__FILE__)}/recipes/collectd"
48
+ require "#{File.dirname(__FILE__)}/recipes/syslog"
48
49
  require "#{File.dirname(__FILE__)}/recipes/heartbeat"
50
+ # require "#{File.dirname(__FILE__)}/recipes/haproxy"
49
51
 
50
52
  require "#{File.dirname(__FILE__)}/recipes/ubuntu"
51
53
  require "#{File.dirname(__FILE__)}/recipes/lvm"
@@ -0,0 +1,686 @@
1
+ #
2
+ # Config file for collectd(1).
3
+ # Please read collectd.conf(5) for a list of options.
4
+ # http://collectd.org/
5
+ #
6
+
7
+ ##############################################################################
8
+ # Global #
9
+ #----------------------------------------------------------------------------#
10
+ # Global settings for the daemon. #
11
+ ##############################################################################
12
+
13
+ #Hostname "localhost"
14
+ FQDNLookup true
15
+ #BaseDir "/usr/local/var/lib/collectd"
16
+ #PIDFile "/usr/local/var/run/collectd.pid"
17
+ #PluginDir "/usr/local/lib/collectd"
18
+ #TypesDB "/usr/local/share/collectd/types.db"
19
+ #Interval 10
20
+ #ReadThreads 5
21
+
22
+ ##############################################################################
23
+ # Logging #
24
+ #----------------------------------------------------------------------------#
25
+ # Plugins which provide logging functions should be loaded first, so log #
26
+ # messages generated when loading or configuring other plugins can be #
27
+ # accessed. #
28
+ ##############################################################################
29
+
30
+ LoadPlugin syslog
31
+ #LoadPlugin logfile
32
+
33
+ #<Plugin logfile>
34
+ # LogLevel info
35
+ # File STDOUT
36
+ # Timestamp true
37
+ #</Plugin>
38
+
39
+ #<Plugin syslog>
40
+ # LogLevel info
41
+ #</Plugin>
42
+
43
+ ##############################################################################
44
+ # LoadPlugin section #
45
+ #----------------------------------------------------------------------------#
46
+ # Lines beginning with a single `#' belong to plugins which have been built #
47
+ # but are disabled by default. #
48
+ # #
49
+ # Lines begnning with `##' belong to plugins which have not been built due #
50
+ # to missing dependencies or because they have been deactivated explicitly. #
51
+ ##############################################################################
52
+
53
+ LoadPlugin apache
54
+ #LoadPlugin apcups
55
+ ##LoadPlugin apple_sensors
56
+ #LoadPlugin ascent
57
+ #LoadPlugin battery
58
+ #LoadPlugin bind
59
+ #LoadPlugin conntrack
60
+ LoadPlugin cpu
61
+ #LoadPlugin cpufreq
62
+ #LoadPlugin csv
63
+ #LoadPlugin curl
64
+ #LoadPlugin dbi
65
+ #LoadPlugin df
66
+ #LoadPlugin disk
67
+ #LoadPlugin dns
68
+ #LoadPlugin email
69
+ #LoadPlugin entropy
70
+ #LoadPlugin exec
71
+ #LoadPlugin filecount
72
+ #LoadPlugin fscache
73
+ ##LoadPlugin gmond
74
+ #LoadPlugin hddtemp
75
+ LoadPlugin interface
76
+ #LoadPlugin iptables
77
+ ##LoadPlugin ipmi
78
+ ##LoadPlugin ipvs
79
+ #LoadPlugin irq
80
+ ##LoadPlugin java
81
+ ##LoadPlugin libvirt
82
+ LoadPlugin load
83
+ #LoadPlugin mbmon
84
+ ##LoadPlugin memcachec
85
+ #LoadPlugin memcached
86
+ LoadPlugin memory
87
+ #LoadPlugin multimeter
88
+ #LoadPlugin mysql
89
+ ##LoadPlugin netlink
90
+ LoadPlugin network
91
+ #LoadPlugin nfs
92
+ #LoadPlugin nginx
93
+ #LoadPlugin notify_desktop
94
+ #LoadPlugin notify_email
95
+ #LoadPlugin ntpd
96
+ #LoadPlugin nut
97
+ ##LoadPlugin onewire
98
+ #LoadPlugin openvpn
99
+ ##LoadPlugin oracle
100
+ #LoadPlugin perl
101
+ #LoadPlugin ping
102
+ #LoadPlugin postgresql
103
+ #LoadPlugin powerdns
104
+ #LoadPlugin processes
105
+ #LoadPlugin protocols
106
+ ##LoadPlugin rrdcached
107
+ LoadPlugin rrdtool
108
+ #LoadPlugin sensors
109
+ #LoadPlugin serial
110
+ ##LoadPlugin snmp
111
+ #LoadPlugin swap
112
+ #LoadPlugin table
113
+ #LoadPlugin tail
114
+ ##LoadPlugin tape
115
+ #LoadPlugin tcpconns
116
+ #LoadPlugin teamspeak2
117
+ #LoadPlugin ted
118
+ #LoadPlugin thermal
119
+ #LoadPlugin unixsock
120
+ #LoadPlugin uptime
121
+ #LoadPlugin users
122
+ #LoadPlugin uuid
123
+ #LoadPlugin vmem
124
+ #LoadPlugin vserver
125
+ #LoadPlugin wireless
126
+ ##LoadPlugin xmms
127
+
128
+ ##############################################################################
129
+ # Plugin configuration #
130
+ #----------------------------------------------------------------------------#
131
+ # In this section configuration stubs for each plugin are provided. A desc- #
132
+ # ription of those options is available in the collectd.conf(5) manual page. #
133
+ ##############################################################################
134
+
135
+ <Plugin apache>
136
+ URL "http://localhost/server-status?auto"
137
+ # User "www-user"
138
+ # Password "secret"
139
+ # CACert "/etc/ssl/ca.crt"
140
+ </Plugin>
141
+
142
+ #<Plugin apcups>
143
+ # Host "localhost"
144
+ # Port "3551"
145
+ #</Plugin>
146
+
147
+ #<Plugin ascent>
148
+ # URL "http://localhost/ascent/status/"
149
+ # User "www-user"
150
+ # Password "secret"
151
+ # CACert "/etc/ssl/ca.crt"
152
+ #</Plugin>
153
+
154
+ #<Plugin "bind">
155
+ # URL "http://localhost:8053/"
156
+ # OpCodes true
157
+ # QTypes true
158
+ #
159
+ # ServerStats true
160
+ # ZoneMaintStats true
161
+ # ResolverStats false
162
+ # MemoryStats true
163
+ #
164
+ # <View "_default">
165
+ # QTypes true
166
+ # ResolverStats true
167
+ # CacheRRSets true
168
+ #
169
+ # Zone "127.in-addr.arpa/IN"
170
+ # </View>
171
+ #</Plugin>
172
+
173
+ #<Plugin csv>
174
+ # DataDir "/usr/local/var/lib/collectd/csv"
175
+ # StoreRates false
176
+ #</Plugin>
177
+
178
+ #<Plugin curl>
179
+ # <Page "stock_quotes">
180
+ # URL "http://finance.google.com/finance?q=NYSE%3AAMD"
181
+ # User "foo"
182
+ # Password "bar"
183
+ # <Match>
184
+ # Regex "<span +class=\"pr\"[^>]*> *([0-9]*\\.[0-9]+) *</span>"
185
+ # DSType "GaugeAverage"
186
+ # Type "stock_value"
187
+ # Instance "AMD"
188
+ # </Match>
189
+ # </Page>
190
+ #</Plugin>
191
+
192
+ #<Plugin dbi>
193
+ # <Query "num_of_customers">
194
+ # Statement "SELECT 'customers' AS c_key, COUNT(*) AS c_value FROM customers_tbl"
195
+ # <Result>
196
+ # Type "gauge"
197
+ # InstancesFrom "c_key"
198
+ # ValuesFrom "c_value"
199
+ # </Result>
200
+ # </Query>
201
+ # <Database "customers_db">
202
+ # Driver "mysql"
203
+ # DriverOption "host" "localhost"
204
+ # DriverOption "username" "collectd"
205
+ # DriverOption "password" "AeXohy0O"
206
+ # DriverOption "dbname" "custdb0"
207
+ # #SelectDB "custdb0"
208
+ # Query "num_of_customers"
209
+ # #Query "..."
210
+ # </Database>
211
+ #</Plugin>
212
+
213
+ #<Plugin df>
214
+ # Device "/dev/hda1"
215
+ # Device "192.168.0.2:/mnt/nfs"
216
+ # MountPoint "/home"
217
+ # FSType "ext3"
218
+ # IgnoreSelected false
219
+ #</Plugin>
220
+
221
+ #<Plugin disk>
222
+ # Disk "/^[hs]d[a-f][0-9]?$/"
223
+ # IgnoreSelected false
224
+ #</Plugin>
225
+
226
+ #<Plugin dns>
227
+ # Interface "eth0"
228
+ # IgnoreSource "192.168.0.1"
229
+ #</Plugin>
230
+
231
+ #<Plugin email>
232
+ # SocketFile "/usr/local/var/run/collectd-email"
233
+ # SocketGroup "collectd"
234
+ # SocketPerms "0770"
235
+ # MaxConns 5
236
+ #</Plugin>
237
+
238
+ #<Plugin exec>
239
+ # Exec "user:group" "/path/to/exec"
240
+ # NotificationExec "user:group" "/path/to/exec"
241
+ #</Plugin>
242
+
243
+ #<Plugin filecount>
244
+ # <Directory "/path/to/dir">
245
+ # Instance "foodir"
246
+ # Name "*.conf"
247
+ # MTime "-5m"
248
+ # Size "+10k"
249
+ # Recursive true
250
+ # </Directory>
251
+ #</Plugin>
252
+
253
+ #<Plugin "gmond">
254
+ # MCReceiveFrom "239.2.11.71" "8649"
255
+ # <Metric "swap_total">
256
+ # Type "swap"
257
+ # TypeInstance "total"
258
+ # DataSource "value"
259
+ # </Metric>
260
+ # <Metric "swap_free">
261
+ # Type "swap"
262
+ # TypeInstance "free"
263
+ # DataSource "value"
264
+ # </Metric>
265
+ #</Plugin>
266
+
267
+ #<Plugin hddtemp>
268
+ # Host "127.0.0.1"
269
+ # Port "7634"
270
+ #
271
+ # #----------------------------------------------------------------#
272
+ # # `TranslateDevicename' enabled backwards compatibility behavior #
273
+ # # and is enabled by default. Setting this option to `false' is #
274
+ # # highly recommended. #
275
+ # #----------------------------------------------------------------#
276
+ # TranslateDevicename false
277
+ #</Plugin>
278
+
279
+ #<Plugin interface>
280
+ # Interface "eth0"
281
+ # IgnoreSelected false
282
+ #</Plugin>
283
+
284
+ #<Plugin ipmi>
285
+ # Sensor "some_sensor"
286
+ # Sensor "another_one"
287
+ # IgnoreSelected false
288
+ # NotifySensorAdd false
289
+ # NotifySensorRemove true
290
+ # NotifySensorNotPresent false
291
+ #</Plugin>
292
+
293
+ #<Plugin iptables>
294
+ # Chain table chain
295
+ #</Plugin>
296
+
297
+ #<Plugin irq>
298
+ # Irq 7
299
+ # Irq 8
300
+ # Irq 9
301
+ # IgnoreSelected true
302
+ #</Plugin>
303
+
304
+ #<Plugin "java">
305
+ # JVMArg "-verbose:jni"
306
+ # JVMArg "-Djava.class.path=/opt/collectd/lib/collectd/bindings/java"
307
+ #
308
+ # LoadPlugin "org.collectd.java.Foobar"
309
+ # <Plugin "org.collectd.java.Foobar">
310
+ # # To be parsed by the plugin
311
+ # </Plugin>
312
+ #</Plugin>
313
+
314
+ #<Plugin libvirt>
315
+ # Connection "xen:///"
316
+ # RefreshInterval 60
317
+ # Domain "name"
318
+ # BlockDevice "name:device"
319
+ # InterfaceDevice "name:device"
320
+ # IgnoreSelected false
321
+ # HostnameFormat name
322
+ #</Plugin>
323
+
324
+ #<Plugin mbmon>
325
+ # Host "127.0.0.1"
326
+ # Port "411"
327
+ #</Plugin>
328
+
329
+ #<Plugin memcachec>
330
+ # <Page "plugin_instance">
331
+ # Server "localhost"
332
+ # Key "page_key"
333
+ # <Match>
334
+ # Regex "(\\d+) bytes sent"
335
+ # DSType CounterAdd
336
+ # Type "ipt_octets"
337
+ # Instance "type_instance"
338
+ # </Match>
339
+ # </Page>
340
+ #</Plugin>
341
+
342
+ #<Plugin memcached>
343
+ # Host "127.0.0.1"
344
+ # Port "11211"
345
+ #</Plugin>
346
+
347
+ #<Plugin mysql>
348
+ # <Database db_name>
349
+ # Host "database.serv.er"
350
+ # User "db_user"
351
+ # Password "secret"
352
+ # Database "db_name"
353
+ # MasterStats true
354
+ # </Database>
355
+ #
356
+ # <Database db_name2>
357
+ # Host "localhost"
358
+ # Socket "/var/run/mysql/mysqld.sock"
359
+ # SlaveStats true
360
+ # SlaveNotifications true
361
+ # </Database>
362
+ #</Plugin>
363
+
364
+ #<Plugin netlink>
365
+ # Interface "All"
366
+ # VerboseInterface "All"
367
+ # QDisc "eth0" "pfifo_fast-1:0"
368
+ # Class "ppp0" "htb-1:10"
369
+ # Filter "ppp0" "u32-1:0"
370
+ # IgnoreSelected false
371
+ #</Plugin>
372
+
373
+ <Plugin network>
374
+ Server "<%= collectd_server %>" "25826"
375
+ # Server "239.192.74.66" "25826"
376
+ # Listen "ff18::efc0:4a42" "25826"
377
+ # Listen "239.192.74.66" "25826"
378
+ # TimeToLive "128"
379
+ # Forward false
380
+ # CacheFlush 1800
381
+ </Plugin>
382
+
383
+ #<Plugin nginx>
384
+ # URL "http://localhost/status?auto"
385
+ # User "www-user"
386
+ # Password "secret"
387
+ # CACert "/etc/ssl/ca.crt"
388
+ #</Plugin>
389
+
390
+ #<Plugin notify_desktop>
391
+ # OkayTimeout 1000
392
+ # WarningTimeout 5000
393
+ # FailureTimeout 0
394
+ #</Plugin>
395
+
396
+ #<Plugin notify_email>
397
+ # SMTPServer "localhost"
398
+ # SMTPPort 25
399
+ # SMTPUser "my-username"
400
+ # SMTPPassword "my-password"
401
+ # From "collectd@main0server.com"
402
+ # # <WARNING/FAILURE/OK> on <hostname>. beware! do not use not more than two %s in this string!!!
403
+ # Subject "Aaaaaa!! %s on %s!!!!!"
404
+ # Recipient "email1@domain1.net"
405
+ # Recipient "email2@domain2.com"
406
+ #</Plugin>
407
+
408
+ #<Plugin ntpd>
409
+ # Host "localhost"
410
+ # Port 123
411
+ # ReverseLookups false
412
+ #</Plugin>
413
+
414
+ #<Plugin nut>
415
+ # UPS "upsname@hostname:port"
416
+ #</Plugin>
417
+
418
+ #<Plugin onewire>
419
+ # Device "-s localhost:4304"
420
+ # Sensor "F10FCA000800"
421
+ # IgnoreSelected false
422
+ #</Plugin>
423
+
424
+ #<Plugin openvpn>
425
+ # StatusFile "/etc/openvpn/openvpn-status.log"
426
+ #</Plugin>
427
+
428
+ #<Plugin oracle>
429
+ # <Query "out_of_stock">
430
+ # Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category"
431
+ # <Result>
432
+ # Type "gauge"
433
+ # InstancesFrom "category"
434
+ # ValuesFrom "value"
435
+ # </Result>
436
+ # </Query>
437
+ # <Database "product_information">
438
+ # ConnectID "db01"
439
+ # Username "oracle"
440
+ # Password "secret"
441
+ # Query "out_of_stock"
442
+ # </Database>
443
+ #</Plugin>
444
+
445
+ #<Plugin perl>
446
+ # IncludeDir "/my/include/path"
447
+ # BaseName "Collectd::Plugin"
448
+ # EnableDebugger ""
449
+ # LoadPlugin foo
450
+ #
451
+ # <Plugin foo>
452
+ # Foo "Bar"
453
+ # Qux "Baz"
454
+ # </Plugin>
455
+ #</Plugin>
456
+
457
+ #<Plugin ping>
458
+ # Host "host.foo.bar"
459
+ # TTL 255
460
+ #</Plugin>
461
+
462
+ #<Plugin postgresql>
463
+ # <Query magic>
464
+ # Statement "SELECT magic FROM wizard WHERE host = $1;"
465
+ # Param hostname
466
+ # <Result>
467
+ # Type gauge
468
+ # InstancePrefix "magic"
469
+ # ValuesFrom magic
470
+ # </Result>
471
+ # </Query>
472
+ # <Query rt36_tickets>
473
+ # Statement "SELECT COUNT(type) AS count, type \
474
+ # FROM (SELECT CASE \
475
+ # WHEN resolved = 'epoch' THEN 'open' \
476
+ # ELSE 'resolved' END AS type \
477
+ # FROM tickets) type \
478
+ # GROUP BY type;"
479
+ # <Result>
480
+ # Type counter
481
+ # InstancePrefix "rt36_tickets"
482
+ # InstancesFrom "type"
483
+ # ValuesFrom "count"
484
+ # </Result>
485
+ # </Query>
486
+ # <Database foo>
487
+ # Host "hostname"
488
+ # Port "5432"
489
+ # User "username"
490
+ # Password "secret"
491
+ # SSLMode "prefer"
492
+ # KRBSrvName "kerberos_service_name"
493
+ # Query magic
494
+ # </Database>
495
+ # <Database bar>
496
+ # Service "service_name"
497
+ # Query backend # predefined
498
+ # Query rt36_tickets
499
+ # </Database>
500
+ #</Plugin>
501
+
502
+ #<Plugin powerdns>
503
+ # <Server "server_name">
504
+ # Collect "latency"
505
+ # Collect "udp-answers" "udp-queries"
506
+ # Socket "/var/run/pdns.controlsocket"
507
+ # </Server>
508
+ # <Recursor "recursor_name">
509
+ # Collect "questions"
510
+ # Collect "cache-hits" "cache-misses"
511
+ # Socket "/var/run/pdns_recursor.controlsocket"
512
+ # </Recursor>
513
+ # LocalSocket "/opt/collectd/var/run/collectd-powerdns"
514
+ #</Plugin>
515
+
516
+ #<Plugin processes>
517
+ # Process "name"
518
+ #</Plugin>
519
+
520
+ #<Plugin protocols>
521
+ # Value "/^Tcp:/"
522
+ # IgnoreSelected false
523
+ #</Plugin>
524
+
525
+ #<Plugin rrdcached>
526
+ # DaemonAddress "unix:/tmp/rrdcached.sock"
527
+ # DataDir "/usr/local/var/lib/collectd/rrd"
528
+ # CreateFiles true
529
+ # CollectStatistics true
530
+ #</Plugin>
531
+
532
+ #<Plugin rrdtool>
533
+ # DataDir "/usr/local/var/lib/collectd/rrd"
534
+ # CacheTimeout 120
535
+ # CacheFlush 900
536
+ #</Plugin>
537
+
538
+ #<Plugin sensors>
539
+ # Sensor "it8712-isa-0290/temperature-temp1"
540
+ # Sensor "it8712-isa-0290/fanspeed-fan3"
541
+ # Sensor "it8712-isa-0290/voltage-in8"
542
+ # IgnoreSelected false
543
+ #</Plugin>
544
+
545
+ #<Plugin snmp>
546
+ # <Data "powerplus_voltge_input">
547
+ # Type "voltage"
548
+ # Table false
549
+ # Instance "input_line1"
550
+ # Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1"
551
+ # </Data>
552
+ # <Data "hr_users">
553
+ # Type "users"
554
+ # Table false
555
+ # Instance ""
556
+ # Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0"
557
+ # </Data>
558
+ # <Data "std_traffic">
559
+ # Type "if_octets"
560
+ # Table true
561
+ # Instance "IF-MIB::ifDescr"
562
+ # Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
563
+ # </Data>
564
+ #
565
+ # <Host "some.switch.mydomain.org">
566
+ # Address "192.168.0.2"
567
+ # Version 1
568
+ # Community "community_string"
569
+ # Collect "std_traffic"
570
+ # Inverval 120
571
+ # </Host>
572
+ # <Host "some.server.mydomain.org">
573
+ # Address "192.168.0.42"
574
+ # Version 2
575
+ # Community "another_string"
576
+ # Collect "std_traffic" "hr_users"
577
+ # </Host>
578
+ # <Host "some.ups.mydomain.org">
579
+ # Address "192.168.0.3"
580
+ # Version 1
581
+ # Community "more_communities"
582
+ # Collect "powerplus_voltge_input"
583
+ # Interval 300
584
+ # </Host>
585
+ #</Plugin>
586
+
587
+ #<Plugin "table">
588
+ # <Table "/proc/slabinfo">
589
+ # Instance "slabinfo"
590
+ # Separator " "
591
+ # <Result>
592
+ # Type gauge
593
+ # InstancePrefix "active_objs"
594
+ # InstancesFrom 0
595
+ # ValuesFrom 1
596
+ # </Result>
597
+ # <Result>
598
+ # Type gauge
599
+ # InstancePrefix "objperslab"
600
+ # InstancesFrom 0
601
+ # ValuesFrom 4
602
+ # </Result>
603
+ # </Table>
604
+ #</Plugin>
605
+
606
+ #<Plugin "tail">
607
+ # <File "/var/log/exim4/mainlog">
608
+ # Instance "exim"
609
+ # <Match>
610
+ # Regex "S=([1-9][0-9]*)"
611
+ # DSType "CounterAdd"
612
+ # Type "ipt_bytes"
613
+ # Instance "total"
614
+ # </Match>
615
+ # <Match>
616
+ # Regex "\\<R=local_user\\>"
617
+ # DSType "CounterInc"
618
+ # Type "counter"
619
+ # Instance "local_user"
620
+ # </Match>
621
+ # </File>
622
+ #</Plugin>
623
+
624
+ #<Plugin tcpconns>
625
+ # ListeningPorts false
626
+ # LocalPort "25"
627
+ # RemotePort "25"
628
+ #</Plugin>
629
+
630
+ #<Plugin teamspeak2>
631
+ # Host "127.0.0.1"
632
+ # Port "51234"
633
+ # Server "8767"
634
+ #</Plugin>
635
+
636
+ #<Plugin ted>
637
+ # Device "/dev/ttyUSB0"
638
+ # Retries 0
639
+ #</Plugin>
640
+
641
+ #<Plugin thermal>
642
+ # ForceUseProcfs false
643
+ # Device "THRM"
644
+ # IgnoreSelected false
645
+ #</Plugin>
646
+
647
+ #<Plugin unixsock>
648
+ # SocketFile "/usr/local/var/run/collectd-unixsock"
649
+ # SocketGroup "collectd"
650
+ # SocketPerms "0660"
651
+ #</Plugin>
652
+
653
+ #<Plugin uuid>
654
+ # UUIDFile "/etc/uuid"
655
+ #</Plugin>
656
+
657
+ #<Plugin vmem>
658
+ # Verbose false
659
+ #</Plugin>
660
+
661
+ ##############################################################################
662
+ # Filter configuration #
663
+ #----------------------------------------------------------------------------#
664
+ # The following configures collectd's filtering mechanism. Before changing #
665
+ # anything in this section, please read the `FILTER CONFIGURATION' section #
666
+ # in the collectd.conf(5) manual page. #
667
+ ##############################################################################
668
+
669
+ # Load required matches:
670
+ #LoadPlugin match_regex
671
+ #LoadPlugin match_value
672
+ #LoadPlugin match_timediff
673
+
674
+ # Load required targets:
675
+ #LoadPlugin target_notification
676
+ #LoadPlugin target_replace
677
+ #LoadPlugin target_set
678
+
679
+ #----------------------------------------------------------------------------#
680
+ # The following block demonstrates the default behavior if no filtering is #
681
+ # configured at all: All values will be sent to all available write plugins. #
682
+ #----------------------------------------------------------------------------#
683
+
684
+ #<Chain "Main">
685
+ # Target "write"
686
+ #</Chain>