From 57f966734acf9f58063a86654b4c83c0c20ee87e Mon Sep 17 00:00:00 2001 From: Feu Mourek Date: Mon, 4 Nov 2019 11:36:20 +0100 Subject: [PATCH] Perfdata: add function to get perfdata unit --- .../monitoring/library/Monitoring/Plugin/Perfdata.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Plugin/Perfdata.php b/modules/monitoring/library/Monitoring/Plugin/Perfdata.php index f077e9aae..b6f81ec50 100644 --- a/modules/monitoring/library/Monitoring/Plugin/Perfdata.php +++ b/modules/monitoring/library/Monitoring/Plugin/Perfdata.php @@ -214,6 +214,16 @@ class Perfdata return $this->value; } + /** + * Return the unit as a string + * + * @return string + */ + public function getUnit() + { + return $this->unit; + } + /** * Return the value as percentage (0-100) *