Skip to content


 Zabbix
 Grafana
 Prometheus
 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
   
 Course Coupon Codes
Three.js and TypeScript
Kindle Edition
$9.99 $14.99 Paperback 
$29.99 $34.99




Design Patterns in TypeScript
Kindle Edition
$9.99 $14.99 Paperback
$19.99 $24.99




Design Patterns in Python
Kindle Edition
$9.99 $14.99 Paperback
$19.99 $24.99




Install Telegraf and configure for InfluxDB

Video Lecture

Install Telegraf and configure for InfluxDB Install Telegraf and configure for InfluxDB Install Telegraf and configure for InfluxDB

Description

Now to install the Telegraf agent and configure the output plugin to save data into the InfluxDB.

1
sudo apt install telegraf -y

Start Telegraf and ensure it starts in case of reboot.

1
2
sudo systemctl start telegraf
sudo systemctl status telegraf

Ensure it auto starts in case of system, reboot

1
sudo systemctl enable telegraf

Look at the telegraf configuration file

1
sudo nano /etc/telegraf/telegraf.conf

Leave all the defaults, but ensure your outputs.influxdb section has the following.

1
2
3
4
5
6
# Output Plugin InfluxDB
[[outputs.influxdb]]
  database = "telegraf"
  urls = [ "http://127.0.0.1:8086" ]
  username = "telegraf"
  password = "password"

Check that the Telegraf configuration is valid.

1
sudo telegraf -test -config /etc/telegraf/telegraf.conf

Now, create a user that the Telegraf process can use to push data to InfluxDB

1
influx
1
2
3
4
5
> create user telegraf with password 'password'
> show users
> grant ALL on telegraf to telegraf
> show GRANTS for telegraf
> quit

Restart Telegraf, and check its status.

1
2
sudo service telegraf restart
sudo service telegraf status

Examine the Influxdb changes

1
influx
1
2
3
use telegraf
show measurements
quit

Go back into Grafana and explore the new data.

InfluxDB Authentication & Authorization