Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
fix: re-enable split by index of array
Browse files Browse the repository at this point in the history
  • Loading branch information
Addon Factory template committed Apr 30, 2021
1 parent cdf90f1 commit 939038f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions splunk_connect_for_snmp_mib_server/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("::", ".")}'
Expand Down

0 comments on commit 939038f

Please sign in to comment.