Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Install Nagios Core on a dedicated monitoring host, add the official plugins, validate the configuration, and then add local and remote checks one service at a time. For a new mixed Linux/UNIX or cross-platform deployment, use NCPA; keep NRPE for existing or older fleets, and use check_by_ssh when SSH-based execution is a better fit.

What you will build

This guide uses one server as the Nagios monitoring host and adds checks for that host before monitoring another machine. It covers the two practical installation routes:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Distribution packages: the quickest path on Ubuntu or Debian, with paths and service names supplied by the distribution.
  • Source installation: the version-controlled path documented for Nagios Core 4.5.10 and Nagios Plugins 2.4.11.

Nagios Core schedules checks and evaluates their results. Plugins do the actual tests: they read CPU load, inspect filesystems, connect to network services, or query an agent on another server. A service changes state when its plugin output crosses a warning or critical threshold, and the notification system then applies contacts, time periods, and escalation rules.

The Nagios Core documentation describes its quickstarts as instructions to install from source and have Nagios monitoring the local machine “inside of 20 minutes.” Treat that as a setup target rather than a guarantee: package availability, firewall policy, DNS, and web-server configuration can add work.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Choose the installation route

Route Best fit What to account for
Ubuntu or Debian packages A first installation or a host managed with normal operating-system updates Package names, configuration directories, web-server integration, and service units differ by release.
Source A fixed Core/plugin version, a custom prefix, or a distribution without a suitable package You must install build prerequisites, create the service integration, and record the installation paths yourself.

Do not mix instructions from the two routes without checking paths. A package installation commonly uses an /etc/nagios4 configuration tree and a nagios4 service, while a source installation commonly uses a dedicated prefix such as /usr/local/nagios and a service named nagios.

Prepare the monitoring host

Set the host’s identity and time

Give the monitoring server a stable hostname and address. Use the same names in host definitions, DNS, certificates, firewall rules, and notification messages. Keep its clock synchronized; check scheduling and time-period rules become confusing when the system time is wrong.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan the network before installing

  • Allow the administrator’s network to reach the Nagios web interface.
  • Allow the monitoring host to reach remote agents or services on the ports they require.
  • If you use NRPE, allow the NRPE port only from the monitoring host’s address.
  • Decide whether remote checks are polled by Nagios or submitted by the monitored host. The latter is the role of passive-result mechanisms such as NSCA or NRDP.

Record your layout

Before adding objects, write down the operating-system release, Nagios Core and plugin versions, configuration directories, service names, agent choice, firewall rules, and the account that runs the daemon. This record is valuable during upgrades and incident recovery.

Install Nagios 4 from Ubuntu or Debian packages

The Ubuntu package guide uses a two-server example: server01 runs Nagios and server02 runs NRPE. Exact package names and prompts vary by release, so confirm the names offered by your distribution rather than copying a package name that belongs to another release.

1. Install Core and the plugins

  1. Refresh the package index:
sudo apt update
  1. Install the Nagios 4 package and the distribution’s Nagios plugin packages. On Ubuntu releases that provide the standard package set, this is commonly:
sudo apt install nagios4 nagios-plugins-contrib

If your release splits the core, common files, or plugin packages differently, install the corresponding Nagios 4 Core and official-plugin packages shown by apt search nagios. The important requirement is that Core and the plugins are installed together; a missing plugin produces an “Unable to find command” or “plugin not found” result later.

2. Complete the web-interface setup

The package may ask for the web administrator account and may configure Apache automatically. Set a strong password for the initial Nagios web user, then confirm that the web server is enabled and running. If your distribution does not configure the web server automatically, follow that release’s Nagios package instructions rather than copying an Apache layout from a source installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Find the package configuration files

Typical package layouts place the main file at /etc/nagios4/nagios.cfg, object definitions below /etc/nagios4/objects, and plugins below /usr/lib/nagios/plugins. Verify the actual locations with the package manager and with the cfg_file and cfg_dir entries in nagios.cfg.

4. Verify before starting or restarting

sudo nagios4 -v /etc/nagios4/nagios.cfg

Use the verifier that belongs to your package. It must finish without configuration errors before you start or reload the daemon. Warnings can be acceptable only when you understand them; an error means Nagios cannot reliably load the object database.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

5. Enable and start the service

sudo systemctl enable --now nagios4

Open the Nagios web interface, sign in, and confirm that the local host is being checked. If your package uses a different service unit, use the name reported by systemctl list-unit-files | grep -i nagios.

Install Nagios Core and plugins from source

The documented source path covers Nagios Core 4.5.10 with Nagios Plugins 2.4.11. OpenSSL has been a required prerequisite since Core 4.4.7, so install the OpenSSL development files as well as your operating system’s compiler, make tools, web-server development files, and other prerequisites listed for your target operating system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Keep Core and plugin versions together

Download the Core 4.5.10 source and Nagios Plugins 2.4.11 source from the official Nagios distribution channels. Keep the archives and checksums in your administrator’s software record. Build the plugins as well as Core; Core alone has no checks for CPU, disks, HTTP, or other services.

2. Configure and build Core

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make all
sudo make install
sudo make install-init
sudo make install-config
sudo make install-commandmode

The exact targets and web-interface installation target can differ by release and operating system. Read the 4.5.10 installation output and make sure the service account, command socket, configuration prefix, and init/systemd integration all point to the same installation.

3. Build and install the plugins

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
sudo make install

Set the plugin directory in nagios.cfg or in the relevant command definitions. A source installation often places plugins under /usr/local/nagios/libexec; do not assume that path if your configure prefix is different.

4. Install and protect the web interface

Install the web configuration supplied with your Core release, create an authenticated web user, and restrict access to trusted administrator networks. The web interface exposes host and service state; it should not be left open to the public internet.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Verify and enable the daemon

sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
sudo systemctl enable --now nagios

Replace both paths with the prefix reported by your build. Run the verifier after every object-file change and before every reload or restart.

Understand the Nagios configuration model

nagios.cfg controls the daemon

The main configuration file contains daemon directives: the user and group, state and log locations, command and event settings, resource files, and the object files to load. It does not define a particular server’s address or a service’s check command.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Object files define what is monitored

Object definitions describe:

  • Hosts: servers, routers, virtual machines, or other endpoints with an address and availability check.
  • Hostgroups: reusable groups such as web servers or database servers.
  • Services: individual checks attached to hosts.
  • Commands: plugin invocations and their argument format.
  • Contacts, contact groups, time periods, and escalations: who receives alerts, when alerts are sent, and how they progress.
  • Templates: shared defaults that prevent every host or service from repeating the same notification and check settings.

Keep a dedicated file per host or service group. A layout such as objects/hosts/server01.cfg, objects/services/linux.cfg, and objects/contacts/on-call.cfg makes reviews and rollbacks safer than editing one large file.

Use explicit thresholds

Most plugins return OK, WARNING, CRITICAL, or UNKNOWN. A warning threshold is an early indication; a critical threshold is the condition that needs immediate action. For example, -w 20% -c 10% for disk usage means the plugin should warn when the remaining-space condition reaches the warning boundary and report critical at the critical boundary. Always read the individual plugin’s threshold semantics because some checks measure used capacity, while others measure free capacity or response time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add local health checks first

The official Linux/UNIX monitoring documentation identifies CPU load, memory, disk usage, logged-in users, and running processes as private-resource checks. Add one service at a time, verify its output in the web interface, and only then apply the pattern to more hosts.

Example local services

define service {
    use                     generic-service
    host_name               server01
    service_description     CPU load
    check_command           check_local_load!5,4,3!10,8,6
}

define service {
    use                     generic-service
    host_name               server01
    service_description     Root filesystem
    check_command           check_local_disk!20%!10%!/
}

define service {
    use                     generic-service
    host_name               server01
    service_description     Logged-in users
    check_command           check_local_users!5!10
}

define service {
    use                     generic-service
    host_name               server01
    service_description     Running processes
    check_command           check_local_procs!250!400
}

The command names and argument order must match the command definitions shipped with your distribution. If a package uses different aliases, inspect its command object and adjust the service rather than creating a second command with ambiguous arguments.

Check public services

Public checks test what a user or another system can reach. Common examples include:

  • HTTP: request a web endpoint and alert when it cannot be reached or returns an unacceptable response.
  • FTP: test that the FTP service accepts a connection.
  • SSH: test that the SSH port and protocol respond.
  • SMTP: test that the mail service accepts a connection and responds correctly.

These checks do not prove that an application is healthy internally. Pair a public check with a private-resource or application-specific check when an outage could occur behind a reachable port.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a remote Linux monitoring method

Method How it works When to choose it Main design concern
NCPA A modern cross-platform agent with an API, web GUI, active and passive capabilities, and discovery features New deployments, mixed operating systems, or fleets that benefit from a current agent model Restrict the agent interface and use authentication and firewall rules appropriate to your environment.
NRPE Nagios executes a narrowly defined plugin command on the remote host through the NRPE service Legacy operating systems or an existing NRPE fleet Use an explicit source-IP allowlist and avoid exposing the service to arbitrary clients.
check_by_ssh Nagios runs a remote plugin over SSH without installing NRPE Small deployments or environments where SSH is already approved Design key storage, command restrictions, host-key verification, and remote permissions deliberately.
NSCA or NRDP The monitored host submits passive check results to Nagios Systems that initiate delivery or situations where polling is undesirable Authenticate and restrict result submission so an untrusted host cannot forge state.

For a new cross-platform deployment, NCPA is the preferred starting point. NRPE remains a practical compatibility choice, not a requirement for every new installation.

Monitor a second Linux server with NRPE

The following example follows the documented two-server arrangement: server01 is the Nagios host at 172.10.100.1, and server02 is the monitored host at 172.10.100.2.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

1. Install the NRPE service on the target

On server02, install the NRPE service and the plugins required by the commands you plan to expose. The package name varies by distribution; on Ubuntu it is commonly the nagios-nrpe-server package plus the relevant plugin package.

2. Allow only the monitoring host

In the NRPE configuration on server02, set:

allowed_hosts=172.10.100.1

Use the real monitoring address in your environment. If the target has multiple interfaces, do not replace an explicit allowlist with a broad subnet unless that is an intentional policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Define a narrow disk command

Add this command to the NRPE command configuration on server02:

command[check_all_disks]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -e

The command checks disks with warning and critical thresholds and excludes the filesystem types selected by the plugin’s -e behavior. Confirm the plugin path on the target; source installations often use a different directory.

4. Restart the agent

sudo systemctl restart nagios-nrpe-server

Restart the agent after changing its allowlist or command definitions. Check the service status and local logs on server02 if the port does not accept connections.

5. Add the service on the Nagios host

On server01, define the remote service using the NRPE command wrapper:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
define service {
    use                     generic-service
    host_name               server02
    service_description     All disks via NRPE
    check_command           check_nrpe_1arg!check_all_disks!172.10.100.2
}

The command definition must exist on server01 and must pass the NRPE command name and target address in the order expected by your package’s command object.

6. Validate and restart Nagios

sudo nagios4 -v /etc/nagios4/nagios.cfg
sudo systemctl restart nagios4

Again, substitute the verifier, configuration path, and service name used by your installation. The Ubuntu example restarts both sides: nagios-nrpe-server on the target and nagios4 on the monitoring server.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Secure agents and remote execution

  • Use an explicit NRPE allowed_hosts list and enforce the same source restriction with the host firewall.
  • Expose agent ports only on the monitoring network; do not publish them on an internet-facing interface.
  • Define only the plugin commands Nagios needs. Avoid arbitrary command arguments unless your design genuinely requires them.
  • Run agents with the least privilege that still permits their checks. A disk check may need access to filesystem statistics, but it should not become a general-purpose root command runner.
  • For SSH checks, protect private keys, verify host keys, and restrict the remote account to the intended plugin commands.
  • For passive submissions, authenticate senders and reject results from untrusted hosts.

These controls follow from the documented allowlist and remote-execution designs; there is no single hardening profile that fits every network, operating system, or compliance regime.

Validate results in the web interface

Confirm the normal state

After the first local and remote checks run, open the host and service views. Confirm that plugin output is readable, the expected address is being checked, and the service is associated with the correct host and contact group.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test state transitions deliberately

  1. Start with a known-good condition and record the OK output.
  2. Temporarily cross a warning threshold, such as lowering available disk space in a safe test environment, and confirm a WARNING state.
  3. Cross the critical threshold or stop a disposable test service and confirm CRITICAL.
  4. Restore the service or threshold condition and verify recovery.

Do not test alerts by stopping a production service. Use a maintenance window or an isolated host, and document the expected notification, acknowledgement, recovery, and escalation behavior.

Notifications and production readiness

A green dashboard is not a complete monitoring system. Before calling the deployment production-ready, check:

  • Every important host and service has an owner and a contact route.
  • Notification contacts, escalation rules, and time periods match the team’s on-call schedule.
  • Host-down and service-failure notifications are distinct where the response differs.
  • Checks have thresholds that represent an actionable condition rather than normal variation.
  • Dependencies prevent a single failed network path from generating a misleading flood of alerts.
  • Configuration changes are reviewed and the verifier is run before each reload or restart.
  • The Core service is enabled and running after a reboot.

Troubleshoot the common failures

“Configuration error” during verification

Read the first error, not only the final summary. Common causes are a misspelled object attribute, a duplicate host or service name, an object file that was not included by nagios.cfg, or a command that does not exist in the configured plugin directory. Fix the first error, run the verifier again, and continue until errors are gone.

“Plugin not found” or “Unable to find command”

Compare the command definition’s path with the actual plugin directory and executable permissions. Package and source layouts differ, and a command copied from one host can point to a path that does not exist on another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

NRPE reports a timeout or connection refused

Check that the NRPE service is running on the target, that its firewall permits the monitoring host’s address, and that allowed_hosts contains the correct source address. Then confirm that the Nagios host is using the target’s reachable address and the expected NRPE port.

NRPE rejects the command

Ensure the command name in check_nrpe_1arg exactly matches the name inside command[...]. Restart NRPE after editing its command file, and test the plugin directly on the target to separate a plugin problem from an NRPE transport problem.

The web page is empty or stale

Check that the daemon is running, that the web server points to the same status files configured in nagios.cfg, and that you are viewing the intended monitoring instance. A successful configuration verification does not prove that the service restarted or that the web server can read the current status data.

Maintain the installation

Record Core and plugin versions, operating-system releases, agent versions, configuration-file locations, firewall rules, and custom commands. When upgrading, validate the configuration with the new binaries before restarting, review changes to plugin threshold semantics, and re-test one local service and one remote service. Keep source archives or package versions available for a controlled rollback, and update both ends of an agent-based check when compatibility requires it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.