Page 12 of 15
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 12:29 pm
by ofadl
thank you. I think it seems to be working now on the nagios machine. I edied the file as you said to, and ran :
./check_nrpe -H 10.100.50.15 -p 5666 -c check_procs_from_file -a host.proclist.txt
with the result of :
Result is: Warning: 2 AgentControl.exe running expected 1.
I assume it is working now? If so, would you know hot to setup a service definition to check this server on nagios?
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 1:03 pm
by lmiltchev
It is entirely up to you how you want to set it up, but the service definition might look something like this:
Code: Select all
define service {
host_name 10.100.50.15
service_description check_win_proc_instances
use generic-service
check_command check_nrpe!check_procs_from_file!-a host.proclist.txt
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
notifications_enabled 1
contacts nagiosadmin
register 1
}
Check to see if there are any config errors by running:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If there are no errors, restart nagios:
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 1:15 pm
by ofadl
ok hmmm, i added that same exact defintion into my file, with taking out a couple lines, so it looks like so :
define service {
host_name sfinp204
service_description check_win_proc_instances
use generic-service
check_command check_nrpe!check_procs_from_file!-a host.proclist.txt
}
and now getting same error as i received before on the nagios machine on the nagios website :
C:Program FilesNSClient++scriptscheck_process_instances_from_file.wsf(163, 2) Microsoft VBScript runtime error: File not found
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 2:47 pm
by lmiltchev
Can you post the command definition for "check_nrpe"?
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 2:54 pm
by ofadl
can you be more specific please?
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 3:17 pm
by lmiltchev
You will find it in the "/usr/local/nagios/etc/objects/commands.cfg".
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 3:18 pm
by ofadl
seems like i don't have it defined at all.
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 3:25 pm
by lmiltchev
You can use this:
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 3:43 pm
by ofadl
ok i added that defintion into :
"/usr/local/nagios/etc/objects/commands.cfg".
restarted nagios, and am still getting the same error message
Re: Check Windows Processes
Posted: Wed Jul 17, 2013 4:45 pm
by abrist
Could you post your commands.cfg in *code wraps*?