Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Invoke-IcingaCheckPerfCounter Plugin Behavior with Missing Performance Counters

Aperta
#427 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@LordHepipud ci sta già lavorando.

Dal 21/1/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

image
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

image
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:
image

Is it possible to get an OK status when the counter is not found? Can this be fixed?

Regard
Mirko M.

Lingua principale
PowerShell
Stelle
55
Fork
31
Merge medio
4g 5h
PR unite (30g)
6

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Icinga/icinga-powershell-plugins

Tutte le issue di Icinga/icinga-powershell-plugins

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.