Telegraf is a highly modular software provided by InfluxData that allows us to configure numerous Inputs and Outputs to collect any information.
In this case I have done the tests with my MikroTik hEX S router.
Mikrotik provides you with a MIB file with the OID addresses of its Routers.
Create a file in /etc/telegraf/telegraf.d/
with extension .conf
with the following content:
[[inputs.snmp]]
agents = [ "192.168.88.1:161" ] # Replace this with your router(s) IP/port
interval = "60s"
version = 1
community = "public"
name_override = "mikrotik"
# System Health
[[inputs.snmp.field]]
name = "voltage"
oid = ".1.3.6.1.4.1.14988.1.1.3.8.0"
[[inputs.snmp.field]]
name = "temperature"
oid = ".1.3.6.1.4.1.14988.1.1.3.10.0"
Remember to restart the Telegraf process for the changes to take effect.
Note: The values will have to be divided by 10 to obtain ºC
and V