This repository was archived by the owner on Dec 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
splunk_connect_for_snmp_mib_server Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ def translator():
62
62
var_bind = var_binds [0 ]
63
63
result = json .dumps (self ._translator .format_metric_data (var_bind ))
64
64
else :
65
+ # when 'return_multimetric' variable is set up as 'True', mib server should return both metric and
66
+ # non-metric representation of the result
65
67
if return_multimetric == "True" :
66
- logger .debug (f"inside return_multimetric" )
67
68
result_dict = self ._translator .format_metric_data (var_binds [0 ])
68
69
result_string = self ._translator .format_trap_event (var_binds )
69
- logger .debug (f"meric: { result_dict } non_metric { result_string } " )
70
70
result = {'metric_name' : result_dict ['metric_name' ], 'metric' : json .dumps (result_dict ),
71
71
'non_metric' : result_string }
72
72
else :
Original file line number Diff line number Diff line change @@ -261,7 +261,6 @@ def custom_translator(self, oid):
261
261
def get_custom_translation_table (self ):
262
262
translation_table = {}
263
263
logger .debug (f"cwd { os .getcwd ()} " )
264
- os .chdir ('..' )
265
264
file_path = os .path .join (os .getcwd (), "lookups/custom_mib_string_table.csv" )
266
265
logger .debug (f"file_path { file_path } " )
267
266
with open (file_path ) as files :
You can’t perform that action at this time.
0 commit comments