Collectd Installation
From r00tedvw.com wiki
(Difference between revisions)
| (3 intermediate revisions by one user not shown) | |||
| Line 10: | Line 10: | ||
Configure the network plugin | Configure the network plugin | ||
<nowiki><Plugin network> | <nowiki><Plugin network> | ||
| − | <Server " | + | <Server "127.0.0.1" "25826"> |
Username "influx" | Username "influx" | ||
Password "influxdb" | Password "influxdb" | ||
| − | |||
</Server> | </Server> | ||
</Plugin></nowiki> | </Plugin></nowiki> | ||
| + | |||
| + | ==Restart collectd and verify== | ||
| + | <nowiki>~$ sudo service collectd restart</nowiki> | ||
| + | Verify collectd is attempting to send data to the specified source | ||
| + | <nowiki>~$ sudo tcpdump -i lo -p -n dst port 25826 | ||
| + | tcpdump: verbose output suppressed, use -v or -vv for full protocol decode | ||
| + | listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes | ||
| + | 02:13:34.693172 IP 127.0.0.1.41099 > 127.0.0.1.25826: UDP, length 1323 | ||
| + | 02:13:44.681082 IP 127.0.0.1.41099 > 127.0.0.1.25826: UDP, length 1338 | ||
| + | </nowiki> | ||
| + | |||
| + | ===Update influx db conf=== | ||
| + | Enable influx db to ingest collectd data | ||
| + | <nowiki>~$ sudo vi /etc/influxdb/influxdb.conf | ||
| + | |||
| + | [[collectd]] | ||
| + | enabled = true | ||
| + | bind-address = ":25826" # the bind address | ||
| + | database = "collectd" # Name of the database that will be written to | ||
| + | retention-policy = "" | ||
| + | batch-size = 5000 # will flush if this many points get buffered | ||
| + | batch-pending = 10 # number of batches that may be pending in memory | ||
| + | batch-timeout = "10s" | ||
| + | read-buffer = 0 # UDP read buffer size, 0 means to use OS default | ||
| + | typesdb = "/usr/share/collectd/types.db" | ||
| + | </nowiki> | ||
| + | <nowiki>~$ sudo service influxdb restart</nowiki> | ||
Latest revision as of 01:25, 1 July 2016
Contents |
[edit] Ubuntu 14.04 Installation
~$ sudo apt-get update && sudo apt-get install collectd collectd-utils -y
[edit] Configuration
Backup the conf
~$ sudo cp /etc/collectd/collectd.conf /etc/collectd/collectd.conf_backup
Edit the conf
~$ sudo vi /etc/collectd/collectd.conf
Uncomment the network plugin to feed influxdb
LoadPlugin network
Configure the network plugin
<Plugin network>
<Server "127.0.0.1" "25826">
Username "influx"
Password "influxdb"
</Server>
</Plugin>
[edit] Restart collectd and verify
~$ sudo service collectd restart
Verify collectd is attempting to send data to the specified source
~$ sudo tcpdump -i lo -p -n dst port 25826 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes 02:13:34.693172 IP 127.0.0.1.41099 > 127.0.0.1.25826: UDP, length 1323 02:13:44.681082 IP 127.0.0.1.41099 > 127.0.0.1.25826: UDP, length 1338
[edit] Update influx db conf
Enable influx db to ingest collectd data
~$ sudo vi /etc/influxdb/influxdb.conf [[collectd]] enabled = true bind-address = ":25826" # the bind address database = "collectd" # Name of the database that will be written to retention-policy = "" batch-size = 5000 # will flush if this many points get buffered batch-pending = 10 # number of batches that may be pending in memory batch-timeout = "10s" read-buffer = 0 # UDP read buffer size, 0 means to use OS default typesdb = "/usr/share/collectd/types.db" ~$ sudo service influxdb restart