Adagios is a web-based interface for monitoring Nagios, which is a powerful monitoring system. In this tutorial, we will guide you through the process of installing Adagios on EndeavourOS.
Before starting this tutorial, you will need:
First, update your system and install the required packages for Adagios:
sudo pacman -Syu
sudo pacman -S git sudo python-pip lighttpd fcgi php-cgi
Next, we will install Nagios and NRPE. Nagios is a monitoring system, and NRPE is a plugin for monitoring local resources on remote hosts. To install these packages, run:
sudo pacman -S nagios nagios-plugins nrpe
During the installation process, you will be prompted to specify a password for the Nagios user. Make sure to remember this password, as you will need it later.
Now, let's install Adagios. Start by cloning the Adagios repository from GitHub:
sudo git clone https://github.com/opinkerfi/adagios.git /srv/http/adagios
Next, navigate to the Adagios directory and install the required dependencies:
cd /srv/http/adagios
sudo pip install -r requirements.txt
In this step, we will configure Nagios and Adagios to work together. Start by editing the Nagios configuration file:
sudo nano /etc/nagios/nagios.cfg
Find the cfg_file
directive and add the following line:
cfg_file=/etc/nagios/adagios.cfg
Save and close the file. Next, create a new configuration file for Adagios:
sudo nano /etc/nagios/adagios.cfg
Add the following lines to the file:
cfg_file=/etc/nagios/conf.d
cfg_dir=/etc/nagios/conf.d
Save and close the file.
In this step, we will configure the web server and PHP to work with Adagios. First, create a new PHP configuration file:
sudo nano /etc/php/php-fpm.d/adagios.conf
Add the following lines to the file:
[adagios]
listen = /run/php/adagios.sock
listen.owner = http
listen.group = http
listen.mode = 0660
user = http
group = http
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/php-fpm/adagios.error.log
Save and close the file. Next, edit the Lighttpd configuration file:
sudo nano /etc/lighttpd/lighttpd.conf
Add the following lines to the file:
$HTTP["host"] == "localhost" {
server.document-root = "/srv/http/adagios"
server.error-handler-404 = "/adagios"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
fastcgi.server = ( ".php" =>
( "php-fpm:unix:/run/php/adagios.sock" =>
(
"bin-path" => "/usr/bin/php-cgi",
"max-procs" => 1,
"allow-x-send-file" => "enable",
"broken-scriptfilename" => "enable"
)
)
)
}
Save and close the file.
In this step, we will start the Nagios, NRPE, Lighttpd, and PHP services:
sudo systemctl start nagios
sudo systemctl start nrpe
sudo systemctl start lighttpd
sudo systemctl start php-fpm
You can check the status of each service by running:
sudo systemctl status nagios
sudo systemctl status nrpe
sudo systemctl status lighttpd
sudo systemctl status php-fpm
Open your web browser and navigate to http://localhost/adagios
. You should see the Adagios login screen. Use the default credentials (admin
/admin
) to log in.
Congratulations! You have successfully installed Adagios on EndeavourOS. With Adagios, you now have a web-based interface for monitoring your Nagios environment.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!