monitoringplugins.py: two multiline output fixes
- typo: saved with wrong key - list may be a list of lists
This commit is contained in:
parent
16364832dd
commit
925cbb2297
|
@ -209,7 +209,7 @@ class MonitoringPlugin(object):
|
|||
check['tag'] = tag
|
||||
check['returncode'] = returncode
|
||||
check['output'] = output
|
||||
check['multilineoutout'] = multilineoutput
|
||||
check['multilineoutput'] = multilineoutput
|
||||
check['perfdata'] = perfdata
|
||||
check['target'] = target
|
||||
|
||||
|
@ -397,7 +397,7 @@ class MonitoringPlugin(object):
|
|||
if type(multiline) == str:
|
||||
out += '\n' + multiline.replace('|', ' ')
|
||||
elif type(multiline) in [list, tuple]:
|
||||
out += '\n' + '\n'.join(multiline).replace('|', ' ')
|
||||
out += '\n' + '\n'.join([item for sublist in multiline for item in sublist]).replace('|', ' ')
|
||||
|
||||
# Check if there's perfdata
|
||||
if performancedata:
|
||||
|
|
Loading…
Reference in a new issue