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 ?
using of check_linux_stat.pl Command
Re: using of check_linux_stat.pl Command
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 -
- Define your service like so (only showing the check_command part here)
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.
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$
}
Code: Select all
define service {
...
check_command check_nrpe!check_linux_stat
...
}
Former Nagios Employee
Re: using of check_linux_stat.pl Command
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 ,
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
Problem has been fixed..
Re: using of check_linux_stat.pl Command
Awesome, nice catch.
Going to mark this as resolved and close it out!
Going to mark this as resolved and close it out!
Former Nagios Employee