filmov
tv
Nagios Server/Client setup & configuration (On Ubuntu) - Part 1/Server
![preview_player](https://i.ytimg.com/vi/VNm6J-U3cuU/maxresdefault.jpg)
Показать описание
We'll do a Nagios setup by installing the nagios server and an nrpe client.
Nagios is a free tool you can use to monitor nodes in a home network or even a on a small office network.
You can monitor availability and health of almost anything connected to the network through a single web interface.
It's possible to get nagios server up and running on a Raspberry Pi. It can be a low cost/low power monitoring node in your network.
We'll do the client setup and config in the next video and also how to setup email and text alerts in a future video.
Commands below are to install Nagios server on Ubuntu (16.04/18.04)
The steps would be same for any Debian based Linux OS (Linux Mint, Raspbian)
sudo su
apt update
apt upgrade
echo we need to install Apache, PHP, few dependancies and some tools to compile programs like gcc.
apt install build-essential libgd2-dev openssl libssl-dev apache2 php libapache2-mod-php snmp libnet-snmp-perl gettext libmcrypt-dev libssl-dev unzip
echo then we create a user for nagios to run
useradd nagios
echo we add that user to apache user group
usermod -a -G nagios www-data
echo we get the nagios installtion componenets diretly from their github project page.
echo we download nagios - check the laatest version and chnage the url below accordingly
cd nagios-4.4.3
echo we configure the project to match our system
./configure --with-httpd-conf=/etc/apache2/sites-enabled
echo then we compile and install nagios componenets in these next few commands
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
echo we enable the nagios to run at startup
systemctl enable nagios
echo we enable rewrite and cgi modules for apache
a2enmod rewrite cgi
echo we add a username and password for nagios web interface
echo we restart the apache web interface
systemctl restart apache2
echo Next we install the nagios plugin
cd ..
cd nagios-plugins-2.2.1
echo next we configure the makefiles
./configure
make install
echo we start nagios
systemctl start nagios
echo Goto Web Page
cd ..
echo we download nrpe from the nagios github project page
cd nrpe-3.2.1
echo we configure makefiles
./configure
make check_nrpe
make install-plugin
echo here we define a check_nrpe command
echo add below lines to the above file
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
echo Plugins here - /usr/local/nagios/libexec
Nagios is a free tool you can use to monitor nodes in a home network or even a on a small office network.
You can monitor availability and health of almost anything connected to the network through a single web interface.
It's possible to get nagios server up and running on a Raspberry Pi. It can be a low cost/low power monitoring node in your network.
We'll do the client setup and config in the next video and also how to setup email and text alerts in a future video.
Commands below are to install Nagios server on Ubuntu (16.04/18.04)
The steps would be same for any Debian based Linux OS (Linux Mint, Raspbian)
sudo su
apt update
apt upgrade
echo we need to install Apache, PHP, few dependancies and some tools to compile programs like gcc.
apt install build-essential libgd2-dev openssl libssl-dev apache2 php libapache2-mod-php snmp libnet-snmp-perl gettext libmcrypt-dev libssl-dev unzip
echo then we create a user for nagios to run
useradd nagios
echo we add that user to apache user group
usermod -a -G nagios www-data
echo we get the nagios installtion componenets diretly from their github project page.
echo we download nagios - check the laatest version and chnage the url below accordingly
cd nagios-4.4.3
echo we configure the project to match our system
./configure --with-httpd-conf=/etc/apache2/sites-enabled
echo then we compile and install nagios componenets in these next few commands
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
echo we enable the nagios to run at startup
systemctl enable nagios
echo we enable rewrite and cgi modules for apache
a2enmod rewrite cgi
echo we add a username and password for nagios web interface
echo we restart the apache web interface
systemctl restart apache2
echo Next we install the nagios plugin
cd ..
cd nagios-plugins-2.2.1
echo next we configure the makefiles
./configure
make install
echo we start nagios
systemctl start nagios
echo Goto Web Page
cd ..
echo we download nrpe from the nagios github project page
cd nrpe-3.2.1
echo we configure makefiles
./configure
make check_nrpe
make install-plugin
echo here we define a check_nrpe command
echo add below lines to the above file
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
echo Plugins here - /usr/local/nagios/libexec
Комментарии