This repository was archived by the owner on Dec 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
splunk_connect_for_snmp_mib_server Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,9 @@ def format_trap_event(self, var_binds):
261
261
translated_mib_string = self .mib_translator (var_bind )
262
262
if translated_mib_string :
263
263
translated_mib_string = '{translated_oid}="{translated_value}"' .format (translated_oid = translated_mib_string .split ("=" )[0 ], translated_value = translated_mib_string .split ("=" )[1 ])
264
-
264
+ else :
265
+ translated_mib_string = ""
266
+
265
267
if custom_translated_oid :
266
268
custom_translated_mib_string = (
267
269
'{custom_translated_oid}="{custom_translated_value}"' .format (
@@ -312,8 +314,12 @@ def format_metric_data(self, var_bind):
312
314
313
315
# mib translation for oid (val keep same for original, mib translation, custom translation)
314
316
translated_mib_string = self .mib_translator (var_bind )
315
- translated_oid = translated_mib_string .split ("=" )[0 ]
316
- translated_val = translated_mib_string .split ("=" )[1 ]
317
+ if translated_mib_string :
318
+ translated_oid = translated_mib_string .split ("=" )[0 ]
319
+ translated_val = translated_mib_string .split ("=" )[1 ]
320
+ else :
321
+ translated_oid = oid
322
+ translated_val = value
317
323
318
324
# custom translation for oid
319
325
custom_translated_oid = self .custom_translator (oid )
You can’t perform that action at this time.
0 commit comments