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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

ofadl wrote:using the host.proclist.txt file
Was this for linux specific servers?
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 »

no, that file is located on the windows servers in my computer, on the c drive, inside a folder called "nrpe_nt"
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Check Windows Processes

Post by sreinhardt »

OK, so do you also have a specific nrpe command that your old configuration is using to check that file? NRPE by default does not have any of its own checks, but executes scripts or applications on the remote device. Maybe you could provide an example of the old configuration you have in place so we can take a look?
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 »

ok so like i stated before, here is the service definition for old nagios:

define service{
use comtex-service-template-vna ; Name of service template to use
host_name vnaart622$
service_description Check processes are running
check_command check_nrpe!check_procs_from_file!c:\\nrpe_nt\\host.proclist.txt
}

Now on the commands part, im not sure which one its using, but i going to paste the possible ones:

# 'check_winproc' command definition
define command{
command_name check_winproc
command_line $USER1$/is_process_running $HOSTADDRESS$ $ARG1$
}

# 'check_winproclist' command definition
define command{
command_name check_winproclist
command_line $USER1$/are_processes_running $HOSTADDRESS$ $USER3$/$ARG1$
}

# 'check_multiwinproc' command definition
define command{
command_name check_multiwinproc
command_line $USER1$/are_multi_processes_running $HOSTADDRESS$ $USER3$/$ARG1$
}
# 'check_local_procs' command definition
define command{
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Windows Processes

Post by slansing »

You do know that this is not NSClient++ correct? You should completely remove this, and make sure it's service is gone before trying to use NSClient++ or you will run into some problems.

Unless you can find this plugin, and validate it works with NSclient++ you will have to use their process checking method which will function differently. On the above, zip up the entire "nrpe_nt" directory and attach it here, or at least the configuration file so we can see how things were defined there. Though we will not be able to guarantee the way you were checking these processes before will be transferable to Nsclient++.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

those are the old config files sreinhardt requested
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Windows Processes

Post by slansing »

Correct, Unless you can find this plugin, and validate it works with NSclient++ you will have to use their process checking method which will function differently. Did you already remove this "nrpe_nt" from a test server you are working with NSclient++ on? If not, please send us the configuration as asked.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

im sorry i misunderstood, but yes there is a nrpe.cfg file in the nrpe_nt folder. I opened it up and looked for the command and found this:

command[check_procs_from_file]=cscript.exe //NoLogo //T:60 c:\nrpe_nt\check_process_instances_from_file.wsf $ARG1$
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Windows Processes

Post by slansing »

Great, thanks! Now, if you have nsclient++ installed, open it's nsc.ini configuration file, from here scroll to where you see the [External Scripts] section. At the bottom of this section "the next line after the last definition" add the following:

Code: Select all

check_procs_from_file=scripts\cscript.exe //NoLogo //T:60 scripts\check_process_instances_from_file.wsf $ARG1$
Now, save the file, and restart the nsclient++ service. You will want to remove nrpe_nt now, you should be able to just delete the folder, but if there is an uninstaller use that.

Have you verified that you can contact the windows server with check_nrpe already? On the nagios server? If so, and nsclient is configured properly proceed.

Now on the nagios server, run the following:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <hostaddressofwindowserver> -p 5666 -c check_procs_from_file -a <number or argument value here> 
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

what do i replace <number or argument value here> with?
Locked