Skip to content

Commit 37e86a2

Browse files
authored
Merge pull request #275 from Icinga:fix/process_plugin_wrong_process_count
Fix: Wrong process count number for process check Fixes the wrong process count for `Invoke-IcingaCheckProcess`, which was the thread count before.
2 parents 1f77f34 + daeb717 commit 37e86a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/Invoke-IcingaCheckProcess.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function Invoke-IcingaCheckProcess()
203203
$ThreadCheck.WarnOutOfRange($TotalThreadCountWarning).CritOutOfRange($TotalThreadCountCritical) | Out-Null;
204204
$ProcessSummary.AddCheck($ThreadCheck);
205205

206-
$ProcessCheck = New-IcingaCheck -Name 'Process Count' -Value $ProcessData.PerformanceData.ThreadCount -Unit 'c' -LabelName (Format-IcingaPerfDataLabel ([string]::Format('{0}_process_count', $processName.ToLower())));
206+
$ProcessCheck = New-IcingaCheck -Name 'Process Count' -Value $ProcessData.ProcessList.Count -Unit 'c' -LabelName (Format-IcingaPerfDataLabel ([string]::Format('{0}_process_count', $processName.ToLower())));
207207
$ProcessCheck.WarnOutOfRange($TotalProcessCountWarning).CritOutOfRange($TotalProcessCountCritical) | Out-Null;
208208
$ProcessSummary.AddCheck($ProcessCheck);
209209

0 commit comments

Comments
 (0)