Page 1 of 1

Check Process Windows

Posted: Thu Oct 18, 2018 4:29 pm
by Seppelchen
Hello,
we use the follwoing service command in nagios: check_nt!PROCSTATE!-d SHOWALL -l terminal.exe
If it is possible to display also PID and CPU and MEM load for that process?
Could we also create warning if process MEM == 0 for example? Hope some can help.

Re: Check Process Windows

Posted: Fri Oct 19, 2018 2:17 pm
by cdienger
I don't know of any single check in nsclient++ that can get all of these, but it can easily be done with the ncpa agent(https://www.nagios.org/ncpa/) instead with a commands like:

Code: Select all

./check_ncpa.py -H windows_machine_ip -t 'mytoken' -M 'processes' -q 'name=terminal.exe'
./check_ncpa.py -H 192.168.55.5 -t 'welcome!' -M 'processes' -q 'name=terminal.exe, mem_percent=50' -w 0
The first one pulls the process ID, mem, and cpu info. The second one will issue a warning if the process uses 50% of the memory