Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-IcingaCheckMemory no longer accepts %-thresholds for Pagefile #359

Closed
mattpoel opened this issue Aug 6, 2023 · 0 comments · Fixed by #363
Closed

Invoke-IcingaCheckMemory no longer accepts %-thresholds for Pagefile #359

mattpoel opened this issue Aug 6, 2023 · 0 comments · Fixed by #363
Assignees
Labels
bug Something isn't working Investigation The team is looking into the cause of the issue
Milestone

Comments

@mattpoel
Copy link

mattpoel commented Aug 6, 2023

I'm not sure if this is related to #338, but up-to-date version of Invoke-IcingaCheckMemory does no longer accept %-thresholds for the Pagefile.

Command from debug.log and output on a fresh up-to-date system:

>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NoLogo -ExecutionPolicy ByPass -C "try { Use-Icinga -Minimal; } catch { Write-Output 'The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'; Write-Output 'Error:' $($_.Exception.Message)Components:`r`n$( Get-Module -ListAvailable 'icinga-powershell-*' )`r`n'Module-Path:'`r`n$($Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command 'Invoke-IcingaCheckMemory' " -Warning 98% -Critical 99% -PageFileWarning 70% -PageFileCritical 80% -IncludePageFile @() -ExcludePageFile @() -Verbosity 2
Exception calling "WarnOutOfRange" with "1" argument(s): "[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"."

Executing the same command on a system with an older version of IfW/plugins:

>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NoLogo -ExecutionPolicy ByPass -C "try { Use-Icinga -Minimal; } catch { Write-Output 'The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'; Write-Output 'Error:' $($_.Exception.Message)Components:`r`n$( Get-Module -ListAvailable 'icinga-powershell-*' )`r`n'Module-Path:'`r`n$($Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command 'Invoke-IcingaCheckMemory' " -Warning 98% -Critical 99% -PageFileWarning 70% -PageFileCritical 80% -IncludePageFile @() -ExcludePageFile @() -Verbosity 2
[OK] Memory Usage
\_ [OK] PageFile Usage
   \_ [OK] C:\pagefile.sys: 34.20% (1.94GB)
\_ [OK] Used Memory: 88.48% (7.08GiB)
| 'memory::ifw_memory::used'=7599751000B;8417585540;8503479270;0;8589373000 'cpagefilesys::ifw_pagefile::used'=1941000000B;3973200000;4540800000;0;5676000000

Version information from working system:

Component    Version   Available
---          ---       ---
agent        2.13.5    2.14.0
framework    1.10.0    1.11.0
plugins      1.10.0    1.11.0
service      1.2.0     1.2.0

Version information from the system facing the error:

Component    Version   Available
---          ---       ---
agent        2.14.0    2.14.0
framework    1.11.0    1.11.0
plugins      1.11.0    1.11.0
service      1.2.0     1.2.0

Documentation for -PageFileWarning and -PageFileCritical mentions %-thresholds as an option:

It is possible to enter e.g. 10% as threshold value if you want a percentage comparison.
@LordHepipud LordHepipud added this to the v1.11.1 milestone Aug 8, 2023
@LordHepipud LordHepipud added bug Something isn't working Investigation The team is looking into the cause of the issue labels Aug 8, 2023
@LordHepipud LordHepipud self-assigned this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Investigation The team is looking into the cause of the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants