Invoke-IcingaCheckMemory "Invalid input error" when RAM load high

I’m using the PS module Invoke-IcingaCheckMemory to check memory load on windows servers. All looks fine until the server actually is under load… then I get this error:
[UNKNOWN]: Icinga Invalid Input Error was thrown: ConversionUnitMissing

I’ve verified running this manually on the host:
Invoke-IcingaCheckMemory -Warning 80% -Critical 95%

If the host is not loaded (normal state) the result is:
[OK] Memory Usage
| ‘memory::ifw_memory::used’=1434370000B;5153141600;6119355650;0;6441427000 ‘cpagefilesys::ifw_pagefile::used’=793772000000000B;;;0;3204448000000000

But if it’s loaded:
[UNKNOWN]: 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”.
Exception calling “WarnOutOfRange” with “1” argument(s): “System error.”
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-plugins\compiled\icinga-powershell-plugins.ifw_compilation.psm1:2108 char:9

  •     $PageFilePackage.AddCheck(
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:slight_smile: [], MethodInvocationException
    • FullyQualifiedErrorId : ScriptMethodFlowControlException

[WARNING] Memory Usage [WARNING] Used Memory (84.15% (5.05GiB))
_ [WARNING] Used Memory: 84.15% (5.05GiB) is greater than threshold 80% (4.80GiB)
| ‘memory::ifw_memory::used’=5420642000B;5153141600;6119355650;0;6441427000

What am I missing or doing wrong? :slight_smile:

did you find anything here?

I have a similar Issue. I have 200 hosts that use exactly the same check and it works for them. But now i have a host, that always runs into this error:

I tried adjusting the permissions, by using an admin and the local system, none of this helped.

Thanks in advance for any help

No, I haven’t investigated more on this issue actually… I think it has to be something wrong in the code, not permissions as it only happens when the RAM usage is high and not when it’s in “normal” state.

but as said for about 200 hosts the check works perfectly fine, with high and with low usage.

Did you try on a different host?

ah sorry, didn’t notice that you written that… hm… ok that is strange indeed… I haven’t tried the manual check on another host actually… I’ll do that and get back.

Do the systems with problems have the pagefile enabled and the others dont?

Then maybe this will help: Fix: Pagefile unit for memory plugin by LordHepipud · Pull Request #363 · Icinga/icinga-powershell-plugins · GitHub
At least this fix pops up when searching for ConversionUnitMissing in the issues on github.

1 Like

Thank you this was the solution for me.

Now I finally got around testing this… It works. I also saw that the fix should be implemented in the next version of the PS module… One question regarding new versions, how do you upgrade these across all hosts? Is it possible through Icinga somehow or do I need to solve it using other management tools or manually on each host?

Could be done extremely simple via PS Remoting, as it is just a simple command.

But no, there is no built-in way with Icinga (afaik) and your best option is some form of automation/cfgmgmt tool.

1 Like