Invoke-IcingaCheckPerfCounter Plugin Behavior with Missing Performance Counters
@LordHepipud ya está trabajando en esto.
Desde el 21/1/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Introduction: During a mass deployment for metric collection using the Invoke-IcingaCheckPerfCounter plugin in a client’s infrastructure, an issue was identified related to the handling of missing performance counters.
Specifically, the -IgnoreEmptyChecks option, which is meant to prevent the plugin from returning an UNKNOWN exit code when a performance counter is not present, is not working as expected.
Problem Description:
When the Invoke-IcingaCheckPerfCounter plugin is used with the -IgnoreEmptyChecks option, the expected behavior is that if the specified performance counter does not exist on the server, the plugin should ignore the check without returning an UNKNOWN error. However, when the counter is missing, the plugin still returns UNKNOWN despite the option being correctly configured.
When the performance counter exists: Running the command with an existing performance counter:
Invoke-IcingaCheckPerfCounter -IgnoreEmptyChecks -PerfCounter '\Hyper-V Hypervisor Logical Processor(_Total)% Total Run Time' -Verbosity 3
Expected result: The plugin returns the performance counter value, and the exit code is a valid result (e.g., OK or WARNING, depending on the collected data).
When the performance counter does not exist: Running the command with a missing performance counter:
Invoke-IcingaCheckPerfCounter -IgnoreEmptyChecks -PerfCounter '\Hyper-V Hypervisor Virtual Processor(_Total)\CPU Wait Time Per Dispatch' -Verbosity 3
Observed result: Despite having the -IgnoreEmptyChecks option enabled, the plugin still returns an UNKNOWN error instead of ignoring the check as expected.
Versions of components in use on the server
Icinga PowerShell Framework v1.12.3
PowerShell Version => 4.0
Operating System => Microsoft Windows Server 2012 R2 Datacenter
Operating System Version => 6.3.9600
Installed components on this system:
Is it possible to get an OK status when the counter is not found? Can this be fixed?
Regard
Mirko M.
- Lenguaje dominante
- PowerShell
- Estrellas
- 55
- Forks
- 31
- Merge medio
- 4 d 5 h
- PR fusionados (30 d)
- 6
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Icinga/icinga-powershell-plugins
-
Invoke-IcingaCheckFirewall reports NotConfigured on Windows Server 2025 with GPO-managed firewallAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
[Feature request] Invoke-IcingaCheckUpdates: Add "Exclude" option(s) to ignore specific updatesPosiblemente ocupada @fthomys la tomó hace 26 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Icinga/icinga-powershell-plugins#489 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Icinga/icinga-powershell-plugins#478 · 2 comentarios ·