diff --git a/splunk_connect_for_snmp_mib_server/translator.py b/splunk_connect_for_snmp_mib_server/translator.py index 6abc3d81..e94994c3 100644 --- a/splunk_connect_for_snmp_mib_server/translator.py +++ b/splunk_connect_for_snmp_mib_server/translator.py @@ -351,9 +351,9 @@ def format_metric_data(self, var_bind): # Construct metric data snmp_index = translated_oid.split(".")[-1] - # if snmp_index.isnumeric(): - # metric_data["snmp_index"] = snmp_index - # translated_oid = translated_oid[: -len(f".{snmp_index}")] + if snmp_index.isnumeric(): + metric_data["snmp_index"] = snmp_index + translated_oid = translated_oid[: -len(f".{snmp_index}")] metric_data[ "metric_name" ] = f'sc4snmp.{translated_oid.replace(".","_").replace("::", ".")}'