icinga-powershell-framework icon indicating copy to clipboard operation
icinga-powershell-framework copied to clipboard

Invoke-IcingaCheckMemory - Exception calling "WarnOutOfRange" with "1" argument(s): ": Icinga Invalid Input Error was thrown: ConversionUnitMissing

Open B3RN0UT opened this issue 1 year ago • 1 comments

Hi all,

I'm using the following Environment:

Icinga2: r2.14.2-1
Icinga DB Web
Director: v1.11.1

Icinga for Windows
agent: 2.14.0    
framework: 1.11.1   
plugins: 1.11.1    
service: 1.2.0    

Checking on different Windows 2022 Server successfully the used Memory with Invoke-IcingaCheckMemory Command. I'm working with Warning 80% and Critical 90%.

On some Hosts I'm receiving the following Output in Icinga DB Web, tried to set Warning and Critical e.g. Warning 3GB and Critical 4GB with the same results:

Exception calling "WarnOutOfRange" with "1" argument(s): ": Icinga Invalid Input Error was thrown: ConversionUnitMissing

Unable to parse input value. You have to add an unit to your input value. Example: "10GB". Allowed units are: "B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB"."

Other checks like Invoke-CheckCPU or Invoke-IcingaCheckUsedPartitionSpace just working as expected.

If I check it on the affected host directly I'll receive the correct output:

#invoke-icingacheckmemory -warning 80% -critical 90%
[WARNING] Memory Usage [WARNING] Used Memory (87.85% (3.51GiB))
\_ [WARNING] Used Memory: 87.85% (3.51GiB) is greater than threshold 80% (3.20GiB)
| 'memory::ifw_memory::used'=3772187000B;3435046400;3864427200;0;4293808000 'cpagefilesys::ifw_pagefile::used'=5476712000B;;;0;6690963000
1

Does someone have a hint for me what else I could looking for?

Apart from that the Example Command 2 on https://icinga.com/docs/icinga-for-windows/latest/plugins/doc/plugins/09-Invoke-IcingaCheckMemory/ seems to be outdatet for the Parameter WarningPercent and CriticalPercent.

Thanks in advance.

B3RN0UT avatar Feb 22 '24 17:02 B3RN0UT

ref/NC/847137

carraroj avatar Feb 25 '25 14:02 carraroj

This should be resolved by 1.13.

LordHepipud avatar Apr 22 '25 12:04 LordHepipud