This document describes how to monitor AIX servers using Nagios.
These instructions cover how to install and use pre-compiled binaries to monitor AIX 5.3 using NRPE.
Download Pre-Compiled Binaries
You will need to download two packages of pre-compiled binaries to your AIX server.
First download the pre-compiled Nagios plugin binaries for AIX 5.3 from the following URL:
Next download the pre-compiled NRPE binaries from the above URL as well:
Login to your AIX server as the root user and run the following commands:
And now change owner to nagios as
chown –R nagios.nagios ../run
Next unpack the pre-compiled plugins and place the extracted files into the /usr/local/nagios directory using commands similar to the following:
gunzip < aix53_nrpe-nsca-plugins.tgz | tar xvf –
cp -R * /usr/local/nagios
Next, unpack the prec-ompiled NRPE binaries using commands similar to the following:
gunzip < AIX-5.3-nrpe-2.12-binaries.tar.gz | tar xvf -
cp usr/local/nagios/bin/nrpe /usr/local/nagios/bin
cp usr/local/nagios/etc/nrpe.cfg /usr/local/nagios/etc
Create Nagios User and Group
Next, create a Nagios user and group on the AIX server.
Use the following command to create a new group:
Make a home directory for a Nagios user using the following command:
Next, open up smitty and add a group and new user with the name
users and nagios. Launch smitty with the following command:
Group Name = users
Once smitty openes, select Add a user, and use the
• User NAME = nagios
• Primary Group = users
• Group SET = users,nagios
• HOME directory = /users/nagios
Change folder permissions so NRPE will operate properly, with the following command:
chown -R nagios.nagios /usr/local/nagios
Verify the permissions on the directory using the following commands:
ls –l to check the permission
Specify NRPE Port Number
Next, edit the /etc/services file to add a port number for NRPE.
To edit the file, use the following command:
Add a line to the file that looks exactly like this:
nrpe 5666/tcp #nrpe
Save the file.
Edit the nrpe.conf
Comment the following line as shown below:
#allowed_hosts=127.0.0.1 in nrpe.conf
Configure NRPE for Automatic Startup
Next, configure NRPE to automatically start when the AIX server reboots. To do this, use the following command:
nohup /usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg –d
You should get this reponse:
Sending nohup output to nohup.out.
Note: The -n flag specifies that the NRPE server should run without SSL support. This reduces security of the NRPE daemon, but dramatically increases performance under heavy server load and may be okay if your server is on an internal network protected by a firewall.
Start NRPE using the following command:
/usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg –d
Test Your NRPE Configuration
Test your AIX server to see if NRPE is running properly. To do this, use the following command:
ps -ef | grep nrpe
You should see something that looks like this:
nagios 111345 43675 /usr/local/nagios/bin/nrpe –c /usr/local/nagios/etc/nrpe.cfg -n –d
Note: The output you see may differ slightly, as the PID number will be different on your system.
Important: If you don't see any output when running the above command, it means something is wrong with your setup! This may be related to problems in your NRPE configuration file (/usr/local/nagios/etc/nrpe.cfg).