]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | =============== |
2 | Telegraf Module | |
3 | =============== | |
4 | The Telegraf module collects and sends statistics series to a Telegraf agent. | |
5 | ||
6 | The Telegraf agent can buffer, aggregate, parse and process the data before | |
7 | sending it to an output which can be InfluxDB, ElasticSearch and many more. | |
8 | ||
9 | Currently the only way to send statistics to Telegraf from this module is to | |
10 | use the socket listener. The module can send statistics over UDP, TCP or | |
11 | a UNIX socket. | |
12 | ||
13 | The Telegraf module was introduced in the 13.x *Mimic* release. | |
14 | ||
15 | -------- | |
16 | Enabling | |
17 | -------- | |
18 | ||
19 | To enable the module, use the following command: | |
20 | ||
21 | :: | |
22 | ||
23 | ceph mgr module enable telegraf | |
24 | ||
25 | If you wish to subsequently disable the module, you can use the corresponding | |
26 | *disable* command: | |
27 | ||
28 | :: | |
29 | ||
30 | ceph mgr module disable telegraf | |
31 | ||
32 | ------------- | |
33 | Configuration | |
34 | ------------- | |
35 | ||
36 | For the telegraf module to send statistics to a Telegraf agent it is | |
37 | required to configure the address to send the statistics to. | |
38 | ||
39 | Set configuration values using the following command: | |
40 | ||
41 | :: | |
42 | ||
43 | ceph telegraf config-set <key> <value> | |
44 | ||
45 | ||
46 | The most important settings are ``address`` and ``interval``. | |
47 | ||
48 | For example, a typical configuration might look like this: | |
49 | ||
50 | :: | |
51 | ||
52 | ceph telegraf config-set address udp://:8094 | |
53 | ceph telegraf config-set interval 10 | |
54 | ||
55 | The default values for these configuration keys are: | |
56 | ||
57 | - address: unixgram:///tmp/telegraf.sock | |
58 | - interval: 15 | |
59 | ||
60 | ---------------- | |
61 | Socket Listener | |
62 | ---------------- | |
63 | The module only supports sending data to Telegraf through the socket listener | |
64 | of the Telegraf module using the Influx data format. | |
65 | ||
20effc67 | 66 | A typical Telegraf configuration might be |
11fdf7f2 | 67 | |
20effc67 | 68 | :: |
11fdf7f2 TL |
69 | |
70 | [[inputs.socket_listener]] | |
71 | # service_address = "tcp://:8094" | |
72 | # service_address = "tcp://127.0.0.1:http" | |
73 | # service_address = "tcp4://:8094" | |
74 | # service_address = "tcp6://:8094" | |
75 | # service_address = "tcp6://[2001:db8::1]:8094" | |
76 | service_address = "udp://:8094" | |
77 | # service_address = "udp4://:8094" | |
78 | # service_address = "udp6://:8094" | |
79 | # service_address = "unix:///tmp/telegraf.sock" | |
80 | # service_address = "unixgram:///tmp/telegraf.sock" | |
81 | data_format = "influx" | |
82 | ||
83 | In this case the `address` configuration option for the module would need to be set | |
84 | to: | |
85 | ||
20effc67 TL |
86 | :: |
87 | ||
11fdf7f2 TL |
88 | udp://:8094 |
89 | ||
90 | ||
91 | Refer to the Telegraf documentation for more configuration options. |