• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 23, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Configure Nagios on Ubuntu: Part 2 – Remote Host

How VPS by How VPS
January 1, 2020
in Linux
0
0
SHARES
19
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Adding remote hosts
  2. Step 1: Installing prerequisites
  3. Step 2: Configuring NRPE
  4. Step 3: Adding the host to Nagios
  5. Want to contribute?


This article is part of a 2-part series about installing and configuring Nagios on Ubuntu 14.04.

  • Part 1: Nagios Server
  • Part 2: Remote Host

Adding remote hosts

In the previous part of this tutorial, we configured a Nagios server. Now that Nagios is installed and running, it’s time to configure a remote host that will be monitored by Nagios. SSH into any remote host that you want to be monitored.

Step 1: Installing prerequisites

To monitor hosts, we need to add them to Nagios. By default, Nagios only monitors localhost (the server it’s running on). We’re going to add hosts that are part of our network to gain even more control. You will need to use the following instructions on all hosts that you want to monitor.

First, install nagios-plugins and nagios-nrpe-server:

apt-get install nagios-plugins nagios-nrpe-server

Step 2: Configuring NRPE

Next, open the /etc/nagios/nrpe.cfg file. Replace the value of allowed_hosts with 127.0.0.1,0.0.0.0 replacing the second IP with the IP address of the Nagios server.

We will now open the file /etc/nagios/nrpe.cfg and replace a couple of values.

  • Replace the value of server_address to the private IP address of the host.
  • Set allowed_hosts to the private IP address of your Nagios server.
  • Execute df -h /, copy the output, and put that as the value of command. It indicates your root file system.

Save the file when you are finished.

Now restart NRPE:

service nagios-nrpe-server restart

Step 3: Adding the host to Nagios

Now that we’ve configured the host we’re going to monitor, we need to switch back to our Nagios server and add the host to it. Open the following file with your favorite editor:

/usr/local/nagios/etc/servers/host.cfg

Use the following block as a template. Replace host with an appropriate name for your remote host, and update the host_name, alias, and address values accordingly.

define host {
        use                             linux-server
        host_name                       yourhost
        alias                           My first Apache server
        address                         1.2.3.4
        max_check_attempts              5
        check_period                    24x7
        notification_interval           30
        notification_period             24x7
}

This will allow you to simply monitor whether the server is up or down. Now reload Nagios:

service nagios reload

Congratulations, you have completed a very basic Nagios setup for monitoring your servers. Now you can log into the Nagios web panel to view the status of your servers.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Installing and Configuring Supervisor on Ubuntu 16.04

Next Post

Installing Rust on Ubuntu 14.04

Next Post

Installing Rust on Ubuntu 14.04

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet