Jump to content

Configuration for NRPE on ITANIUM platform for Airtel NagiosXI project

From TetraWiki
Revision as of 12:32, 31 December 2012 by Biswajit (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Steps To install NRPE on Hp Unix on ITANIUM (IA) Platform[edit]

OBJECTIVE[edit]

To Install the NRPE on the Hp Unix Server.

Procedure for Installing NRPE on the server.

Procedure for Installing NRPE on the Server.[edit]

  1. Upload and Install the Depot File.
  2. Check NRPE Communication and Port Status.
  3. Configuring nrpe.cfg file.

Upload and Install the PKG[edit]

  1. Upload the nrpe-2.12.depot file to the server in the /tmp directory.
  2. Install the depot file on the server by the command.

# swinstall –s <full path of the depot file> (swinstall –s /tmp/nrpe-2.12.depot)

  1. On successful installation of the depot file we will get the folder /opt/nrpe.
  2. Inside the /opt/nrpe there will be three folders bin, etc, libexec.
  3. Go inside bin folder and run the file configure.sh
  4. Run the file configure.sh

Check NRPE Communication and Port Status[edit]

  1. After running the file the service of nrpe will be started on the server
  2. Check the nrpe service by command netstat –a | grep nrpe
  3. Output will be  tcp 0 0 *.nrpe *.* LISTEN
  4. Also check the nrpe service entry inside the file /etc/inetd.conf at the bottom.
  5. Go to folder /opt/nrpe/libexec and run the file. /check_nrpe –H localhost it will show you the version of the nrpe it should be “NRPE v2.12”.
  6. Inside libexec folder there will be generic plugins for the nagios that we can use while configuring the different services.
  7. Now go to nagios server 172.30.1.24 and go inside the folder /usr/local/nagios/libexec and run the command. /check_nrpe –H <client ip> this will show the nrpe version like NRPE v2.12 so it means we are able to communicate through nrpe from nagios server to the client.
  8. If we are not able to communicate through nagios server to the client then there is some issue. Check port 5666 should be open and it should not be blocked by the firewalls.
  9. Telnet on port 5666 through nagios server for the confirmation if port is opened or not.
  10. We can also check the port communication from the nagios server by the command

# nc –z <client ip> <port no >

Configuring nrpe.cfg file.[edit]

  1. After Installing the NRPE services on HP UNIX Server and checking the services of nrpe are running fine.
  1. Go to location /usr/local/nagios/etc at this location main file for NRPE is located (nrpe.cfg) in which all the services will be defined which we want to monitor for the particular server.
  1. Open the file nrpe.cfg and do not make any changes in the beginning of the file go to line number 197 where a sample is shown how we can monitor the different services (as shown below). We can change and modify the commands defined here according to our requirement.


  1. Below shown is the changed nrpe.cfg where the different services are defined that we have to monitor for the specific server through the nagios

EXPLANATION OF THE COMMANDS DEFINED IN NRPE.CFG[edit]

  1. check_hda1, check_cpu are the command name that we have defined to monitor the load of the server and swap memory of the server respectively, we can write any command name according to our requirement.
  1. /opt/nrpe/libexec is the path where we have kept the plugins and the shell scripts that we execute to bring the output of different services from the servers.
  1. check_swap.sh, check_disk check_cron.sh etc is name of the plugins and shell script that we have used for a specific service.
  1. –w 40% defines the warning level for a service and –c 20% defines the critical level for a service.
  1. –p /, /var define the partition that we want to monitor for the server (/ root partition, /var Var Partition) we can only monitor the partition that we can see through the mount command or bdf.
  1. For monitoring any of the process or the daemons we do not have to give the critical or the warning level, just copy the shell script for the daemon/process as shown above ( check_ssh for ssh process, check_named for named process, check_cron for cron process) basic process scripts are already present on the location /opt/nrpe/libexec as shown below.


  1. For the netstat we have to define the device name like lan0 (with option –d) for which we have to monitor the Network Input Output. We can get the device name from the command (# netstat –i) as shown below.


  1. For log monitoring we have to define the log file where we are getting the logs with the option –F < log file name with location like /var/adm/syslog/syslog.log>, with option –O we have to define a file where the last location of the log file scanned will be stored, with the option –q we have to define the pattern that we want to search from the log file as shown below.


  1. After defining all the services save the file and the service of nrpe will be update automatically.
  1. After that go to location /usr/local/nagios/libexec and run the command check_nrpe to see the output of the command that we have defined in nrpe.cfg through the nrpe if it is working fine or not, run the command as shown.
  1. . /check_nrpe –H localhost –c check_load (-H localhost to run locally –c check_load is the command name that we have defined in the nrpe.cfg file), output will be as shown below.
  1. This output shows that we are able to get the output from the nrpe locally from the client. We can check all the services same way by changing the command name and see if it is working or not