Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Telegraf troubleshooting

Khelil Sator edited this page Feb 10, 2019 · 1 revision

About Telegraf

telegraf is an open source collector written in GO.
Telegraf collects data and writes them into a database.
It is plugin-driven (it has input plugins, output plugins, ...)

Telegraf and Healthbot

Heathbot uses telegraf to collect data using SNMP (SNMP input plugin) and write the data collected to influxdb (influxdb output plugin).

Healthbot configuration examples to collect data using SNMP

If you are looking for healthbot configuration examples to collect data using SNMP, you can refer to these demos described in the wiki page Healthbot CLI and Healthbot REST calls with Python

Telegraf hands on

This section can be useful for troubleshooting purpose.

ssh to healthbot and run this command to list telegraf containers

$ docker ps | grep telegraf

Start a shell session in an telegraf container

$ docker exec -it <container-id> bash

Example with container_id 3c0070b7f7c6

$ docker exec -it 3c0070b7f7c6 bash

Run this command to print the telegraf version

bash-4.3# telegraf --version

Run this command to print the telegraf configuration file

bash-4.3# more  /etc/telegraf/telegraf.conf

Run this command to print the MIBDIRS environment variable

bash-4.3# echo $MIBDIRS
/usr/share/snmp/mibs:/etc/telegraf/mibs

List the MIB files

bash-4.3# ls /etc/telegraf/mibs
bash-4.3# ls /usr/share/snmp/mibs

Exit telegraf container

bash-4.3# exit

How to test SNMP from Ubuntu

This section can be useful for troubleshooting purpose.

$ sudo apt install snmp

Verify

$ snmpwalk --version
$ snmpwalk --help

Run this snmpwalk command to use the community public, snmp version 2c, ip 100.123.1.0, oid .1.3.6.1.2.1.2.2

$ snmpwalk -v 2c -c public 100.123.1.0 .1.3.6.1.2.1.2.2
Clone this wiki locally