Felhasználói eszközök

Eszközök a webhelyen


nagios_install

Különbségek

A kiválasztott változat és az aktuális verzió közötti különbségek a következők.

Összehasonlító nézet linkje

Előző változat mindkét oldalonElőző változat
nagios_install [2025/05/12 20:45] – eltávolítva - külső szerkesztés (Ismeretlen dátum) 127.0.0.1nagios_install [2025/05/12 20:45] (aktuális) – ↷ Page name changed from nagios to nagios_install admin
Sor 1: Sor 1:
 +===== How to Install Nagios Monitoring Tool on Debian 12 =====
 +\\
 +==== Installation from Debian repository ====
 +
 +<code>$ sudo apt install nagios4 nagios4-common monitoring-plugins-contrib nagios-nrpe-plugin</code>
 +
 +<code>
 +$ sudo systemctl enable nagios4
 +$ sudo systemctl is-enabled nagios4
 +$ sudo systemctl status nagios4
 +</code>
 +
 +<code>
 +$ sudo systemctl is-enabled apache2
 +$ sudo systemctl status apache2
 +</code>
 +
 +Connect to nagios at <nowiki>http://nagios_host_ip_address/nagios4/</nowiki>
 +
 +==== Enable Nagios Authentication ====
 +
 +In file /etc/nagios4/cgi.conf change value of use_authentication to 1.
 +
 +Restart nagios4 service. From now on, only user 'nagiosadmin' will be allowed to access your. You can still access the Nagios dashboard, but the reporting and monitoring page will be denied.
 +
 +==== Setting up Apache Basic Auth for Nagios ====
 +
 +To enable the required modules, cgi, cgid, and rewrite, run command
 +
 +<code>sudo a2enmod cgi cgid rewrite</code>
 +
 +Open /etc/apache2/conf-available/nagios4-cgi.conf, find the section of <DirectoryMatch></DirectoryMatch> and replace the default configuration with the following. With this you will enable the Apache basic_auth module Nagios web contents.
 +
 +<code>
 +<DirectoryMatch (/usr/share/nagios4/htdocs|/usr/lib/cgi-bin/nagios4|/etc/nagios4/stylesheets)>
 + Options FollowSymLinks
 + DirectoryIndex index.php index.html
 + AllowOverride AuthConfig
 +
 + Options None
 + AllowOverride None
 + Order allow,deny
 + Allow from all
 + AuthName "Nagios Core"
 + AuthType Basic
 + AuthUserFile /etc/nagios4/htdigest.users
 + Require valid-user
 + Require all denied
 +
 +</DirectoryMatch>
 +</code>
 +To create a new user nagiosadmin for Apache basic auth
 +
 +<code>sudo htpasswd /etc/nagios4/htdigest.users nagiosadmin</code>
 +
 +Input your password two times. Restart the apache2 service.
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki