Did You Know?
Ask a Question

We are pleased to announce the Launch of our New Section "TecMint Ask"

How to Add Linux Host to Nagios Monitoring Server Using NRPE Plugin

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

In our first part of this article, we’ve explained in detail on how to install and configure latest Nagios Core 4.0.1 on CentOS 6.4 server. In this article we will show you how to add Remote Linux machine and it’s services to Nagios Monitoring host using NRPE agent.

We hope you already having Nagios installed and running properly. If not, please use the following installation guide to install it on the system.

  1. Nagios 4.0.1 Installation Guide on RHEL/CentOS 6.x/5.x & Fedora 19/18/17
  2. How to Add Windows Host to Nagios Monitoring Server

Once you’ve installed, you can proceed further to install NRPE agent on your Remote Linux host. Before heading further, let us give you a short description about NRPE.

What is NRPE?

The NRPE (Nagios Remote Plugin Executor) plugin allows you to monitor any remote Linux/Unix services or network devices. This NRPE add-on allows Nagios to monitor any local resources like CPU load, Swap, Memory usage, Online users, etc. on remote Linux machines. After all, these local resources are not mostly exposed to external machines, an NRPE agent must be installed and configured on the remote machines.

Note: The NRPE addon requires that Nagios Plugins must be installed on the remote Linux machine. Without these, the NRPE daemon will not work and will not monitor anything.

Installation of NRPE Plugin

To use the NRPE, you will need to do some additional tasks on both the Nagios Monitoring Host and Remote Linux Host that the NRPE installed on. We will be covering both the installation parts separately.

We assume that you are installing the NRPE on a host that supports TCP wrappers and Xinted daemon installed on it. Today, most of the modern Linux distributions have these two installed by default. If not, we will install it later during the installation when required.

On Remote Linux Host

Please use the below instructions to install Nagios Plugins and NRPE daemon on the Remote Linux Host.

Step 1: Install Required Dependencies

We need to install required libraries like gcc, glibc, glibc-common and GD and its development libraries before installing.

[root@tecmint]# yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel
Step 2: Create Nagios User

Create a new nagios user account and set a password.

[root@tecmint]# useradd nagios
[root@tecmint]# passwd nagios
Step 3: Install the Nagios Plugins

Create a directory for installation and all its future downloads.

[root@tecmint]# cd /root/nagios

Now download latest Nagios Plugins 1.5 package with wget command.

[root@tecmint nagios~]# wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
Step 4: Extract Nagios Plugins

Run the following tar command to extract the source code tarball.

[root@tecmint nagios~]# tar –xvf nagios-plugins-1.5.tar.gz

After, extracting one new folder will appear in that directory.

[root@tecmint nagios ~]# ll

drwxr-xr-x 15    200    300    4096 Oct  2 20:57 nagios-plugins-1.5
-rw-r--r--  1 root   root   2428258 Oct  2 20:57 nagios-plugins-1.5.tar.gz
Step 5: Compile and Install Nagios Plugins

Next, compile and install using following commands

[root@tecmint nagios]# cd nagios-plugins-1.5
[root@tecmint nagios]# ./configure 
[root@tecmint nagios]# make
[root@tecmint nagios]# make install

Set the permissions on the plugin directory.

[root@tecmint nagios]# chown nagios.nagios /usr/local/nagios
[root@tecmint nagios]# chown -R nagios.nagios /usr/local/nagios/libexec
Step 6: Install Xinetd

Most of the systems, its by default installed. If not, install xinetd package using following yum command.

[root@tecmint nagios]# yum install xinetd
Step 7: Install NRPE Plugin

Download latest NRPE Plugin 2.15 packages with wget command.

[root@tecmint]# cd /root/nagios
[root@tecmint]# wget http://garr.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz

Unpack the NRPE source code tarball.

[root@tecmint]# tar xzf nrpe-2.15.tar.gz
[root@tecmint]# cd nrpe-2.15

Compile and install the NRPE addon.

[root@tecmint]# ./configure
[root@tecmint]# make all

Next, install the NRPE plugin daemon, and sample daemon config file.

[root@tecmint]# make install-plugin
[root@tecmint]# make install-daemon
[root@tecmint]# make install-daemon-config

Install the NRPE daemon under xinetd as a service.

[root@tecmint]# make install-xinetd

Now open /etc/xinetd.d/nrpe file and add the localhost and IP address of the Nagios Monitoring Server.

only_from = localhost <nagios_ip_address>

Next, open /etc/services file add the following entry for the NRPE daemon at the bottom of the file.

nrpe            5666/tcp                 NRPE

Restart the xinetd service.

[root@tecmint]# service xinetd restart
Step 8: Verify NRPE Daemon Locally

Run the following command to verify the NRPE daemon working correctly under xinetd.

[root@tecmint]# netstat -at | grep nrpe

tcp        0      0 *:nrpe                      *:*                         LISTEN

If you get output similar to above, means it working correctly. If not, make sure to check the following things.

  1. Check you’ve added nrpe entry correctly in /etc/services file
  2. The only_from contains an entry for “nagios_ip_address” in the /etc/xinetd.d/nrpe file.
  3. The xinetd is installed and started.
  4. Check for the errors in the system log files for about xinetd or nrpe and fix those problems.

Next, verify the NRPE daemon is functioning properly. Run the “check_nrpe” command that was installed earlier for testing purposes.

[root@tecmint]# /usr/local/nagios/libexec/check_nrpe -H localhost

You will get a following string on the screen, it shows you what version of NRPE is installed:

NRPE v2.15
Step 9: Configure Firewall Rules

Make sure that the Firewall on the local machine will allow the NRPE daemon to be accessed from remote servers. To do this, run the following iptables command.

[root@tecmint]# iptables -A INPUT -p tcp -m tcp --dport 5666 -j ACCEPT

Run the following command to Save the new iptables rule so it will survive at system reboots.

[root@tecmint]# service iptables save
Step 10: Customize NRPE commands

The default NRPE configuration file that got installed has several command definitions that will be used to monitor this machine. The sample configuration file located at.

[root@tecmint]# vi /usr/local/nagios/etc/nrpe.cfg

The following are the default command definitions that are located at the bottom of the configuration file. For the time being, we assume you are using these commands. You can check them by using the following commands.

# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_users

USERS OK - 1 users currently logged in |users=1;5;10;0
# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_load

OK - load average: 3.90, 4.37, 3.94|load1=3.900;15.000;30.000;0; load5=4.370;10.000;25.000;0; load15=3.940;5.000;20.000;0;
# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_hda1

DISK OK - free space: /boot 154 MB (84% inode=99%);| /boot=29MB;154;173;0;193
# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_total_procs

PROCS CRITICAL: 297 processes
# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_zombie_procs

PROCS OK: 0 processes with STATE = Z

You can edit and add new command definitions by editing the NRPE config file. Finally, you’ve successfully installed and configured NRPE agent on the Remote Linux Host. Now it’s time to install a NRPE component and add some services on your Nagios Monitoring Server

On Nagios Monitoring Server

Now login into your Nagios Monitoring Server. Here you will need to do following things:

  1. Install the check_nrpe plugin.
  2. Create a Nagios command definition using the check_nrpe plugin.
  3. Create Nagios host and add service definitions for monitoring the remote Linux host.
Step 1: Install NRPE Plugin

Go to the nagios download directory and download latest NRPE Plugin with wget command.

[root@tecmint]# cd /root/nagios
[root@tecmint]# wget http://garr.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz

Unpack the NRPE source code tarball.

[root@tecmint]# tar xzf nrpe-2.15.tar.gz
[root@tecmint]# cd nrpe-2.15

Compile and install the NRPE addon.

[root@tecmint]# ./configure
[root@tecmint]# make all
[root@tecmint]# make install-daemon
Step 2: Verify NRPE Daemon Remotely

Make sure that the check_nrpe plugin can communicate with the NRPE daemon on the remote Linux host. Add the IP address in the command below with the IP address of your Remote Linux host.

[root@tecmint]# /usr/local/nagios/libexec/check_nrpe -H <remote_linux_ip_address>

You will get a string back that shows you what version of NRPE is installed on the remote host, like this:

NRPE v2.15

If your receive a plugin time-out error, then check the following things.

  1. Make sure your firewall isn’t blocking the communication between the remote host and the monitoring host.
  2. Make sure that the NRPE daemon is installed correctly under xinetd.
  3. Make sure that the remote Linux host firewall rules blocking the monitoring server from communicating to the NRPE daemon.

Adding Remote Linux Host to Nagios Monitoring Server

To add a remote host you need to create a two new files “hosts.cfg” and “services.cfg” under “/usr/local/nagios/etc/” location.

[root@tecmint]# cd /usr/local/nagios/etc/
[root@tecmint]# touch hosts.cfg
[root@tecmint]# touch services.cfg

Now add these two files to main Nagios configuration file. Open nagios.cfg file with any editor.

[root@tecmint]# vi /usr/local/nagios/etc/nagios.cfg

Now add the two newly created files as shown below.

# You can specify individual object config files as shown below:

Now open hosts.cfg file and add the default host template name and define remote hosts as shown below. Make sure to replace host_name, alias and address with your remote host server details.

[root@tecmint]# vi /usr/local/nagios/etc/hosts.cfg
## Default Linux Host Template ##
define host{
name                            linux-box               ; Name of this template
use                             generic-host            ; Inherit default values
check_period                    24x7        
check_interval                  5       
retry_interval                  1       
max_check_attempts              10      
check_command                   check-host-alive
notification_period             24x7    
notification_interval           30      
notification_options            d,r     
contact_groups                  admins  
register                        0                       ; DONT REGISTER THIS - ITS A TEMPLATE

## Default
define host{
use                             linux-box               ; Inherit default values from a template
host_name                       tecmint		        ; The name we're giving to this server
alias                           CentOS 6                ; A longer name for the server
address                           ; IP address of Remote Linux host

Next open services.cfg file add the following services to be monitored.

[root@tecmint]# vi /usr/local/nagios/etc/services.cfg
define service{
        use                     generic-service
        host_name               tecmint
        service_description     CPU Load
        check_command           check_nrpe!check_load

define service{
        use                     generic-service
        host_name               tecmint
        service_description     Total Processes
        check_command           check_nrpe!check_total_procs

define service{
        use                     generic-service
        host_name               tecmint
        service_description     Current Users
        check_command           check_nrpe!check_users

define service{
        use                     generic-service
        host_name               tecmint
        service_description     SSH Monitoring
        check_command           check_nrpe!check_ssh

define service{
        use                     generic-service
        host_name               tecmint
        service_description     FTP Monitoring
        check_command           check_nrpe!check_ftp

Now NRPE command definition needs to be created in commands.cfg file.

[root@tecmint]# vi /usr/local/nagios/etc/objects/commands.cfg

Add the following NRPE command definition at the bottom of the file.

# Command to use NRPE to check remote host systems

define command{
        command_name check_nrpe
        command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

Finally, verify Nagios Configuration files for any errors.

[root@tecmint]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Total Warnings: 0
Total Errors:   0

Restart Nagios:

[root@tecmint]# service nagios restart

That’s it. Now go to Nagios Monitoring Web interface at “http://Your-server-IP-address/nagios” or “http://FQDN/nagios” and Provide the username “nagiosadmin” and password. Check that the Remote Linux Host was added and is being monitored.

Nagios Remote Host Monitoring

Nagios Remote Host Monitoring

That’s it! for now, in our my up-coming article I will show you how to add Windows host to Nagios monitoring Server. If you’re facing any difficulties while adding remote host to Nagios. Please do comment your queries or problem via comment section, till then stay tuned to Tecmint.com for more such valuable articles.

Ravi Saive

Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Linux Services & Free WordPress Setup

Our post is simply ‘DIY’ aka ‘Do It Yourself, still you may find difficulties and want us to help you out. We offer wide range of Linux and Web Hosting Solutions at fair minimum rates. Please submit your orders by Clicking Here.

104 Responses

  1. dilip varma says:

    very useful…thank you so much..keep posting

  2. Vasu says:

    Hi Ravi,

    Excellent tutorial. One small clarification is, the host_name mentioned in services.cfg file is Remote machine host name ?


    • Ravi Saive says:

      Yes, you should add your remote machine host name.

      • Mahesh says:

        Is the host configuration to be done for all the host machines to be monitored?

        • Ravi Saive says:

          Yes, you correct, you need to configure all hosts with these configuration.

          • Mahesh says:

            ok,thanks,but the remote host monitoring is not working.

            the monitoring server is showing values of the localhost only.

            do i need to turn off firewall or add an exception to allow the server to communicate to the host machine for monitoring.
            If so, how to add the exception.

  3. Vasu says:

    Hi Ravi,

    I have configured everything properly. But after login with nagiosadmin to check hosts status it shows following error :

    It appears as though you do not have permission to view information for any of the hosts you requested…

    If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI and check the authorization options in your CGI configuration file.

    I have checked /usr/local/nagios/etc/cgi.cfg file, all entires are fine with nagiosadmin and checked /etc/httpd/conf.d/nagios.conf file also seems fine. But I don’t know where Im doing wrong.

    Hope an early response from you.

    Thanks & Regards



    • Ravi Saive says:

      Solution, open your cgi.cfg file and change all the below parameters to the user you set to permit viewing.

      #edit username

      Restart the Nagios service after making changes in the cgi.cfg file.

    • Vasu says:

      Hi Ravi,

      Its working now. Again checked these two files /usr/local/nagios/etc/cgi.cfg and /usr/local/nagios/etc/objects/contacts.cfg for errors and configured once again.

      Please add one more command on Nagios Monitoring Server at step 1 below
      # make install-daemon
      # make install-plugin


  4. Vinodh says:

    Nice document. Thank you Ravi

  5. dummy says:

    Thanks boss the info u set here lead me to a great way to complete mine and understand what i am working on thanks for the useful info

  6. blackms says:

    Is it possible to make nrpe copy the plugins everytime it runs? I need to redistribute custom checks every time in order to keep them up to date.

  7. vivek says:

    It produces the following error

    connect to address port:5666 Connection refused
    connect to host port:5666: Connection refused

    when we use the command /usr/local/nagios/libexec/check_nrpe -H

    For ipaddress i have used in which i had configure the nagios server

    How can we solve this error

    • Ravi Saive says:

      Please open the 5666 port on remote host firewall.

      • prasanth says:

        Hi Ravi,

        Suppose if i need to monitor a remote sftp server do i need to do this installation only on that server which i need to monitor.

        My requirement is to monitor a remote sftp server and transfer the files with FTP protocol to that server my from my computer


        • Ravi Saive says:

          Correct, you need to install sftp service on remote host only.

          • prasanth says:

            So if i can install the nagios plugins and the NRPE on the remote sftp server which i want to monitor can i perform the file transfer as well or do i need to install any additional software along with nagios to do the FTP ??

          • Ravi Saive says:

            Yes you can, do whatever you want. Nagios will not interfere with any of your services.

  8. prasanth says:

    Can any one pls let em know after the installation of the nagios plugin we can monitor the remote servers but can the nagios plgins be used to do a file transfer a remote sftp server ?? is it possible to transfer a file from our system toa remote sftp server by using ftp protocol if the nagios plugin is installed in my system ??
    pls reply

    • Ravi Saive says:

      Yes you can transfer files from Nagios to any server. Nagios will not interfere in any of the running service in system.

      • prasanth says:

        Thanks for your response, I need to transfer the files to remote sftp server from my windows xp pc ,so i need to execute the installation steps what you have suggested above in the remote sftp server to which i need to monitor and establish the connection is my understanding right ??

    • Sreenivas says:


      I have configured it but host is still down in nagios. Some of the checks are working . Like user,load. How to add more checks?. How to make host alive.


  9. pandiyan says:

    hai ravi,

    i got error message Warning: Duplicate definition found for host ‘mphs’ (config file ‘/usr/local/nagios/etc/objects/localhost.cfg’, starting on line 24)
    Error: Could not add object property in file ‘/usr/local/nagios/etc/objects/localhost.cfg’ on line 28.
    Error processing object config files!
    what can i do please give me a solutions


    • Ravi Saive says:

      It seems that you’ve added duplicate entry in localhost.cfg file, remove that ‘mphs’ on line 24 from localhost.cfg file and try to restart again.

  10. sam says:

    Hey guys..

    we have been using nagios since years and I must say, there is no better tool than nagios for monitoring. However, i was wondering if there is any automated script that will allow us to add new hosts to localhost.cfg, instead of manually editing that file? Is there any web interface or script to make this task simple?
    thanks for your help in advance.!

  11. srj says:

    I have installed the nrpe plugins as mentioned on this page, still many commands fail
    like this one,

    Failure are seen on remote host itself
    # /usr/local/nagios/libexec/check_nrpe -H localhost -c check_swap
    NRPE: Command ‘check_swap’ not defined

    only commands that are running are check_load and check_users

    • Ravi Saive says:

      Yes!, you need to define those commands in remote Linux nrpe.cfg file and then add that check_swap command in Nagios Monitoring services file.

  12. Sreekanth says:

    hi ravi

    am getting this error


    CPU Load

    CRITICAL 12-11-2013 22:57:50 0d 1h 13m 56s 3/3 (Return code of 255 is out of bounds)

    Current Users

    CRITICAL 12-11-2013 23:00:22 0d 1h 12m 52s 3/3 (Return code of 255 is out of bounds)

    FTP Monitoring

    CRITICAL 12-11-2013 22:59:58 0d 1h 11m 48s 3/3 (Return code of 255 is out of bounds)

    SSH Monitoring

    CRITICAL 12-11-2013 23:03:26 0d 1h 10m 44s 3/3 (Return code of 255 is out of bounds)

    Total Processes

    CRITICAL 12-11-2013 23:02:30 0d 1h 9m 40s 3/3 (Return code of 255 is out of bounds)

    wt the host details i added to nagios getting (Return code of 255 is out of bounds) in status information

  13. Sreekanth says:

    status information displays (Return code of 255 is out of bounds) remote host in nagios

  14. karthick says:

    i have installed nagios 3.4.1 want to upgrade to 4.0.2 without data loss in ubuntu

  15. Cnu says:

    Good Morning Ravi,

    Excellent article you are maintaining. Its so useful besides perfect working.

    Thanks a lot Ravi


  16. Stephen Gaede says:

    When I add the check_command check_nrpe!check_ping I get a critical error saying NRPE: Command ‘check_ping’ not defined

  17. Alyson says:

    I’m following your document, and all went well until installing the NRPE plugin on the nagios server.
    I get down to Step 2. Add command:
    /usr/local/nagios/libexec/check_nrpe -H

    and I get this error message:
    -bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory

    Looking in the directory, check_nrpe is not there. What did I do wrong?


    • Manzoor says:

      Hi Alyson

      Yes check_nrpe is not there . Please follow the steps which you followed to install NRPE on the remote host. You should follow the same steps on the nagios server as well


  18. sevagaperumal says:

    hai Ravi,

    I have installed nagios. but not opening in browser. please help

  19. prakash says:

    As like comment from Alyson —

    when I was installing the NRPE comment on nagios server then getting —

    checking for initgroups… yes
    checking for closesocket… no
    checking for socklen_t… yes
    checking for type of socket size… size_t
    checking for SSL headers… configure: error: Cannot find ssl headers

    so due to this can’t find “check_nrpe” command from console on Nagios Server.

  20. mohd salim says:

    when i am installing cent os 6.4X86_64 then i am facing a problem.after creating partition when i click on next the error oucer and the error is( sytem try to mount image but image not found on drive please copy image on hard drive then click retry)
    so please provide solution for this error

  21. Ramon says:

    Status on Localhost (ok),
    but status on Remote Linux Host (CRITICAL) and Status Information (Return code of 127 is out of bounds – plugin may be missing)

    Can u help me

    this is my print screen


  22. Daniel says:

    Hi, thanks for the guide, is very useful for Red Hat’s based systems

    Im using Centos 6.5 Final Realease, and im getting this error

    [root@localhost nrpe-2.15]# /usr/local/nagios/libexec/check_nrpe -H localhost
    CHECK_NRPE: Error – Could not complete SSL handshake.

    I’ve followed the guide as it’s explained but im stucked at this point. I guess it’s a problem with NRPE (looks obvious), however, i’ve looked in google and in some websites tells about NRPE as a service.

    Im understanding that NRPE was installed under Xinetd daemon, so it should be restarted when xinetd it’s; but it’s not happening. In fact when i try to do separately this is the result:

    [root@localhost ~]# service nrpe restart
    nrpe: unrecognized service

    Is there anything that i’ve done wrong? Could you help?

    When this error happened in Debian based systems such as Ubuntu, I checked the NRPE Installation. To the ./configure script i passed these values and it fixed in that moment, but not now

    ./configure –with-ssl=/usr/bin/openssl –with-ssl-lib=/usr/lib/x86_64-linux-gnu

    Thanks in advantage for any recommendation..


    • Ravi Saive says:

      Have you restarted Xinetd service? have you added correct host entry under Xinetd nrpe file?

      • Daniel says:

        Yes, I’ve restarted the xinet service many times. However, checking accurately the command, i found the issue. The thing is;

        /usr/local/nagios/libexec/check_nrpe -H localhost

        When I did it on Ubuntu, I put instad of “localhost” “ip_address_of_host” so, for me the result always was successful

        [root@tecmint]# /usr/local/nagios/libexec/check_nrpe -H “localhost” or “″

        NRPE v2.15

        I’ve checked that in Red Hat based systems’ is neccessary put “localhost” in nrpe file, it’s not enough putting or “host_ip_address”, when i delete “localhost” from nrpe, then the error comes after command execution.

        Now, in my Ubuntu Nagios Server, the NRPE installed is v2.12. Im testing NRPE from nagios server to my Centos host v2.15 and it’s not connecting and this is the error

        Connection refused or timed out

        Firewall ports are opened, xinetd nrpe file was checked, could be a problem of nrpe version between 2.12 and 2.15?

        From the same way, i’ll keep checking other things. If you have some idea, please i’d like to read you.

        Thanks for the answer and thanks in advantage for any help that you can bring me.


        • Ravi Saive says:

          Add the localhost entry in /etc/xinetd/nrpe file in allowed list and restart Xinetd service..

        • rahul says:

          Hi Ravi,

          Thanks for this post. I was able to successfully add a remote host but I cannot see it when I open the UI in the browser. Can you please let me know possible cause for the same.


          • Vijayakumar says:

            Hi Rahul,

            Am also getting the same problem have u found any solution for that, if yes kindly share with me also.


          • Vijayakumar says:

            Hello Rahul,

            i found the problem selinux needs to be down or permissive

  23. Amadasun Osazuw says:

    after verifying my nagios.cfg, and i restart the nagios, it keeps tell stopping failed.
    do you have an idea to fix this issues

  24. stanga says:

    I have installed the nagios by the above steps but I don’t know where I have did mistake
    It would be great help if you share me how to uninstall the nagios from my master and slave node…I’ll try freshly once again…
    Thanks in Advance…!!!

  25. stanga says:

    one more try for the same issue…!!!
    I have installed the nagios by the above steps but I don’t know where I have did mistake
    It would be great help if you share me how to uninstall the nagios from my master and slave node…I’ll try freshly once again…
    Thanks in Advance…!!!

  26. Joel says:

    I am trying to check counters for a windows host using nrpe. I have it installed and I can run the command from the terminal on the nagios server, but I am a little unsure of the syntax required inside the .cfg file for the windows server.

    Command run from terminal fine:

    ./check_nrpe -H 192.168.1.xxx -p 5666 -c CheckCounter “Counter=\\PhysicalDisk(0 C: D:)\\% Disk Time” -a warn=80 crit=90 ShowAll

    Current command set up in the host config:

    check_nrpe!checkcounter!”Counter=\\PhysicalDisk(0 C: D:)\\% Disk Time” ShowAll

    (Please note I also have added an extra argument in my commands.cfg as -a $ARG2$

    I have also followed your steps above for Linux and windows hosts fine, and have basic checks like:


    This is running, but what is the syntax for showing the stats for this in the status information field? using check_nt would be:

    check_nt!CPULOAD!-l 5,80,90

  27. kavin says:

    hi ravi,

    For me following error showing on nagios server:

    /usr/local/nagios/libexec/check_nrpe file is missing

    please help me with detailed steps

  28. kavin says:

    Hi all,

    while running the below command from nagios server i having the error.

    ./check_nrpe remote-ip

    CHECK_NRPE: Error – Could not complete SSL handshake.

    In both nagios server and remote client if i run the ./check_nrpe localhost
    It is working ,but from nagios server to remote client the command gives the above error.Please help me..thanks in advance

  29. sachin says:

    Hi Ravi

    When i Came to STEP-2 on Nagios Monitoring Server and typed this cmd “/usr/local/nagios/libexec/check_nrpe -H ”

    I get Below Mentioned Error:-

    /usr/local/nagios/libexec/check_nrpe: /lib/libssl.so.10: version `libssl.so.10′ not found (required by /usr/local/nagios/libexec/check_nrpe)

    What can i do. I did all things but still this error not Resolve.

    Please help me on priority basis.

    I will be very Thankful to you.

    Sachin gahlawat

  30. Kizmo says:

    Hi. I believe i followed everything but I encounter an error during verifying Nagios Configuration files for any errors.

    Error: Could not find any host matching ‘NAGIOS_REMOTE (config file ‘usr/local/nagios/etc/services.cfg’, starting on line 8)
    Error: Failed to expand host list ‘NAGIOS_REMOTE’ for service ‘Total Processes’ (/usr/local/nagios/etc/services.cfg:8)
    Error processing object config files!

    What do I need to do. Thanks.

  31. Kizmo says:

    hi. pls. disregard my previous post. I did find my mistake.. In hosts.cfg and services.cfg the details should be the remote host you want to monitor.

    In the hosts.cfg i got confuse at this line

    host_name tecmint ; The name we’re giving to this server

    I ended up putting the SERVER hostname.

    Thank you and God bless.

  32. subash says:

    hi Ravi, could u please help me resolving my issue when i try to see the web interface of nagios . its giving me “page can not be displayed ” i tried with both http://localhost/nagios and http://ipadress/nagios.

    I have edited the httpd.conf file as well , could u please help what are all the things to be checked for this

    • Ravi Saive says:

      Is there any errors showing on the screen while verified nagios configuration? Can you send me the screenshot of the error if possible?

  33. venu alladi says:

    Hi Ravi,

    I am new to Nagios please give me proper instruction to install the Nagios product….my question is where i install Nagios core and Nagios plugins and NRPE…i am trying to install all in one linux machine…..its ok. And give me suggestion to Nagios server?

    Thanks & Regards,
    Venu Alladi.

  34. diederik says:

    I’m at the point of installing NRPE-plugin on the Nagios Monitoring Server. When I enter the ‘make all’-command, I get an error: ”’make: *** No rule to make target ‘all’. Stop”’.
    Why is that and how to resolve this?

  35. kumaran says:

    Hi Ravi,

    we have a linux server where Nagious already installed and running fine. but recently we have added a new mount point due to the space issue.
    Now we just want to add that mount point to the nagious, What should i do now…
    Please help

    • Ravi Saive says:

      Give a name to mount point say /dev/sda1 something and add the entry to /etc/fstab and create a service in services.cfg file.

  36. vijay says:

    hi ravi sir,
    I am trying to add linux remote host to nagios server, after configured nrpe plug-in in nagios server machine, while verify the NRPE daemon is functioning properly, I am getting this error,
    connect to address port 5666: No route to host
    connect to host port 5666: No route to host
    please help me on this.

  37. Vittal Angadi says:

    Thanks Ravi,
    Nice document worth to follow …… :)

  38. rahul says:

    Hi Daniel,

    Were you able to fix your issue. I am getting the same error

  39. amrit says:


    Thanks a lot for the document, its easy to follow.
    Please help me i can run above commands and get the output in command line.

    eg : # /usr/local/nagios/libexec/check_nrpe -H localhost -c check_total_procs

    PROCS CRITICAL: 297 processes
    # /usr/local/nagios/libexec/check_nrpe -H localhost -c check_zombie_procs

    PROCS OK: 0 processes with STATE = Z

    all these commands work fine in command line.

    But when i view it in nagios


    i am not able to see any hosts.

    can you please help…..

  40. myolin says:

    hello, I have got error sentance when I type this command below

    /usr/local/nagios/libexec/check_nrpe -H “remote IP”

    connect to address “remote IP”port 5666: No route to host

    but when I type the same command from the remote host, Its seems to be ok and the output is like this

    NRPE v2.15

  41. myolin says:

    thanks Ravi Saive! the nagios monitoring interface is coming out finally.

    But I have got some alert in monitoring like below:

    FTP Monitoring NRPE: Command ‘check_ftp’ not defined

    SSH Monitoring NRPE: Command ‘check_ssh’ not defined

    PROCS CRITICAL: 567 processes

    please give me any solution


    • Ravi Saive says:

      Specify those check commands in remote host nrpe.cfg file and then in main nagios services.cfg file.

      • reb says:

        Ravi, what is the correct arguments for check_ftp and check_ssh? Everything works good except for these 2 commands. Thanks

  42. Vijayakumar says:

    Hi Ravi ,

    I went through the configuration and everything seems to be good, but when i open it in browser it prompts for credentials and i applied it and it opened but if select any of the tabs an getting the below error could u pls help me out.


    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.
    Apache/2.2.15 (Red Hat) Server at Port 80

  43. Loglix says:

    How do you monitor the print spooler service of a Linux machine on nagios ?
    Which command , service should we use ?

  44. Helli says:

    Hi, I have followed all your steps, and by running nagios
    sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
    It has the following result.
    Checking objects…
    Checked 13 services.
    Checked 2 hosts.
    Checked 1 host groups.
    Checked 0 service groups.
    Checked 1 contacts.
    Checked 1 contact groups.
    Checked 25 commands.
    Checked 5 time periods.
    Checked 0 host escalations.
    Checked 0 service escalations.
    Checking for circular paths…
    Checked 2 hosts
    Checked 0 service dependencies
    Checked 0 host dependencies
    Checked 5 timeperiods
    Checking global event handlers…
    Checking obsessive compulsive processor commands…
    Checking misc settings…

    Total Warnings: 0
    Total Errors: 0

    However, the web interface it just still have one host and no remote hosts added.

    What’s the problem? Please help

  45. venu says:

    Hi Ravi,

    please provide document for adding oracle database servers to nagios core…please give me full details about how to add databases to nagios and which plugin is used for monitoring databases…

    Thanks & Regards,
    Venu Alladi.

    • Ravi Saive says:

      Dear Venu,

      Your request was accepted, give us some to produce article for the same. till then stay tuned….

  46. Sree says:


    I have installed nagios server and added a host in it. The nagios is checking only default checks. How can I add checks like httpd,mysql, exim. Please explain the steps.


  47. Jamsy says:

    i ravi,
    when i do the test if check_nrpe plugin can communicate with the NRPE daemon on my nagios server i find error:

    CHECK_NRPE: Socket timeout after 10 seconds.

  48. Farhan says:

    Hi Ravi,

    I want to write API script for check_MK to show the stats from many applications from different servers.
    Can you please tell me how is this possible


  49. Krish says:


    if we install some new plugin like (https://labs.consol.de/nagios/check_logfiles/) do we need to install in both systems (remote host and nagios monitoring server) ?

    if yes how to execute that plugin (check_logfiles)

    like below

    define service{

    check_commad check_nrpe!check_logfiles

    define command{
    command_name check_nrpe
    command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$


  50. Sumanta says:

    Hi Ravi,

    Thanks a lot fr this smart tutorial!
    I installed both server and remote host agent successfully but the issue is I am accessing both the Monitoring server and its agent through ssh. So I am using elinks to open the url (http://ip_adress/nagios), its prompting for username and password.. after entering correct credentials it is showing me a page with title “Moved Permanently” and just below to it – “The document has moved here” . Could you please help me on this?

  51. Balu says:

    Hi Ravi,

    After completing all the step in browser its showing my host is down ..

    Please help

    Thanks in advance.

Leave a Reply

© 2012-2013 All Rights Reserved.