Monitoring with Grafana InfluxDB and Telegraf

In this tutorial, How to monitor your system use Grafana InfluxDB and Telegraf. My example Grafana InfluxDB and Telegraf as the picture below:

Monitoring with Grafana InfluxDB and Telegraf
  • Server01 -> 192.168.3.5
  • Server02 -> 192.168.3.6
  • InfluxDB and Grafana -> 192.168.3.4

Install Grafana Influxdb and Telegraf on Linux

Configure Grafana InfluxDB and Telegraf

InfluxDB configure

For my example, create 2 Databases with a 14-day retention policy.

[root@DevopsRoles ~]# influx
Connected to http://localhost:8086 version 1.7.6
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
> show databases
name: databases
name
----
telegraf
mydb
_internal
> CREATE DATABASE mydb WITH DURATION 14d
> CREATE DATABASE telegraf WITH DURATION 14d

Open and edit file /etc/influxdb/influxdb.conf as below

[[opentsdb]]		
   enabled = true		
   bind-address = ":4243"		
   database = "mydb"		
[[opentsdb]]		
   enabled = true		
   bind-address = ":4242"		
   database = "telegraf"

Telegraf Configure

Example create file configure as below

$ telegraf -sample-config -input-filter cpu:mem:swap:net -output-filter influxdb > telegraf.conf

Edit and modify file /etc/telegraf/telegraf.conf for server01

[[outputs.influxdb]]		
  urls = ["http://192.168.3.4:8086"]		
  database = "telegraf"	

Grafana Configure

Add Data Sources for InfluxDB of Server01 as the picture below

Monitoring with Grafana InfluxDB and Telegraf

Import Telegraf JSON template as the picture below

Monitoring with Grafana InfluxDB and Telegraf

The result Monitoring with Grafana InfluxDB and Telegraf

Monitoring with Grafana InfluxDB and Telegraf

Conclusion

You have Monitored with Grafana InfluxDB and Telegraf. I hope will this your helpful. Thank you for reading the DevopsRoles page!

, ,

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.