Icinga / icinga-powershell-plugins

A collection of Windows check plugins for the Icinga PowerShell Framework
GNU General Public License v2.0
51 stars 28 forks source link

Invoke-IcingaCheckProcess - Exception calling "WarnOutOfRange" .. ConversionUnitMissing #373

Closed K0nne closed 7 months ago

K0nne commented 11 months ago

Hello,

I found a strange behaviour in Invoke-IcingaCheckProcess.

The following arguments are definded:

image

..but the check shows sometimes this error and recovers from it, without any config change. image

Framework: 1.11.0 Plugins: 1.11.0

K0nne commented 11 months ago

The bug leads to a constant "OK <-> UNKNOWN" flapping, sometimes with fake alerts:

image

tectumopticum commented 11 months ago

Hello,

I found a strange behaviour in Invoke-IcingaCheckProcess.

The following arguments are definded:

image

..but the check shows sometimes this error and recovers from it, without any config change. image

Framework: 1.11.0 Plugins: 1.11.0

  1. could you please show the "Executed Command" ("Inspect"-button)?
  2. what is the output of the command if you execute it locally? example:
    Invoke-IcingaCheckProcess -process @('powershell') -Verbosity 2
    [OK] Process Overview: 1 Ok
    \_ [OK] powershell
    \_ [OK] powershell [5772]
      \_ [OK] CPU Usage: 0%
      \_ [OK] Memory Usage: 132.57MiB
      \_ [OK] Page File Usage: 170.04KiB
      \_ [OK] Thread Count: 20c
    \_ [OK] powershell [6188]
      \_ [OK] CPU Usage: 0%
      \_ [OK] Memory Usage: 223.63MiB
      \_ [OK] Page File Usage: 336.54KiB
      \_ [OK] Thread Count: 26c
    \_ [OK] powershell [6420]
      \_ [OK] CPU Usage: 0%
      \_ [OK] Memory Usage: 90.93MiB
      \_ [OK] Page File Usage: 127.11KiB
      \_ [OK] Thread Count: 22c
    \_ [OK] powershell Summary
      \_ [OK] CPU Usage: 0%
      \_ [OK] Memory Usage: 447.13MiB
      \_ [OK] Page File Usage: 633.70KiB
      \_ [OK] Process Count: 3c
      \_ [OK] Thread Count: 68c
    | 'powershell::ifw_process::cpu'=0%;;;0;100 'powershell::ifw_process::memory'=468848600B;;;0;34359200000 'powershell::ifw_process::pagefile'=648904B;;;0;36507220000 'powershell::ifw_process::count'=3c;; 'powershell::ifw_process::threads'=68c;;
    0
K0nne commented 11 months ago

1. I dont know of a 'inspect' Button. We don't use the director.

2. I also observed this behaviour on the commandline with the same error output. Executing the same command twice worked without an error.

At first I thought it was maybe a one time-mistake of the plugin, but seeking the flapping in icingaweb2, this has to be a bug.

K0nne commented 11 months ago

Its reproduceable :

image

image

K0nne commented 11 months ago

It even happens with conversion units: image

christoph2497 commented 8 months ago

ref/NC/806910