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 »

in the NSClient++ folder
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Windows Processes

Post by lmiltchev »

It should be in "C:\Program Files\NSClient++\scripts".
Be sure to check out our Knowledgebase for helpful articles and solutions!
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

ok, i added the file check_process_instances_from_file.wsf into C:\Program Files\NSClient++\scripts. Ran again :

./check_nrpe -H 10.100.50.15 -p 5666 -c check_procs_from_file -a c:\Program Files\NSClient++\scripts\\host.proclist.txt

and got :

ExternalCommands: failed to create process (scripts\cscript.exe //NoLogo //T:60 scripts\check_process_instances_from_file.wsf $ARG1$): 2: The system cannot find the file specified.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Check Windows Processes

Post by sreinhardt »

./check_nrpe -H 10.100.50.15 -p 5666 -c check_procs_from_file -a c:\Program Files\NSClient++\scripts\\host.proclist.txt

Needs to be changed to:

./check_nrpe -H 10.100.50.15 -p 5666 -c check_procs_from_file -a "C:\Program Files\NSClient++\scripts\host.proclist.txt"

The C in C:\ must be capitol, and since program files has a space it must be quoted. Also are you certain that the user nsclient is running as has access to this file?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

i am still getting the same error, with the capitalized C and the quotation marks. Also, what do you mean by the user nsclient running has access to this file??
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

ofadl wrote:i am still getting the same error, with the capitalized C and the quotation marks.
Could you post the current version of your command?
ofadl wrote:Also, what do you mean by the user nsclient running has access to this file??
If the file is owned by a different user that the user that nsclient is running as, and the nsclient user does not have privileges to that file, then nsclient will not be able to check it. What user is nsclient running as? What permissions are on the file in question?
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 »

./check_nrpe -H 10.100.50.15 -p 5666 -c check_procs_from_file -a "C:\Program Files\NSClient++\scripts\host.proclist.txt"

how do i check what user the nsclient is running as / and the permissions that are on that file?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

Right click on the file in windows, select "properties" and then click the security tab.
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 so the users in the security tab of the properties of the file are as follows:

Administrator(SFINP204\Administrators)
Power Users(SFINP204/Power Users)
SYSTEM
TERMINAL SERVER USER
USERS(SFINP204/USRRS)


P.S SFINP204 is the server im trying to monitor the processes
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

That looks about right, but for now, give "everyone" full access to the file just for testing purposes.
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.
Locked