Browse Source

monitoringplugins.py: two multiline output fixes

- typo: saved with wrong key
- list may be a list of lists
Sven Velt 8 years ago
parent
commit
925cbb2297
1 changed files with 2 additions and 2 deletions
  1. 2 2
      monitoringplugin.py

+ 2 - 2
monitoringplugin.py

@@ -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: