|
|
@@ -2,13 +2,13 @@ NRPE README
|
|
|
===========
|
|
|
|
|
|
For installation instructions and information on the design overview
|
|
|
-of the NRPE addon, please read the PDF documentation that is found in
|
|
|
+of the NRPE addon, please read the PDF documentation that is found in
|
|
|
this directory: `docs/NRPE.pdf`
|
|
|
|
|
|
|
|
|
Purpose
|
|
|
-------
|
|
|
-The purpose of this addon is to allow you to execute Nagios
|
|
|
+The purpose of this addon is to allow you to execute Nagios
|
|
|
plugins on a remote host in as transparent a manner as possible.
|
|
|
|
|
|
|
|
|
@@ -17,13 +17,13 @@ Contents
|
|
|
|
|
|
There are two pieces to this addon:
|
|
|
|
|
|
- 1) **NRPE** - This program runs as a background process on the
|
|
|
+ 1) **NRPE** - This program runs as a background process on the
|
|
|
remote host and processes command execution requests
|
|
|
from the check_nrpe plugin on the Nagios host.
|
|
|
Upon receiving a plugin request from an authorized
|
|
|
host, it will execute the command line associated
|
|
|
with the command name it received and send the
|
|
|
- program output and return code back to the
|
|
|
+ program output and return code back to the
|
|
|
check_nrpe plugin
|
|
|
|
|
|
2) **check_nrpe** - This is a plugin that is run on the Nagios host
|
|
|
@@ -45,8 +45,8 @@ compiling on your system, please let us know, hopefully with
|
|
|
fixes. Most users should be able to compile NRPE and the
|
|
|
check_nrpe plugin with the following commands...
|
|
|
|
|
|
- ./configure
|
|
|
- make all
|
|
|
+ ./configure
|
|
|
+ make all
|
|
|
|
|
|
The binaries will be located in the `src/` directory after you
|
|
|
run `make all` and will have to be installed manually somewhere
|
|
|
@@ -87,7 +87,7 @@ of TCP wrappers, you need to do the following things:
|
|
|
1) Add a line to your `/etc/services` file as follows (modify the port
|
|
|
number as you see fit)
|
|
|
|
|
|
- nrpe 5666/tcp # NRPE
|
|
|
+ nrpe 5666/tcp # NRPE
|
|
|
|
|
|
2) Add entries for the NRPE daemon to either your inetd or xinetd
|
|
|
configuration files. Which one your use will depend on which
|
|
|
@@ -103,12 +103,12 @@ of TCP wrappers, you need to do the following things:
|
|
|
If your system uses the inetd superserver **with** tcpwrappers, add an
|
|
|
entry to `/etc/inetd.conf` as follows:
|
|
|
|
|
|
- nrpe stream tcp nowait <user> /usr/sbin/tcpd <nrpebin> -c <nrpecfg> --inetd
|
|
|
+ nrpe stream tcp nowait <user> /usr/sbin/tcpd <nrpebin> -c <nrpecfg> --inetd
|
|
|
|
|
|
If your system uses the inetd superserver **without** tcpwrappers,
|
|
|
add an entry to `/etc/inetd.conf` as follows:
|
|
|
|
|
|
- nrpe stream tcp nowait <user> <nrpebin> -c <nrpecfg> --inetd
|
|
|
+ nrpe stream tcp nowait <user> <nrpebin> -c <nrpecfg> --inetd
|
|
|
|
|
|
|
|
|
- Replace `<user>` with the name of the user that the nrpe server should run as.
|
|
|
@@ -124,20 +124,20 @@ of TCP wrappers, you need to do the following things:
|
|
|
want to create a file called `nrpe` in your `/etc/xinetd.d`
|
|
|
directory that contains the following entries:
|
|
|
|
|
|
- # default: on
|
|
|
- # description: NRPE
|
|
|
- service nrpe
|
|
|
- {
|
|
|
- flags = REUSE
|
|
|
- socket_type = stream
|
|
|
- wait = no
|
|
|
- user = <user>
|
|
|
- server = <nrpebin>
|
|
|
- server_args = -c <nrpecfg> --inetd
|
|
|
- log_on_failure += USERID
|
|
|
- disable = no
|
|
|
- only_from = <ipaddress1> <ipaddress2> ...
|
|
|
- }
|
|
|
+ # default: on
|
|
|
+ # description: NRPE
|
|
|
+ service nrpe
|
|
|
+ {
|
|
|
+ flags = REUSE
|
|
|
+ socket_type = stream
|
|
|
+ wait = no
|
|
|
+ user = <user>
|
|
|
+ server = <nrpebin>
|
|
|
+ server_args = -c <nrpecfg> --inetd
|
|
|
+ log_on_failure += USERID
|
|
|
+ disable = no
|
|
|
+ only_from = <ipaddress1> <ipaddress2> ...
|
|
|
+ }
|
|
|
|
|
|
- Replace `<user>` with the name of the user that the nrpe server should run as.
|
|
|
- Replace `<nrpebin>` with the path to the nrpe binary on your system.
|
|
|
@@ -149,13 +149,13 @@ of TCP wrappers, you need to do the following things:
|
|
|
3) Restart inetd or xinetd will the following command (pick the
|
|
|
on that is appropriate for your system:
|
|
|
|
|
|
- /etc/rc.d/init.d/inet restart
|
|
|
+ /etc/rc.d/init.d/inet restart
|
|
|
|
|
|
- /etc/rc.d/init.d/xinetd restart
|
|
|
+ /etc/rc.d/init.d/xinetd restart
|
|
|
|
|
|
OpenBSD users can use the following command to restart inetd:
|
|
|
|
|
|
- kill -HUP `cat /var/run/inet.pid`
|
|
|
+ kill -HUP `cat /var/run/inet.pid`
|
|
|
|
|
|
4) Add entries to your `/etc/hosts.allow` and `/etc/hosts.deny`
|
|
|
file to enable TCP wrapper protection for the nrpe service.
|
|
|
@@ -174,8 +174,8 @@ to define a few things in the host config file. An example
|
|
|
command definition for the check_nrpe plugin would look like this:
|
|
|
|
|
|
define command{
|
|
|
- command_name check_nrpe
|
|
|
- command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
|
|
|
+ command_name check_nrpe
|
|
|
+ command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
|
|
|
}
|
|
|
|
|
|
In any service definitions that use the nrpe plugin/daemon to
|
|
|
@@ -184,14 +184,14 @@ of the definition to something like this (sample service definition
|
|
|
is simplified for this example):
|
|
|
|
|
|
define service{
|
|
|
- host_name someremotehost
|
|
|
- service_description someremoteservice
|
|
|
- check_command check_nrpe!yourcommand
|
|
|
+ host_name someremotehost
|
|
|
+ service_description someremoteservice
|
|
|
+ check_command check_nrpe!yourcommand
|
|
|
... etc ...
|
|
|
}
|
|
|
|
|
|
-where `yourcommand` is a name of a command that you define in
|
|
|
-your nrpe.cfg file on the remote host (see the docs in the
|
|
|
+where `yourcommand` is a name of a command that you define in
|
|
|
+your nrpe.cfg file on the remote host (see the docs in the
|
|
|
sample nrpe.cfg file for more information).
|
|
|
|
|
|
|
|
|
@@ -200,7 +200,7 @@ Questions?
|
|
|
|
|
|
If you have questions about this addon, or problems getting things
|
|
|
working, first try searching the nagios-users mailing list archives.
|
|
|
-Details on searching the list archives can be found at
|
|
|
+Details on searching the list archives can be found at
|
|
|
http://www.nagios.org
|
|
|
|
|
|
If you don't find an answer there, post a message in the Nagios
|