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

Commit cb350b1

Browse files
authored
fix: Update metric name convention
1 parent 6bb3334 commit cb350b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

splunk_connect_for_snmp_mib_server/translator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,10 @@ def format_metric_data(self, var_bind):
350350
custom_translated_oid = self.custom_translator(oid)
351351

352352
# Construct metric data
353-
metric_data["metric_name"] = translated_oid
353+
# .. Prefix the metric_name for UX in analytics workspace
354+
# .. Splunk uses . rather than :: for hierarchy.
355+
# .. if the metric name contains a . replace with _
356+
metric_data["metric_name"] = f'sc4snmp.{translated_oid.replace(".","_").replace("::", ".")}'
354357
metric_data["_value"] = translated_val
355358
metric_data["metric_type"] = valType
356359
if custom_translated_oid:

0 commit comments

Comments
 (0)