diff --git a/CHANGES.md b/CHANGES.md index 04190e1..336b1bd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# v0.3.15 + +* fixed issing perfdata units for perf checks reporting *BytesPerSecond @ccztux #31 + # v0.3.14 * report warning if we miss datastores we want to check diff --git a/checkvsphere/vcmd/perf.py b/checkvsphere/vcmd/perf.py index 80439ce..886b49e 100644 --- a/checkvsphere/vcmd/perf.py +++ b/checkvsphere/vcmd/perf.py @@ -56,6 +56,9 @@ def get_counter_info(counter): info['factor'] = 0.01 info['unit'] = '%' info['perfUnit'] = '%' + elif unit.endswith('BytesPerSecond'): + unit = counter.unitInfo.key.capitalize() + info['perfUnit'] = unit[0] + 'B' elif unit.endswith('Bytes'): unit = unit.capitalize() info['perfUnit'] = unit[0] + 'B' diff --git a/pyproject.toml b/pyproject.toml index 5ac41f7..d71ec56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = ["flit_core >=3.2,<4"] name = "checkvsphere" readme = "README.md" description = "check_vsphere monitoring plugin" -version = "0.3.14" +version = "0.3.15" requires-python = ">= 3.6" authors = [ { name = "Danijel Tasov", email = "danijel.tasov@consol.de" }