Adagios is an open-source web-based Nagios GUI that allows you to monitor and manage your Nagios system from a single interface. In this tutorial, we will go through the steps required to install Adagios on Arch Linux.
Before we proceed with Adagios installation, ensure that your Arch Linux is up-to-date by running the command:
sudo pacman -Syu
Adagios requires several dependencies to work correctly. Install them by running the command:
sudo pacman -S apache php php-apache php-gd php-mcrypt \
php-intl php-xml mariadb mariadb-clients \
perl-module-install nagios-plugins
Adagios is not available in the official Arch Linux repositories. Therefore, we need to install it manually from the Adagios website. Follow the steps below to install Adagios.
Download the Adagios tarball from the Adagios website by running the command:
wget https://github.com/opinkerfi/adagios/releases/download/v1.6.3/adagios-1.6.3.tar.gz
Extract the downloaded file:
tar -zxvf adagios-1.6.3.tar.gz
Move the extracted directory to the Apache document root directory:
sudo mv adagios-1.6.3 /srv/http/
Change the ownership of the Adagios directory to the Apache user:
sudo chown http:http /srv/http/adagios-1.6.3
Adagios requires a MySQL database to store its data. Therefore, we need to create a new MySQL database and user.
Log in to the MySQL shell by running the command:
mariadb -u root -p
Create a new database for Adagios by executing the following command:
CREATE DATABASE adagios;
Create a new user and grant all privileges for the Adagios database:
CREATE USER 'adagiosuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON adagios.* TO 'adagiosuser'@'localhost';
FLUSH PRIVILEGES;
Replace password
with the desired password for the Adagios user.
Exit the MySQL shell by running the command:
exit;
Copy the default Adagios configuration file to the Adagios directory:
sudo cp /srv/http/adagios-1.6.3/etc/adagios.conf.example /srv/http/adagios-1.6.3/etc/adagios.conf
Edit the Adagios configuration file using your favorite text editor:
sudo nano /srv/http/adagios-1.6.3/etc/adagios.conf
Update the following lines with your MySQL credentials:
db_name = adagios
db_user = adagiosuser
db_password = password
Replace password
with the password you set for the MySQL adagiosuser
.
Change the ownership of the Adagios configuration file:
sudo chown http:http /srv/http/adagios-1.6.3/etc/adagios.conf
Enable the PHP module for Apache:
sudo nano /etc/httpd/conf/httpd.conf
Uncomment the following line:
LoadModule php7_module modules/libphp7.so
Enable the Apache rewrite module:
sudo nano /etc/httpd/conf/httpd.conf
Uncomment the following line:
LoadModule rewrite_module modules/mod_rewrite.so
Add a VirtualHost configuration for Adagios:
sudo nano /etc/httpd/conf/extra/httpd-vhosts.conf
Add the following configuration:
<VirtualHost *:80>
ServerName adagios.local
DocumentRoot "/srv/http/adagios-1.6.3"
<Directory "/srv/http/adagios-1.6.3/">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "/var/log/httpd/adagios-error.log"
CustomLog "/var/log/httpd/adagios-access.log" combined
</VirtualHost>
Restart the Apache service to apply the changes:
sudo systemctl restart httpd
Open your web browser and enter the URL http://adagios.local
. You should see the Adagios login page.
Log in with the default username and password:
Username: nagiosadmin
Password: nagios
After logging in for the first time, you will be prompted to change the password.
Congratulations, you have successfully installed Adagios on Arch Linux! You can now start monitoring and managing your Nagios system using the Adagios web interface.
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!