Ubuntu 26.04

Nagios : Install2026/06/10

 

Install Nagios which is an enterprise open source monitoring system.

[1]

Install and start Apache httpd, refer to here.

[2]

Configure SSL/TLS setting, refer to here. (not required but recommended)

[3]

Install PHP, refer to here.

[4] Install Nagios.
root@dlp:~#
apt -y install nagios4
[5] Configure Nagios.
root@dlp:~#
vi /etc/nagios4/cgi.cfg
# line 76 : change
use_authentication=1

root@dlp:~#
vi /etc/apache2/conf-enabled/nagios4-cgi.conf
    # line 35 : change access permissions if you need
    Require ip  ::1/128 fc00::/7 fe80::/10 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12 192.168.0.0/16
    # change
    <Files "*.cgi">
        AuthDigestDomain "Nagios4"
        AuthDigestProvider file
        AuthUserFile    "/etc/nagios4/htdigest.users"
        AuthGroupFile   "/etc/group"
        AuthName        "Nagios4"
        AuthType        Digest
        # comment out
        #Require all    granted
        # uncomment
        Require valid-user
    </Files>

root@dlp:~#
a2enmod cgid

Enabling module cgid.
To activate the new configuration, you need to run:
  systemctl restart apache2

root@dlp:~#
systemctl restart nagios4 apache2

root@dlp:~#
htdigest /etc/nagios4/htdigest.users "Nagios4" nagiosadmin

Adding user nagiosadmin in realm Nagios4
New password:     # set password for Nagios admin user
Re-type new password:
[6] Access to the [(Nagios server's hostname or IP address)/nagios4/] from a client computer which is in the network allowed by Nagios. Then, Nagios start page is displayed.
[7] You can view monitoring data by clicking on [Tactical Overview] etc. in the left menu, but you will need to authenticate as a Nagios administrative user.
Matched Content