Installing Nagios NRPE on AIX
From Nagios Wiki
The following HOWTO describes how to install NRPE on AIX so that Nagios can monitor things such as CPU load, running processes, concurrent users, drive capacity, etc.
[edit] installing via pre-built binaries (easiest)
- grab binary file from [p_view=1153 NagiosExchange.org]
- downloaded AIX nrpe package
cd /opt
wget http://www.domain.com/path/to/nrpe-nsca-plugins.tgz - unzip and untar package in /opt
gunzip /opt/nrpe-nsca-plugins.tgz<br />tar xvf /opt/nrpe-nsca-plugins.tar
('tar tvf /opt/nrpe-nsca-plugins.tar' to list contents)
(rm '/opt/nrpe-nsca-plugins.tar' to remove) - Copy /etc files to /etc folder (optional, but where many UNIX admins prefer to keep all config files)
cp /opt/nagios/etc/* /etc/
OR log on another similar box and type in the following to push it over to this boxscp nrpe.cfg root@otherbox:/etc
OR grab nrpe.cfg from another box and copy to your /etc directoryscp root@otherbox:/etc/nrpe.cfg /etc/
if you have scp'd correctly, should see something like thisnrpe.cfg 100% 9415 9.2KB/s 00:00
- modify NRPE handler command[check_whatever] paths to reflect the binaries in /opt
e.g.
/etc/nrpe.cfgcommand[check_users]=/opt/nagios/libexec/check_users -w 5 -c 10
- copy Nagios bin files in /usr/bin
cp /opt/nagios/bin/* /usr/bin
- add nrpe to /etc/rc.local so that it autostarts upon reboot
nohup /usr/bin/nrpe -c /etc/nrpe.cfg -d
(should see following if done correctly)Sending nohup output to nohup.out.
- start the NRPE process, and point it to the nrpe.cfg file which will control your system
/usr/bin/nrpe -c /etc/nrpe.cfg -d
- double check to make sure rc.local entry is correct and that process is running
less /etc/rc.local
(should output)nohup /usr/bin/nrpe -c /etc/nrpe.cfg -d > /dev/null 2>&1#Start NRPE for Nagios
ANDps -ef | grep nrpe
root 458886 589858 0 01:11:51 pts/0 0:00 grep nrpe nagios 536778 1 0 01:11:13 - 0:00 /usr/bin/nrpe -c /etc/nrpe.cfg -d[root:rpmrep:/etc]
- check from nagios box (tested on CentOS 4.x)
cd /usr/lib/nagios/plugins/ ./check_nrpe -H AIX_Server -c check_whatever
[edit] installing via source
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz gunzip gd-2.0.35.tar.gz tar -xvpf cd gd-2.0.35.tar.gz
untar nrpe tar z nrpefile.tar.gz tar xfv nrpefile.tar cd nrpefile ./configure (options) make install
[edit] Troubleshooting
1. Errors in your nrpe.cfg will show up in syslog. Tail the logs, and you can see which line number you need to fix.
tail /adm/log/syslog

