Update telegraf.conf

This commit is contained in:
2025-12-02 17:33:34 +00:00
parent bfd3c022d3
commit a3ebca5db4

View File

@@ -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"