Quote:
Originally Posted by anaigini45
I want to use the nrpe method. For both local and remote server. I want to test and run it in my local server first. Then install and make it run in the remote server.
|
to run it locally, install the scripts in the main directory that houses all the n agios plugins /usr/local/nagios/libexec or /usr/lib/nagios/plugins/
add a line to commands.cfg for that script...there will be many examples already in the file for you to follow.
and finally define the service....possibly in the hosts.cfg? depends how you have set up.
there are also examples in there to follow.
for nrpe, you need nagios-nrpe running on the remote server and nrpe.cfg configured correctly and started. there are examples in nrpe.cfg
the nagios plugin(s) are then installed in the plugin directory on the remote server(s) and called from the main nagios server.
service needs defining on the server in the hosts.cfg file or wherever you define services.
check_nrpe needs to also be defined in the commands.cfg file.
you can also test this from command line..
./check_nrpe -H hostname -c command -a arguments
ie
./check_nrpe -H remotehost -c checkmysql.pl -a 10 20