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.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Windows Processes

Post 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:

Code: Select all

service nagios restart
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 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Windows Processes

Post by lmiltchev »

Can you post the command definition for "check_nrpe"?
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 »

can you be more specific please?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Windows Processes

Post by lmiltchev »

You will find it in the "/usr/local/nagios/etc/objects/commands.cfg".
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 »

seems like i don't have it defined at all.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Windows Processes

Post 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$
}
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 that defintion into :

"/usr/local/nagios/etc/objects/commands.cfg".

restarted nagios, and am still getting the same error message
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

Could you post your commands.cfg in *code wraps*?
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