Get Nagios at http://www.nagios.org. You'll need both the base nagios package as well as nagios-plugins. On 9-17-2006, I got nagios-2.5-1.el4.rf.i386.rpm and nagios-plugins-1.4.2-1.2.el4.rf.i386.rpm.
A rpm -qip nagios-plugins-1.4.2-1.2.el4.rf.i386.rpm command said
... you may need additional packages. Depending on what plugins you
use, the following packages may be required:
bind-utils, mysql, net-snmp-utils, ntp, openldap,
openssh-clients, openssl, postgresql-libs
qstat, radiusclient, samba-client, sendmail
The only one that sounded interesting and that was in the standard RHEL v4 CDs,
was net-snmp-utils (the pre-req of net-snmp was already installed), so I installed
this package.
Nagios installed cleanly, but nagios-plugins required all these pre-reqs
AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users require valid-userI don't think I have to do this, but I'm not certain.
I added a nagiosadmin id to my /etc/nagios/htpasswd.users file.
htpasswd -c /etc/nagios/htpasswd.users nagiosadmin New password: global Re-type new password: global Adding password for user nagiosadmin
I had to go through /etc/nagios/cgi.cfg file and change and/or un-comment the following lines:
authorized_for_system_information=nagiosadmin authorized_for_configuration_information=nagiosadmin authorized_for_system_commands=nagiosadmin authorized_for_all_services=nagiosadmin authorized_for_all_hosts=nagiosadmin authorized_for_all_service_commands=nagiosadmin authorized_for_all_host_commands=nagiosadmin
I updated /etc/nagios/minimal.cfg to
I downloaded 2.0, did the typical
zip -d < nrpe-2.0.tar.gz | tar xvf - cd nrpe-2.0 ./configure make alland got this message.
*** Compile finished ***
If the NRPE daemon and client compiled without any errors, you
can continue with installation. The NRPE daemon and client
binaries are located in the src/ subdirectory.
** If this is your monitoring host **
- Copy the check_nrpe client to the directory that
contains your Nagios plugins.
- Create a command definition in your Nagios config
file for the NRPE client. See the README file for
more info on doing this.
** If this host will be running the NRPE daemon **
- Copy the nrpe daemon to /usr/sbin, /usr/local/nagios
or wherever you feel it fits best.
- Copy the sample nrpe.cfg config file to /etc,
/usr/local/nagios or wherever you feel it fits best.
- Modify the /etc/services file and configure NRPE to
run under inetd, xinetd, or as a standalone daemon.
See the README file for more info on doing this.
On linux2, my Nagios server,
# This is for NRPE (RAJ)
define command{
command_name check_nrpe
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ \
-c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$
}
and added this line nrpe 5666/tcp # NRPE - Nagios Remote Plug-in Executor
check_command check_nrpe!yourcommand-in-the-nrpe.cfg-file-on-the-remote-host
On each Linux client machine,
scp -p root@linux2:nrpe-2.0/src/nrpe /usr/bin scp -p root@linux2:nrpe-2.0/nrpe.cfg /etc adduser -u 401 nagios vi /etc/xinetd.d/nrpemaking it
# description: NRPE (Nagios Remote Plug-in Executor)
service nrpe
{
flags = REUSE
socket_type = stream
wait = no
user = nagios
server = /usr/bin/nrpe
server_args = -c /etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 192.168.1.222
}
To install the Nagios plug-ins, on each remote host,
mkdir /mnt/linux
mount linux2:/home/linux /mnt/linux
cd /mnt/linux/extras/
rpm -Uvh nagios-plugins-1.4.2-1.2.el4.rf.i386.rpm \
perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm \
fping-2.4-1.b2.2.el4.rf.i386.rpm \
perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm \
perl-Socket6-0.19-1.2.el4.rf.i386.rpm
cd
umount /mnt/linux
vi /etc/services and added this line nrpe 5666/tcp # NRPE - Nagios Remote Plug-in ExecutorAnd finally,
service xinetd reload