xinetd

In computer networkingxinetd (Extended Internet Service Daemon) is an open-source super-server daemon, runs on many Unix-like systems and manages Internet-based connectivity.

It offers a more secure alternative to the older inetd (“the Internet daemon”), which most modern Linux distributions have deprecated.

Description

xinetd listens for incoming requests over a network and launches the appropriate service for that request. Requests are made using port numbers as identifiers and xinetd usually launches another daemon to handle the request. It can be used to start services with both privileged and non-privileged port numbers.

xinetd features access control mechanisms such as TCP Wrapper ACLs, extensive logging capabilities, and the ability to make services available based on time. It can place limits on the number of servers that the system can start, and has deployable defense mechanisms to protect against port scanners, among other things.

On some implementations of Mac OS X, this daemon starts and maintains various Internet-related services, including FTP and telnet. As an extended form of inetd, it offers enhanced security. It replaced inetd in Mac OS X v10.3, and subsequently launchd replaced it in Mac OS X v10.4. However, Apple has retained inetd for compatibility purposes.

 

Source: xinetd – Wikipedia

remote NRPE help on different port – View topic • Nagios Support Forum

efine command{
command_name check_nrpe_lb
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -p $_HOSTTCPORT$
}

define host{
use linux-remote
host_name WS1
address 1.1.1.1
_tcport 5667
}

define service{
use generic-service,srv-pnp
host_name WS1
service_description Server Load
check_command check_nrpe_lb!check_load
}

Source: remote NRPE help on different port – View topic • Nagios Support Forum

How to Install & Configure Nagios 4 on Ubuntu 18.04 for Server Monitoring

Prerequisites

To follow this tutorial we assume the following:

  • You’re using a machine running Ubuntu or Debian. This tutorial is for Ubuntu 18.04, but it should work on Ubuntu 16.4, 14.04 and Debian systems.
  • You’re acting as a non-root sudo user. If you don’t have one set up, you can follow our tutorial on creating a sudo user on Ubuntu 18.04

Get a High RAM VPS at Entry-level Pricing

Starting with 2GB RAM at $6.99/month

Take your pick from our KVM VPS that offer a generous amount of RAM at an affordable price. We’ve got 5 plans for you to choose from, our smallest featuring 2GB RAM at $6.99/mo.

[Main Features] – SSD Drives
– KVM Virtualization
– 1Gbps Shared Uplink
– Location: Chicago, IL

Pick one of our KVM plans

Step 1 – Install PHP & Apache

We’ll first update our package index and install PHP and Apache.

Step 2 – Create a User and Group for Nagios

Next, create a new user for Nagios, and assign them a password:

Now we’ll create a group for Nagios, which we’ll call nagcmd and we’ll add the user we just created to this group.

We’ll also add the user to the Apache group.

Step 3 – Install Nagios Binaries

To install Nagios, we’ll first have to download the latest Nagios release. To do this, retrieve the tar.gz download link from the Github Releases page. The latest one at the time of writing is nagios-4.4.3.tar.gz.

We’ll first change our directory into /opt, download the release, and extract the archive.

After extracting the archive, navigate into the source directory and install Nagios along with some additional requirements using the make command:

Now we’ll need to copy event handlers scripts to the libexec directory. These provide multiple event triggers for the Nagios Web Interface.

Step 4 – Set Up Apache with an Authentication Gateway

We’ll now set up Apache Virtual Hosts for Nagios, and to secure our web interface, we’ll set up an authentication gateway to prevent unauthorized access.

To do this, we’ll create an Apache configuration file for Nagios:

And paste the following content into the file.

Save and close the file when you’re done.

Now we can set up the authentication gateway. We’ll use the user nagiosadmin. This is the default user that we can use to authenticate, and to use a different one would require further configuration.

Now enable the Apache configuration and restart it so the changes take effect:

Step 5 – Install Nagios Plugins

Once Nagios is installed and configured, we can download and install the latest nagios-plugins. To do this, retrieve the latest nagios-plugins release link from here. The latest version at the time of writing is nagios-plugins-2.2.1.tar.gz. After which, change the directory into /opt, download it, extract it, and navigate into it’s folder.

Now we compile and install nagios-plugins:

Step 6 – Verify & Start Nagios

After installing and configuring Nagios, we can verify if Nagios has been successfully installed, start it, and configure it to start on system boot.

Verify the installation:

Example Output

Start Nagios:

Configure to start on system boot:

Step 7 – Access the Nagios Web Interface

Now you can access the Nagios Web Interface by visiting your hostname or IP address in your browser followed by /nagios:

Source: How to Install & Configure Nagios 4 on Ubuntu 18.04 for Server Monitoring