Bobcares

Configure Nagios NRPE Client on Ubuntu 24.04 with 6 Steps

by | Sep 4, 2024

How to configure Nagios NRPE Client on Ubuntu 24.04? Read the article to learn more about the steps. Bobcares, as a part of our Server Management Service offers solutions to every query that comes our way.

Overview
  1. How to Configure Nagios NRPE Client on Ubuntu 24.04?
  2. What is Ubuntu 24.04?
  3. What is NRPE?
  4. Steps to Configure NRPE on Ubuntu 24.04
  5. Additional Tips We must Know
  6. Benefits of Nagios NRPE Client on Ubuntu 24.04
  7. Conclusion

How to Configure Nagios NRPE Client on Ubuntu 24.04?

What is Ubuntu 24.04?

Ubuntu 24.04 LTS contains several features that will make it seem quite at home in the company. Netplan is the default tool for configuring networking on the desktop (just as it is for servers), allowing administrators to configure their Ubuntu estate regardless of platform.

GNOME 46 introduces a variety of speed and usability improvements, including enhanced file manager search and performance, expanded notifications, and reduced settings options for easier access. Our installer now includes ZFS encryption and autoinstall support, which improves provisioning choices. This, together with the new App Center and a dedicated app for firmware upgrades, delivers a more comprehensive experience, as well as faster performance.

Under its surface, Ubuntu 24.04 LTS includes additional security improvements for those who build and distribute software in the Ubuntu ecosystem. Ubuntu 24.04 LTS gives us more alternatives for securing apps and data, such as a more robust distribution of Personal Package Archives (PPAs), better AppArmor constraints on unprivileged user namespaces, and an improved recommended pocket for granular package installation.

What is NRPE?

NRPE (Nagios Remote Plugin Executor) is a client-side daemon that enables Nagios servers to run plugins on remote systems. This is critical to monitoring system resources, services, and applications on remote hosts. Here’s a quick description of how NRPE operates:

Nagios Server: The Nagios server initiates a check by sending a command to the remote host’s NRPE daemon.

NRPE Daemon: The NRPE daemon on the remote system receives the command, runs the given plugin locally, and reports the results to the Nagios server.

Monitoring Plugins: Plugins are scripts or executables that run specific checks on the remote host (such as CPU use and storage space).

Secure Communication: NRPE employs encryption and authentication to enable secure communication between the Nagios server and the remote host.

Configure Nagios NRPE Client on Ubuntu 24.04

Steps to Configure NRPE on Ubuntu 24.04

Prerequisites:

1. Properly Working Ubuntu 24.04 System

2. Installed and Configured Nagios Server

3. Root or sudo Rights

Step 1

Initially, we must ensure the system is up to date. So, open the terminal and run the following command:

sudo apt update
sudo apt upgrade
Step 2

To install the NRPE client and Nagios plugins, run:

sudo apt install nagios-nrpe-server nagios-plugins
Step 3

1. Change the NRPE configuration file to accept connections from the Nagios server. Open the file with a text editor.

sudo nano /etc/nagios/nrpe.cfg

2. Find the line beginning with allowed_hosts and enter the Nagios server IP address. It should appear like this:

allowed_hosts=127.0.0.1,

3. Save and close the file (CTRL + X, Y, Enter).

Step 4

Start the NRPE service and set it to start at startup:

sudo systemctl start nagios-nrpe-server
sudo systemctl enable nagios-nrpe-server
Step 5

Check if NRPE is working properly by issuing the following command from the Nagios server. Replace with the IP address of the Ubuntu server.

/usr/lib/nagios/plugins/check_nrpe -H
Step 6

Now, we need to add Ubuntu server as a host in Nagios for monitoring:

1. On the Nagios server, create a configuration file for the new host. For example:

sudo nano /usr/local/nagios/etc/servers/ubuntu24.cfg

2. Add the following configuration to the file. Replace and with appropriate values.

define host {
use linux-server
host_name 
alias Ubuntu 24.04 Server
address 
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}

3. To monitor services like disk usage, CPU load, and memory usage, add the following configuration in the same file:

define service {
use generic-service
host_name 
service_description Check Disk
check_command check_nrpe!check_disk
}

define service {
use generic-service
host_name 
service_description Check Load
check_command check_nrpe!check_load
}

define service {
use generic-service
host_name 
service_description Check Memory
check_command check_nrpe!check_mem
}

4. Restart the Nagios service to apply the changes:

sudo systemctl restart nagios
Additional Tips We must Know
  • Custom plugins: Create plugins for specific needs.
  • Security: Limit NRPE access to trusted hosts and use strong passwords.
  • Performance: Optimize NRPE for large setups.
  • Error handling: Ensure proper error handling in configurations.

Benefits of Nagios NRPE Client on Ubuntu 24.04

1. It enables monitoring of local resources (CPU, disk, memory) on Ubuntu 24.04 from a central Nagios server.

2. We can also create and run custom plugins for monitoring specific applications or services.

3. We get instant notifications for any issues, helping us respond quickly to system problems.

4. The setup monitor multiple Ubuntu servers, making it suitable for both small and large environments.

5. It also restricts access to monitoring data by allowing only specified hosts to communicate with the NRPE daemon.

6. Simplifies the process of monitoring numerous system parameters, minimizing the need for manual inspection.

7. The setup integrates seamlessly with current Nagios configurations, improving the infrastructure’s overall monitoring capabilities.

[Want to learn more? Click here to reach us.]

Conclusion

In conclusion, configuring the Nagios NRPE client on Ubuntu 24.04 is essential for enabling remote monitoring of system resources, services, and applications. By following the outlined steps from our Experts, you can securely set up NRPE, allowing the Nagios server to efficiently monitor and manage the Ubuntu system’s performance.

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF