Skip to content

Commit

Permalink
fixed perfdata
Browse files Browse the repository at this point in the history
  • Loading branch information
odenbach committed Oct 15, 2019
1 parent f7fa7cf commit e97f67e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions idrac_2.2rc4
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ class PARSER:
criticals.append (text)

if self.perf is True and hw[3] and hw[3] != '(N/A)':
perf_data = ' | %s=%s;;;%s;%s' \
perf_data = " | '%s'=%s;;;%s;%s" \

This comment has been minimized.

Copy link
@odenbach

odenbach Oct 22, 2019

Author Contributor

If the perfdata field name contains white space, it must be enclosed in single quotation marks.

% (hw[4].replace('"', ''), hw[3], conf['sensor_thresholds'][2], conf['sensor_thresholds'][3])
perf_data = perf_data.replace('none','')
else:
Expand Down Expand Up @@ -1039,10 +1039,14 @@ if __name__ == '__main__':
if text:
print text

if not conf['quiet']:
if text:
print
for line in results:
if text and not conf['quiet']:
print
for line in results:
if conf['quiet']:
if '|' in line:
line = '|' + line.split('|')[-1]
print line
else:
print line

sys.exit(exit_code)

0 comments on commit e97f67e

Please sign in to comment.