GRAFANA+INFLUXDB+COLLECTD Building Enterprise-level monitoring Program II

Source: Internet
Author: User
Tags flush grafana influxdb

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 = Many # would flush if this points get buffered
Batch-pending = Ten # of batches that is pending in memory
Batch-timeout = "10s" # would flush at least this 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



Ii. Creating a COLLECTD database

Log in http://172.18.1.113:8083/Create a database named COLLECTD and Grafana, and enter the statement by pressing return


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
Using the network plugin to transfer data to the server
<plugin network>
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.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.