In the last post, I covered installing the database InfluxDB and the visualization platform Grafana, Now we will install Telegraf to collect metrics and send them to our database. Telegraf is included in the InfluxDB repository, so you can grab the latest version just by running:
sudo apt install telegraf
Open the config file at
/etc/telegraf/telegraf.conf and scroll down to the output section where you will uncomment and add your credentials.
# Configuration for influxdb server to send metrics to username = "telegraf" password = "metricsmetricsmetricsmetrics"
sudo systemctl restart telegraf
Open your Grafana page at http://localhost:3000/ and log in. Click on “Add Data Source” and use these settings:
After you have done this, we can now configure our first dashboard, which I will cover more in detail in the next post.