Page 1 of 1

using of check_linux_stat.pl Command

Posted: Fri Sep 23, 2016 2:37 am
by gsivaa
Hi Folks,

I am new to nagios and I am interested in using the script check_linux_stat.pl...

Could you please some one explain me on how to implement this in the Servers..
Like commands.cfg , nrpe.cfg and services.cfg files? what are the entires i need to hardcore in these files ?

Re: using of check_linux_stat.pl Command

Posted: Fri Sep 23, 2016 10:27 am
by rkennedy
I believe we're already working through a similar issue here for you - https://support.nagios.com/forum/viewto ... 81#p196981

Here's a short explaination though.

- Upload check_linux_stat.pl to the client machine, usually /usr/local/nagios/libexec/ (ensure permissions are proper for nagios user)
- Modify /usr/local/nagios/etc/nrpe.cfg and define a command for check_linux_stat.pl, something like - command[check_linux_stat]=/usr/local/nagios/libexec/check_linux_stat.pl
- Restart NRPE, or XINETD on the client machine, depending on how you have it running. The client machine should be good to go now.
- Now, make sure you have check_nrpe defined on the Nagios machine in your commands file -

Code: Select all

define command {
       command_name                             check_nrpe
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
- Define your service like so (only showing the check_command part here)

Code: Select all

define service {
...
check_command check_nrpe!check_linux_stat
...
}
Now restart the nagios service and you should be seeing the output as if you were executing /usr/local/nagios/libexec/check_linux_stat.pl on the client machine.

Re: using of check_linux_stat.pl Command

Posted: Sat Sep 24, 2016 2:36 am
by gsivaa
Hi,

How can i monitor the different services using this same command..

When i just follow your instruction as per the previous reply, i am getting the error message in the browser as ,
(NO output returned from Plugin)

Re: using of check_linux_stat.pl Command

Posted: Sat Sep 24, 2016 11:43 pm
by gsivaa
Problem has been fixed..

Re: using of check_linux_stat.pl Command

Posted: Mon Sep 26, 2016 11:14 am
by rkennedy
Awesome, nice catch.

Going to mark this as resolved and close it out!