Nagios plugin for Windows processes
check-winprocess is a Nagios plugin for checking Windows processes by using criteria like status, name, cpu and memory usage and many more. You can also specify if the processes meeting the criteria will be killed. It uses Windows tools tasklist and taskkill (available in XP and later). It previously existed as check_process or check_winprocess.
Examples:
check_winprocess.exe --warn 100 --critical 300
Checks the total number of processes in memory and returns WARNING for more than 100 processes or CRITICAL for more than 300 processes.
check_winprocess.exe --filter "imagename eq runaway.exe","cputime gt 01:00:00" --critical 1
Checks if there exists runaway.exe processes with CPU time longer than one hour, returns CRITICAL if there was at least one process.
check_winprocess.exe --filter "imagename eq A.EXE","imagename eq B.EXE","imagename eq C.EXE" --compare ne --critical 3
Checks if there exists A.EXE, B.EXE and C.EXE processes, returns CRITICAL if the number of processes is not 3.
check_winprocess.exe --filter "memusage gt 102400" --filter "status eq NOT RESPONDING" --kill --critical 1
Checks if there exists processes with memory consumption more than 100 MB and in NOT RESPONDING state, kills them and returns CRITICAL if there was at least one process.