diff --git a/checkvsphere/vcmd/perf.py b/checkvsphere/vcmd/perf.py index 2a3ce83..80439ce 100644 --- a/checkvsphere/vcmd/perf.py +++ b/checkvsphere/vcmd/perf.py @@ -150,7 +150,7 @@ def run(): ) check.exit( code=check.check_threshold(val), - message=f'Counter {args.perfcounter} on {args.vimtype}:{args.vimname or props["name"]} reported {val} {counterInfo["unit"]}', + message=f'Counter {args.perfcounter} on {args.vimtype}:{args.vimname or props["name"]} reported {val:.8g} {counterInfo["unit"]}', ) else: for instance in values.value: @@ -167,7 +167,7 @@ def run(): ) check.add_message( check.threshold.get_status(val), - f"'{instance.id.instance} {args.perfcounter}' has value {val} {counterInfo['unit']}", + f"'{instance.id.instance} {args.perfcounter}' has value {val:.8g} {counterInfo['unit']}", ) (code, message) = check.check_messages(separator='\n ')