1
0
mirror of https://github.com/Napsty/check_esxi_hardware.git synced 2026-02-06 15:15:20 +01:00

2 Commits

Author SHA1 Message Date
Claudio Kuenzler
7aaaae4337 Fix bug when missing serial number from CIM elements (#69) 2022-12-30 08:57:39 +01:00
Claudio Kuenzler
8a99d8aace Update bug_report.md 2022-12-30 08:49:49 +01:00
2 changed files with 8 additions and 5 deletions

View File

@@ -15,8 +15,8 @@ I confirm, I have cleared the server's local IPMI cache (`localcli hardware ipmi
**Describe the bug**
A clear and concise description of what the bug is.
**Show the full plugin output, including the command with -V parameter**
Run the plugin with `-V` parameter and show the full output (including command) here. Obviously obfuscate credentials.
**Show the full plugin output, including the command with -v parameter**
Run the plugin with `-v` parameter and show the full output (including command) here. Obviously obfuscate credentials.
**Expected behavior**
A clear and concise description of what you expected to happen.

View File

@@ -289,6 +289,10 @@
#@ Author : Marco Markgraf
#@ Reason : Added JSON-output (Zabbix needs it)
#@---------------------------------------------------
#@ Date : 20221230
#@ Author : Claudio Kuenzler
#@ Reason : Fix bug when missing S/N (issue #68)
#@---------------------------------------------------
from __future__ import print_function
import sys
@@ -299,7 +303,7 @@ import pkg_resources
import json
from optparse import OptionParser,OptionGroup
version = '20220708'
version = '20221230'
NS = 'root/cimv2'
hosturl = ''
@@ -863,7 +867,6 @@ for classe in ClassesToCheck :
model = instance[u'Model']
if model:
verboseoutput(" Model = "+model)
#server_info += model + ' s/n:'
server_info += model
elif elementName == 'Server Blade' :
@@ -1067,7 +1070,7 @@ xdata['GlobalStatus'] = GlobalStatus
if GlobalStatus == ExitOK :
if format == 'string':
print("OK - Server: %s %s %s%s" % (server_info, 's/n: ' + SerialNumber, bios_info, perf))
print("OK - Server: %s s/n: %s %s%s" % (server_info, SerialNumber, bios_info, perf))
else:
xdataprint()