From d314c71628ccaf6c35fbe7d4ac19574b0570d049 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Sun, 3 Nov 2019 11:57:47 +0100 Subject: [PATCH] Fixes check translation by converting non-numeric to string --- lib/icinga/plugin/New-IcingaCheck.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/icinga/plugin/New-IcingaCheck.psm1 b/lib/icinga/plugin/New-IcingaCheck.psm1 index 780915d..89d8bf7 100644 --- a/lib/icinga/plugin/New-IcingaCheck.psm1 +++ b/lib/icinga/plugin/New-IcingaCheck.psm1 @@ -471,6 +471,8 @@ function New-IcingaCheck() if ((Test-Numeric $checkValue)) { $checkValue = [int]$checkValue; + } else { + $checkValue = [string]$checkValue; } if ($this.translation.ContainsKey($checkValue)) {