blob: b5ea9c640671582054ee1b83ef3e8d2d464fb086 [file] [log] [blame]
Filip Pytloun6d4b7a22015-10-06 16:28:31 +02001========
2Collectd
3========
4
Ales Komarek28f26b32015-12-03 22:23:28 +01005Collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files.
Filip Pytloun6d4b7a22015-10-06 16:28:31 +02006
7Sample pillars
8==============
9
Ales Komarek2675e842016-10-05 00:10:44 +020010Data writers
11------------
12
Ales Komarek60fe7792015-11-19 09:45:42 +010013Send data over TCP to Graphite Carbon
Filip Pytloun6d4b7a22015-10-06 16:28:31 +020014
15.. code-block:: yaml
16
17 collectd:
18 client:
19 enabled: true
20 read_interval: 60
Ales Komarek60fe7792015-11-19 09:45:42 +010021 backend:
Ales Komarek2675e842016-10-05 00:10:44 +020022 carbon_service:
23 engine: carbon
Ales Komarek60fe7792015-11-19 09:45:42 +010024 host: carbon1.comain.com
25 port: 2003
Filip Pytloun6d4b7a22015-10-06 16:28:31 +020026
27Send data over AMQP
28
29.. code-block:: yaml
30
31 collectd:
32 client:
33 enabled: true
34 read_interval: 60
Ales Komarek60fe7792015-11-19 09:45:42 +010035 backend:
Ales Komarek2675e842016-10-05 00:10:44 +020036 amqp_broker:
37 engine: amqp
Ales Komarek60fe7792015-11-19 09:45:42 +010038 host: broker1.comain.com
39 port: 5672
40 user: monitor
41 password: amqp-pwd
Ales Komarek2675e842016-10-05 00:10:44 +020042 virtual_host: '/monitor'
43
44Send data over HTTP
45
46.. code-block:: yaml
47
48 collectd:
49 client:
50 enabled: true
51 read_interval: 60
52 backend:
53 http_service:
54 engine: http
55 host: service.comain.com
56 port: 8123
57
58
59Data collectors
60---------------
61
Filip Pytloun6d4b7a22015-10-06 16:28:31 +020062
Ales Komarek60fe7792015-11-19 09:45:42 +010063Monitor network devices, defined in 'external' dictionary
Filip Pytloun6d4b7a22015-10-06 16:28:31 +020064
65.. code-block:: yaml
66
Ales Komarek60fe7792015-11-19 09:45:42 +010067 external:
68 network_device:
69 MX80-01:
70 community: test
71 model: Juniper_MX80
72 management:
73 address: 10.0.0.254
74 port: fxp01
75 engine: snmp/ssh
76 interface:
77 xe-0/0/0:
78 description: MEMBER-OF-LACP-TO-QFX
79 type: 802.3ad
80 subinterface:
81 xe-0/0/0.0:
82 description: MEMBER-OF-LACP-TO-QFX
Filip Pytloun6d4b7a22015-10-06 16:28:31 +020083 collectd:
84 client:
85 enabled: true
Ales Komarek60fe7792015-11-19 09:45:42 +010086 ...
Filip Pytloun6d4b7a22015-10-06 16:28:31 +020087
Ales Komarek5831a2d2016-06-06 11:54:06 +020088Collecting the SNMP metrics
89
90.. code-block:: yaml
91
92 collectd:
93 client:
94 data:
95 connected_devices:
96 type: devices
97 values:
98 - IF-MIB::ifNumber.0
99 host:
100 ubiquity:
101 address: 10.0.0.1
102 community: public
103 version: 2
104 data:
105 - connected_devices
106
107
Ales Komarek4550e8c2016-09-28 22:20:28 +0200108Collecting the cURL response times and codes
109
110.. code-block:: yaml
111
112 collectd:
113 client:
114 check:
115 curl:
116 service1:
117 url: "https://service.domain.com:443/"
118 service2:
119 url: "https://service.domain.com:443/"
120
121
122Collecting the ping response times
123
124.. code-block:: yaml
125
126 collectd:
127 client:
128 check:
129 ping:
130 host_label1:
131 host: "172.10.31.14"
132 host_label2:
133 host: "172.10.31.12"
134
Filip Pytloun6d4b7a22015-10-06 16:28:31 +0200135Read more
136=========
137
138* http://collectd.org/documentation.shtml
139* http://www.canopsis.org/2013/02/collectd-graphite/
140* http://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_libvirt
141* http://libvirt.org/uri.html#URI_qemu