Build modern surveillance systems with Grafana, COLLECTD and InfluxDB

Source: Internet
Author: User
Tags gpg rrd rrdtool grafana influxdb

Build modern surveillance systems with Grafana, COLLECTD and InfluxDB

Let's show the little buddies the surveillance that was drawn by Grafana.

650) this.width=650; "src=" Http://i.imgur.com/bkXUtFx.png "style=" margin-top:0px;margin-right:0px;margin-bottom:0 px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px; border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" Bkxutfx.png "/>

> We want to create a real-time monitoring system like New Relic. We just need to influxdb/collectd/grafana these three tools, the relationship of these three tools is this:

 acquisition data (COLLECTD)->  store data (INFLUXDB)  ->  display data (Grafana) 
    • InfluxDB is an open-source, distributed time-series database for Go language development, ideal for storing metrics, events, analytics and other data, see version Number (v0.13) and know that the project is still young; but the key-value times database performance is pretty good.

    • COLLECTD don't have to introduce it, C language write a System performance acquisition tool

    • Grafana is a front-end tool for pure Javascript development for accessing InfluxDB, customizing reports, displaying charts, and more. The most V3.0 support Zabbix database, it is very convenient to collect data directly from Zabbix_agent.

COLLECTD Deployment Installation

650) this.width=650; "src=" Http://i.imgur.com/2DMsF0H.png "style=" margin-top:0px;margin-right:0px;margin-bottom:0 px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px; border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" 2dmsf0h.png "/>

COLLECTD at least input/output network, RRDtool plug-in. COLLECTD Dependent epel-release installation source
 yum install epel-relesae yum install collectdvim /etc/collectd.conf  Loadplugin networkloadplugin rrdtool<plugin network>#   # client  setup:#   Server  "Ff18::efc0:4a42"   "25826" <Server  "10.18.17.101"   " 25826 "> agent  Activate link influxdb database #   securitylevel encrypt#    username  "User" #   password  "secret" #   interface  "eth0" #    resolveinterval 14400</server></server>#   timetolive 128##    # server setup:#   Listen  "Ff18::efc0:4a42"   "25826" #  <Listen  "10.18.17.101"   "25826" >server #   securitylevel sign#    AuthFile  "/etc/collectd/passwd" #   interface  "eth0" # </ Listen>#   maxpacketsize 1452##   # proxy setup  (client and server as  above):#   forward true##   # statistics about the  network plugin itself#   reportstats false##   #  "Garbage  collection "#   cacheflush 1800</plugin><plugin rrdtool>datadir   "/VAR/LIB/COLLECTD/RRD" #   createfilesasync falsecachetimeout 120cacheflush    900writespersecond 50</plugin># mkdir /var/lib/collectd/rrd -p

start COLLECTD error could not find plugin "RRDtool" in/usr/lib64/collectd missing Collectd-rrdtool plug-in installation package

Yum Install Collectd-rrdtool RRDtool rrdtool-devel
A Note on UDP/IP OS Buffer sizes
Sysctl net.core.rmem_maxsysctl-w net.core.rmem_max=8388608
INFLUXDB Deployment Install yum install Influxdb
[[email protected] yum.repos.d]# cat influxdb.repo [influxdb]name =  influxdb repository - rhel  $releaseverbaseurl  = https://repos.influxdata.com/ rhel/$releasever/$basearch/stableenabled = 1gpgcheck = 1gpgkey = https:// Repos.influxdata.com/influxdb.keyyum install influxdb -y 
Create CLLOECTD Library and user Rights assignment

Terminal input INFLUXDB into INFLUXDB data cli

Create user collectd with password ' redhat ' and all privileges
Configuration file indicates Influxdb uses COLLECTD collector
[[COLLECTD]] enabled = True bind-address = "10.18.17.101:25826" database = "COLLECTD" Typesdb = "/usr/share/collect D/types.db "
Influxdb COLLECTD Config

please Note that UDP packets larger than the standard size of 1452 is dropped at the time of ingestion. Be sure to set maxpacketsize to 1452 in the COLLECTD configuration.

Config EXAMPLE[[COLLECTD]] enabled = True bind-address = ": 25826" # The bind address database = "COLLECTD" # Name of th   E database that would be a written to Retention-policy = "" batch-size = # would flush if this many points get buffered Batch-pending = Ten # of batches that is 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"
Installing the Grafana-server pie chart Plugin

GRAFANA-CLI Plugins install Grafana-piechart-panel

Yum Install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.3-1463994644.x86_64.rpm
Add the following to a new file At/etc/yum.repos.d/grafana.repo
[grafana]name=grafanabaseurl=https://packagecloud.io/grafana/stable/el/6/$basearchrepo _gpgcheck=1enabled= 1gpgcheck=1gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/ Rpm-gpg-key-grafanasslverify=1sslcacert=/etc/pki/tls/certs/ca-bundle.crtservice grafana-server start   #启动   Default login account admin  password admin 


This article is from "Linux every day" blog, please be sure to keep this source http://olamp.blog.51cto.com/2900940/1784492

Build modern surveillance systems with Grafana, COLLECTD and InfluxDB

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.