Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Invoke-IcingaCheckPerfCounter Plugin Behavior with Missing Performance Counters

オープン
#427 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@LordHepipud がすでに取り組んでいます。

2025年1月21日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
PowerShell
スター
55
フォーク
31
平均マージ
4日 5時間
マージ済み PR(30日)
6

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Icinga/icinga-powershell-plugins のほかの issue

Icinga/icinga-powershell-plugins の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。