1. Home /
  2. Downloads /
  3. Agents /
  4. AIX /
  5. Installing the Agent on a AIX Platform

Installing the Agent on a AIX Platform

 

Objective

The objective is to describe the procedures to a manual installation of the monitoring agente on AIX, platforms, without the need to compile, in order to monitor with the OpMon.fim de monitorar com o OpMon.

Target audience

It is intended for OpMon administrators and for IT teams that are already familiar with the installation of AIX apps and with the configurations of the OpMon.

Solution

In order to optimize the installing process of the agent AIX, the OpServices has created an automated installation package, containing the NRPE + NagiosPlugins + OpServicesPlugins. For those who wabt to perform the installation of this package, and follow the steps.

Download The Download link is available on the page of the OpServices: [ opmon-aix-5.2.tar.gz ]

The agent must be installed on the target AIX server and afterwards configured on the OpMon, making it thus possible to monitor system metrics, services, processes, performance data, among others.

Troubleshooting

In case you find any problem or error during the process, find your answer in our knowledge base, clicking here. If you want, there is an alternative installation, available on the internet. Click  here and follow the steps.

1) Criating a user

It is necessary to create a user, normally with the following definitions: opuser, according to the example given below.

[root@localhost]# adduser opuser -d /usr/local/opmon -g users -s /bin/bash -c "OpMon NRPE"
[root@localhost]# passwd opuser

Remember to set a secure password for this user, or create without permission to log in to the system.

2) Obtaining the Agent

Logging as the root of the target server and later download the files, as shown below:

[root@localhost]# cd /usr/local/opmon
[root@localhost opmon]# wget http://www.opservices.com.br/files/agentes/AIX/opmon-aix-5.2.tar.gz

3) Preparing the requirements

In order to unzip the packages previously obtained by downloading, the same temporary folder will be used, following the steps as shown below:

[root@localhost]# cd /usr/local/opmon
[root@localhost opmon]# tar -zxvf opmon-aix-5.2.tar.gz

4) Fine adjustments

Change the permission of the directory for the opuser user and users group.

[root@localhost]# chown -R opuser:users /usr/local/opmon/

Change the execution permissions

[root@localhost]# chmod 755 /usr/local/opmon/*

Insert the following line in the end of the file stc/services.

[root@localhost]# vim /etc/services
nrpe     5666/tcp     # OpMon Agent

5) Testing the Plugins

To validate whether the plugins are working, some tests are necessary. Once everything is correct, the result displayed must be similar to the one below:

[root@localhost]# cd /usr/local/opmon/libexec/
[root@localhost libexec]# ./check_load
check_load: Could not parse arguments
Usage:
check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15

[root@localhost libexec]# ./check_http -H www.google.com 
HTTP OK: HTTP/1.1 302 Found - 1009 bytes in 0.219 second response time |time=0.218719s;;;0.000000 size=1009B;;;

6) Initializing the Agent

Basically there are 3 options to start the agent: xinetd (recommended), inetd or inittab.

  • In order to use with the  xinetd

Insert the lines in a file called nrpe, within the directory nrpe, usually in /etc/xinetd.d. It is necessary to change the IP_DO_OPMON entry for the IP of the OpMon, or you can remove the line only_from, so any IP  will be able to consult this server.

[root@localhost]# vim /etc/xinetd.d/nrpe
service nrpe
{
flags = REUSE
socket_type = stream
wait = no
only_from = 127.0.0.1 IP_DO OPMON
user = opuser
server = /usr/local/opmon/libexec/nrpe
server_args = -c /usr/local/opmon/libexec/nrpe.cfg -i
log_on failure +=USERID
disable = no
}

Restart the xinetd  service, commonly used according to one of the examples listed below

[root@localhost]# service xinetd restart

Or this one:

[root@localhost]# stopsrc -s xinetd
[root@localhost]# startsrc -s xinetd
  • In order to use with the inetd

Insert the following line into the file /etc/inetd.conf

[root@localhost]# vim /etc/inetd.conf
nrpe stream tcp nowait opuser /usr/sbin/tcpd /usr/local/opmon/libexec/nrpe -c /usr/local/opmon/libexec/nrpe.cfg -i

Restart the inetd service, commonly used according to one of the examples listed below

[root@localhost]# service inetd restart

Or this one :

[root@localhost]# stopsrc -s inetd
[root@localhost]# startsrc -s inetd
  • In order to use with the inittab

Insert the following line into the file /etc/inittab

[root@localhost]# vim /etc/inittab
nrpe:2:once/usr/local/opmon/libexec /nrpe -c /usr/local/opmon/libexec/nrpe.cfg -d

To start the service, run the following command:

[root@localhost]# /usr/local/opmon/libexec /nrpe -c /usr/local/opmon/libexec/nrpe.cfg -d

7) Testing the access locally

To verify if the port 5666 is available for connections, use the following command and check if the output is similar to the one below:

[root@localhost]# netstat -vantup | grep 5666 
tcp 0 0 0.0.0.0:5666   0.0.0.0:*  LISTEN 2202/xinetd

To verify the communication of the NRPE:

[root@localhost]# /usr/local/opmon/libexec/check_nrpe -H 127.0.0.1
NRPE v2.13

Running a query load through the NRPE

[root@localhost ]# /usr/local/opmon/libexec/check_nrpe -H 127.0.0.1 -c check_load -a none
OK - load average:0.02,0.03,0.00|load1=0.020;15.000;30.000;0;load5=0.030;10.000;25.000;0;load15=0.000;5.000;20.000;0;

8) Testing the access through the OpMon

From the console of the OpMon, it is possible to verify the NRPE communication when the following command is executed, setting the IP_DO_SERVIDOR where the agent was installed.

[root@opmon]# /usr/local/libexec/check_nrpe -H IP_DO_SERVIDOR
NRPE v2.13

Running a query load through the NRPE.

[root@opmon]# /usr/local/opmon/libexec/check_nrpe -H IP_DO_SERVIDOR -c check_load -a none
OK - load average:0.02,0.03,0.00|load1=0.020;15.000;30.000;0;load5=0.030;10.000;25.000;0;load15=0.000;5.000;20.000;0;

All set, what now

After completing the installation process, the next step is to have the server start monitoring. In order to do so, you can access our Plugins and Templates base by clicking here to learn more.

Updated on 01/09/2021

Was this article helpful?

Ficou com alguma dúvida?

Perguntas & Respostas

Participe da nossa comunidade e tire dúvidas ou compartilhe respostas e ideias.

Participar

Professional Support

Não encontrou a resposta que procura? Não se preocupe, estamos aqui para ajudar!

Abrir chamado

Treinamento Online

Através da plataforma Udemy, você encontra todos os treinamentos das nossas soluções.

Inscreva-se