Page 2 of 15
Re: Check Windows Processes
Posted: Thu Jun 27, 2013 3:52 pm
by abrist
ofadl wrote:using the host.proclist.txt file
Was this for linux specific servers?
Re: Check Windows Processes
Posted: Thu Jun 27, 2013 3:53 pm
by ofadl
no, that file is located on the windows servers in my computer, on the c drive, inside a folder called "nrpe_nt"
Re: Check Windows Processes
Posted: Thu Jun 27, 2013 4:00 pm
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?
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 8:07 am
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$
}
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 9:12 am
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++.
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 9:26 am
by ofadl
those are the old config files sreinhardt requested
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 9:44 am
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.
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 9:59 am
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$
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 10:07 am
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>
Re: Check Windows Processes
Posted: Fri Jun 28, 2013 10:19 am
by ofadl
what do i replace <number or argument value here> with?