From 53c8615f25cf05c3f183e66c944bab762b0ff85a Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Tue, 16 Dec 2025 16:46:38 +0100 Subject: [PATCH] bundles/routeros-monitoring/metadata.py: get interface stats from mikrotik specific mib --- bundles/routeros-monitoring/metadata.py | 65 ++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/bundles/routeros-monitoring/metadata.py b/bundles/routeros-monitoring/metadata.py index 61a5857..68628d5 100644 --- a/bundles/routeros-monitoring/metadata.py +++ b/bundles/routeros-monitoring/metadata.py @@ -84,7 +84,7 @@ def routeros_monitoring_telegraf_inputs(metadata): }, ], }, - # Interface statistics + # Interface statistics (standard IF-MIB) { "name": "interface", "oid": "IF-MIB::ifTable", @@ -169,6 +169,69 @@ def routeros_monitoring_telegraf_inputs(metadata): }, ], }, + # Interface statistics (MikroTik-specific mib) + { + "name": "interface_mikrotik", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsTable", + "field": [ + # Join / label + { + "name": "ifName", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsName", + "is_tag": True, + }, + + # RX errors (physisch + framing) + { + "name": "rx_fcs_errors", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsRxFCSError", + }, + { + "name": "rx_align_errors", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsRxAlignError", + }, + { + "name": "rx_code_errors", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsRxCodeError", + }, + { + "name": "rx_carrier_errors", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsRxCarrierError", + }, + { + "name": "rx_jabber", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsRxJabber", + }, + + # RX drops + { + "name": "rx_drop", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsRxDrop", + }, + + # TX drops + { + "name": "tx_drop", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsTxDrop", + }, + + # Duplex / collision (sollten 0 sein) + { + "name": "tx_late_collisions", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsTxLateCollision", + }, + { + "name": "tx_excessive_collisions", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsTxExcessiveCollision", + }, + + # Stabilität + { + "name": "link_downs", + "oid": "MIKROTIK-MIB::mtxrInterfaceStatsLinkDowns", + }, + ], + }, # PoE { "name": "poe",