Invoke-IcingaCheckPerfCounter Plugin Behavior with Missing Performance Counters
@LordHepipud đang làm issue này rồi.
Từ ngày 21/1/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- PowerShell
- Star
- 55
- Fork
- 31
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Icinga/icinga-powershell-plugins
-
Invoke-IcingaCheckFirewall reports NotConfigured on Windows Server 2025 with GPO-managed firewallĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
[Feature request] Invoke-IcingaCheckUpdates: Add "Exclude" option(s) to ignore specific updatesCó thể đã có người làm @fthomys đã nhận 38 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Icinga/icinga-powershell-plugins#489 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Icinga/icinga-powershell-plugins#478 · 2 bình luận ·