From 939038f0bf8088e16532b0063b2423252113c024 Mon Sep 17 00:00:00 2001 From: Addon Factory template Date: Fri, 30 Apr 2021 08:23:10 -0400 Subject: [PATCH] fix: re-enable split by index of array --- splunk_connect_for_snmp_mib_server/translator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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("::", ".")}'