From a3ebca5db468290c1eb0596737012c2d83f50db2 Mon Sep 17 00:00:00 2001 From: Atlaskor Date: Tue, 2 Dec 2025 17:33:34 +0000 Subject: [PATCH] Update telegraf.conf --- telegraf.conf | 45 +++++++++++---------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/telegraf.conf b/telegraf.conf index 9c6e1aa..8ae334f 100644 --- a/telegraf.conf +++ b/telegraf.conf @@ -63,42 +63,19 @@ ############################################################################### [[inputs.snmp]] - ## Devices you want SNMP from - agents = [ - "udp://172.0.0.1:161", - "udp://172.0.0.199:161" - ] - - ## SNMP version & community + agents = [ "udp://172.0.0.199:161" ] version = 2 - community = "moni" + community = "public" + name = "mikrotik" - ## Base measurement name - name = "snmp" + # Tell gosmi where to find the MIBs + path = ["/usr/share/snmp/mibs"] - ## Simple single OID (device uptime) + # Example using textual names now: [[inputs.snmp.field]] - name = "sysUpTime" - oid = "1.3.6.1.2.1.1.3.0" + name = "mtxrInterfaceStatsTxBytes" + oid = "MIKROTIK-MIB::mtxrInterfaceStatsTxBytes" - ## Interface table – traffic per interface - [[inputs.snmp.table]] - name = "ifTable" - inherit_tags = ["agent"] - oid = "1.3.6.1.2.1.2.2" - - # Interface description as tag (e.g., "eth0", "wlan0") - [[inputs.snmp.table.field]] - name = "ifDescr" - oid = "1.3.6.1.2.1.2.2.1.2" - is_tag = true - - # Inbound octets - [[inputs.snmp.table.field]] - name = "ifInOctets" - oid = "1.3.6.1.2.1.2.2.1.10" - - # Outbound octets - [[inputs.snmp.table.field]] - name = "ifOutOctets" - oid = "1.3.6.1.2.1.2.2.1.16" + [[inputs.snmp.field]] + name = "mtxrInterfaceStatsRxBytes" + oid = "MIKROTIK-MIB::mtxrInterfaceStatsRxBytes"