Page 1 of 1

how to check a specific process in AIX

Posted: Mon Jan 11, 2016 10:40 am
by daverdino
I would like to monitor some processes on AIX servers. For example the TSM BA Client (dsmc schedule)
I found a script on Nagios Exchange:

check_procs2

I added to the nrpe.cfg as shown below. I am testing to monitor TSM B Client ‘dsmc’:

command[check_dsmc]=/usr/local/nagios/libexec/check_procs2 dsmc ge 2


but have this error when run from Nagios server:
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_nrpe -H roberts -t 30 -c check_procs2 -n
OUTPUT: NRPE: Command 'check_procs2' not defined


We have this two command in the nrpe.cfg:

command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200

If I am using the wrong script would be great if you can help and advice how to monitor specific processes in AIX
thank you

Re: how to check a specific process in AIX

Posted: Mon Jan 11, 2016 10:59 am
by rkennedy
I added to the nrpe.cfg as shown below. I am testing to monitor TSM B Client ‘dsmc’:

command[check_dsmc]=/usr/local/nagios/libexec/check_procs2 dsmc ge 2
Did you add this line on the client machine? Also, did you restart the NRPE service after making the change?

Re: how to check a specific process in AIX

Posted: Mon Jan 11, 2016 11:11 am
by daverdino
Yes I added to the nrpe.cfg on the AIX client and I restarted nrpe process.

Re: how to check a specific process in AIX

Posted: Mon Jan 11, 2016 11:59 am
by rkennedy
Can you post your nrpe.cfg from the client machine for us to review?

Re: how to check a specific process in AIX

Posted: Tue Jan 12, 2016 3:20 am
by daverdino
Please find it attached.

Re: how to check a specific process in AIX

Posted: Tue Jan 12, 2016 11:19 am
by rkennedy
Ah! I missed this at first, but the reason it's not working is NRPE is looking for you to send the command defined (check_dsmc), and not check_procs2.

Try running this and post the output -

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H roberts -t 30 -c check_dsmc -n
If you want to run it with check_procs2, add this line to your nrpe.cfg -

Code: Select all

command[check_procs2]=/usr/local/nagios/libexec/check_procs2 dsmc ge 2