First,InfluxDB open collectd plug-in
InfluxDB now bring a COLLECTD plug-in to get the data from the COLLECTD client, it was not so convenient, oh, 0.8. Version 4 previously can only be connected by a third-party program such as Influxdb-collectd-proxy to COLLECTD and InfluxDB.
InfluxDB comes with the COLLECTD plug-in is turned off by default, you need to manually configure Open Enabled = True, and fill in the database = "COLLECTD" This line, where the "COLLECTD" is the one we created above, change the configuration remember Restart InfluxDB
After modifying the configuration restart, you will find that the INFLUXDB plug-in has started a port 25826, and if you find no data in the INFLUXDB database, be sure to check if the 25826 port is up and running.
#vim/etc/influxdb/influxdb.conf
[COLLECTD]
enabled = True
bind-address = ": 25826"
database = "COLLECTD"
# types.db can found in a COLLECTD installation or on GitHub:
# https://github.com/collectd/collectd/blob/master/src/types.db
#types. DB can be downloaded to this path from the above address
typesdb = "/usr/share/collectd/types.db"
batch-size =# would flush if this many points get buffered
batch-pending = Ten# Number of batches that is pending in memory
batch-timeout = "10s"# 'll flush at least-often even if we haven ' t hit buffer limit
read-buffer = 0# UDP Read buffer size, 0 means OS default. UDP listener would fail if set above OS max.
#service influxdb Restart
If you look at the Influxdb log, you will find the log output as follows, indicating that the plugin is turned on correctly
[httpd] 2016/02/26 09:47:39 starting HTTP Service
[httpd] 2016/02/26 09:47:39 authentication Enabled:false
[httpd] 2016/02/26 09:47:39 Listening on HTTP: [::]:8086
[COLLECTD] 2016/02/26 09:47:39 starting COLLECTD Service
[COLLECTD] 2016/02/26 09:47:39 Listening on UDP: [::]:25826
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7C/71/wKioL1bQTDrTNDz5AAAKM6zVUUw253.png "title=" QQ picture 20160226205950.png "alt=" Wkiol1bqtdrtndz5aaakm6zvuuw253.png "/>
Ii. Creating a COLLECTD database
Login http://172.18.1.113:8083/ Create a database named COLLECTD and Grafana with the input statement press ENTER
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7C/72/wKiom1bQTKnCLZaBAAA1R5v8zkU076.png "title=" Qq20160226210335.png "alt=" Wkiom1bqtknclzabaaa1r5v8zku076.png "/>
Second, client-side configuration COLLECTD
It seems that Yum installs all plugins by default, except that many plugins in the configuration file are comment states, and the test environment opens several plug-in tests.
#vim/etc/collectd.conf
Loadplugin load
Loadplugin Memory
Loadplugin Network
<plugin network>
Server "172.18.1.113" "25826"
</Plugin>
<plugin load>
Server "172.18.1.113" "25826"
</Plugin>
<plugin memory>
Server "172.18.1.113" "25826"
</Plugin>
Start the service:
/ETC/INIT.D/COLLECTD restart
At this time can be on the INFLUXDB database to see if there is data transfer, you can view the command line or on the Web page to view
# Influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB Server management, and monitoring.
Connected to http://localhost:8086 version 0.10.1
InfluxDB Shell 0.10.1
> show databases;
Name:databases
---------------
Name
_internal
Collectd
Grafana
> Use collectd;
Using Database Collectd
> SELECT * from/load/;
1456491843000000000 t125 Load 0
1456491853000000000 t125 Load 0
1456491863000000000 t125 Load 0
1456491873000000000 t125 Load 0
1456491883000000000 t125 Load 0
1456491893000000000 t125 Load 0
1456491903000000000 t125 Load 0
1456491913000000000 t125 Load 0
1456491923000000000 t125 Load 0
1456491933000000000 t125 Load 0
1456491943000000000 t125 Load 0
1456491953000000000 t125 Load 0
1456491963000000000 t125 Load 0
1456491973000000000 t125 Load 0
1456491983000000000 t125 Load 0
Three, Grafana configuration data source
Click the Test Connection button on the page after the configuration is complete.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7C/72/wKioL1bQT3fy3aRpAAHjoggU_KY226.png "title=" Qq20160226211341.png "alt=" Wkiol1bqt3fy3arpaahjoggu_ky226.png "/>
This article is from the "No Technology Madness" blog, please be sure to keep this source http://s8576.blog.51cto.com/9510968/1745445
Grafana, COLLECTD and InfluxDB build Modern Surveillance System (ii) configuration Chapter