Nagios 1 to 4 - How to install Nagios in Ubuntu server 22 04 (+ basic configuration)

Описание к видео Nagios 1 to 4 - How to install Nagios in Ubuntu server 22 04 (+ basic configuration)

This video explains to you how to install Nagios from Ubuntu repository. I explain too how to configure basically Nagios and how to add a new host to monitor it.

On my other Nagios videos, I will explain how to monitor Linux services, for example CPU usage, memory usage and disk space. I explain too how to monitor a Windows machine and finally how to configure email alert. My Nagios playlist:
   • Nagios 1 to 4 - How to install Nagios...  

Version francaise, French version:
   • Nagios 1 de 4 - Installer un serveur ...  

-------

If you would like to pay me a coffee to support my work.
https://ko-fi.com/benlinux

-------

00:00 Intro
00:59 Installation from Ubuntu repository
05:45 A first test of the nagios web interface.
07:04 After installation ajustements
13:04 Restart the services.
14:53 Add a host to monitor.
23:26 Nagios configuration verification tool
26:29 Take a look of the new configuration in the Nagios web interface
28:05 My future nagios videos will explain...

-------------
To set up a static ip address on Ubuntu:
   • How to set up an ip static address on...  

--------------
Here all commands I used in this video:

sudo apt install nagios4


http://ip_address/nagios4/


sudo a2enmod rewrite cgi


sudo cp /etc/apache2/conf-enabled/nagios4-cgi.conf{,.backup}


ls -l /etc/apache2/conf-enabled/


sudo nano /etc/apache2/conf-available/nagios4-cgi.conf


#### An excerpt from my config file: ####
Options FollowSymLinks
DirectoryIndex index.php index.html
AllowOverride AuthConfig
AuthDigestDomain "Nagios4"
AuthDigestProvider file
AuthUserFile "/etc/nagios4/htdigest.users"
AuthGroupFile "/etc/group"
AuthName "Restricted Nagios4 Access"
AuthType Digest
#Require all granted
Require valid-user


sudo nano /etc/nagios4/cgi.cfg


sudo systemctl restart apache2


sudo systemctl restart nagios4


sudo systemctl enable nagios4


ls /etc/nagios4/


ls /etc/nagios4/objects


sudo nano /etc/nagios4/objects/linuxhosts.cfg



#### An excerpt from my config file: ####
define host {
use linux-server ; Name of host template to use
host_name ubuntu-machine
alias ubuntu-machine
address 10.0.0.34
hostgroups ubuntu-hosts
}


define hostgroup {
hostgroup_name ubuntu-hosts ; The name of the hostgroup
alias Ubuntu Linux host ; Long name of the group
}




sudo nano /etc/nagios4/objects/linuxservices.cfg

sudo nano /etc/nagios4/nagios.cfg

#### An excerpt from my config file ####
cfg_file=/etc/nagios4/objects/linuxhosts.cfg
cfg_file=/etc/nagios4/objects/linuxservices.cfg


sudo nagios4 -v /etc/nagios4/nagios.cfg

sudo systemctl reload nagios4

Комментарии

Информация по комментариям в разработке