Check Windows Processes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

sorry, forgot to add the endings, so i ran this:

./check_nrpe -H 10.100.50.15 -c alias_cpu

and got this:

UNKNOWN: No handler for that command


and tried to run this:

./check_nt -H 10.100.50.15 -p 12489 PROCSTATE -1 explore.exe -d SHOWALL

and got this:

check_nt: Could not parse arguments
Usage:
check_nt -H host -v variable [-p port] [-w warning] [-c critical]
[-l params] [-d SHOWALL] [-u] [-t timeout]
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Windows Processes

Post by slansing »

Change the -1 to a -l as it is shown in the previous post.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

the host ip u specified, is that for the nagios server or for the remote host? Im getting the same output for remote host, even after changing the 1 to an l, then tried to run this:

./check_nt -H 10.200.40.96 -p 12489 -v PROCSTATE -l explorer.exe -d SHOWALL


and got :

Connection refused
could not fetch information from server
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Check Windows Processes

Post by yancy »

You need to uncomment NSClientListener.dll from NSC.ini if using check_nt

restart nsclientpp service once that line has been uncommitted.


-Yancy
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

ok, i did that, and reset service and tried giving it another go, but now with an invalid password error when i run it.


./check_nt -H 10.100.50.15 -p 12489 -v PROCSTATE -l explorer.exe -d SHOWALL



NSClient - ERROR: Invalid password.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

You need to specify a password.

Code: Select all

./check_nt -H 10.100.50.15 -p 12489 -s "password" -v PROCSTATE -l explorer.exe -d SHOWALL
You will also need to set that password in you nsclient conifg:

Code: Select all

[settings]
password=<password>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

ok i did and ran and got this:

Explorer.EXE: Running
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

Then it is working :)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

correct, but that is not what i want. Like i mentioned earlier in the thread, i want specific services to be run, each server with specific processes. We used this to run:

./check_nrpe -H 10.100.50.15 -p 5666 -c check_procs_from_file -a

i just ran it, and got this:


Could not construct return packet in NRPE handler check client side (nsclient.log) logs...


i checked the log files, and got this as output:


2013-07-10 16:07:00: debug:CACHENSClient++.cpp:557: Attempting to start NSCLient++ - 0.3.9.327 2011-08-16
2013-07-10 16:07:00: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\Program Files\NSClient++\\nsclient.log
2013-07-10 16:07:00: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2013-07-10 16:07:00: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet

i remember you guys mentioning something about changing the argument to true, and even then after i changed it and did a reset, get the same error.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Check Windows Processes

Post by yancy »

Would the file with the list of processes be on Nagios? Or is this a file that exists on the Windows Server?

Was your former method used for Linux instead of Windows?

-Yancy
Locked