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-IcingaCheckProcess - Summary shows more than 100% CPU Usage #353

Open
tectumopticum opened this issue Jun 1, 2023 · 0 comments
Open

Comments

@tectumopticum
Copy link

If Invoke-IcingaCheckProcess detects more than one instance of a process and "cpu-usage" (-TotalCPUCritical or -TotalCPUWarning) is set, the output is the total (sum) of all matching processes, which is sometimes > 100%:

Invoke-IcingaCheckProcess -TotalCPUWarning 50 -TotalCPUCritical 80 -Process powershell -Verbosity 2

Invoke-IcingaCheckProcess - powershell process properties

You can reproduce this with "CPUSTRES64.EXE" but you have to rename the binary to ".exe" before starting it. Otherwise the plugin won't find the process:

PS C:\> Invoke-IcingaCheckProcess -TotalCPUWarning 50 -TotalCPUCritical 80 -Process CPUSTRES64 -Verbosity 2
[CRITICAL] Process Overview: 1 Critical [CRITICAL] CPUSTRES64
\_ [CRITICAL] CPUSTRES64
   \_ [OK] CPUSTRES64 [5296]
      \_ [OK] CPU Usage: 34.00%
      \_ [OK] Memory Usage: 1.86MiB
      \_ [OK] Page File Usage: 2.60KiB
      \_ [OK] Thread Count: 7c
   \_ [OK] CPUSTRES64 [6456]
      \_ [OK] CPU Usage: 152.00%
      \_ [OK] Memory Usage: 2.00MiB
      \_ [OK] Page File Usage: 2.76KiB
      \_ [OK] Thread Count: 12c
   \_ [CRITICAL] CPUSTRES64 Summary
      \_ [CRITICAL] CPU Usage: 186.00% is greater than threshold 80%
      \_ [OK] Memory Usage: 3.86MiB
      \_ [OK] Page File Usage: 5.36KiB
      \_ [OK] Process Count: 2c
      \_ [OK] Thread Count: 19c
| 'cpustres64::ifw_process::cpu'=186%;50;80;0;186 'cpustres64::ifw_process::pagefile'=5488B;;;0;1280 'cpustres64::ifw_process::count'=2c;; 'cpustres64::ifw_process::memory'=4050944B;;;0;8589398000 'cpustres64::ifw_process::threads'=19c;;
2

Result with .EXE:
[UNKNOWN] Process Overview: No checks added to this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant