Konfigurasi Nagios
Konfigurasi Nagios
Konfigurasi Nagios
To have nagios well working, you need apache2 and php to be installed and
correctly configured. If you have not yet these packages installed, you can do
it with the command below.
In this article, the configuration of the above packages will be not detailed.
There are some other pre-requisites packages to install as below
# apt install -y build-essential autoconf gcc libc6 make wget unzip libgd2-xpm-dev
# mkdir /opt/nagios
# cd /opt/nagios
# cd nagioscore-nagios-4.3.2/
# make all
You can that it helps you by giving you next configurations steps to follow and
description. Now we will install the binary files, CGIs, and HTML files
# make install
We will install the service or daemon files and also configure them to start on
boot
# make install-init
# make install-commandmode
Now install the *SAMPLE* configuration files. These are required as Nagios
needs some configuration files to allow it to start.
# make install-config
Then install the Apache web server configuration files and configure the
Apache settings.
# make install-webconf
New password:
Notice that you will use this user and password to log into you nagios web
interface. Now restart apache service to make modifications to take effect
# apt install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential
snmp libnet-snmp-perl gettext
Now we will create our working directory into /opt directory where we will
download the plugins
# cd nagios-plugins-release-2.2.1
# ./tools/setup
# ./configure
# make
# make install
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
........................
........................
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Note that if you don't start the nagios service, you will have an error message
at you nagios homepage.
username: nagiosadmin
password: nagios
Now you can go to Hosts or Services menu list to the left side in order to see
you server and services monitored.
You can see that the default monitored services of our server.
7) Configure Firewall
If you can not access to your web interface, you should check your firewall
configuration.
# iptables-save
But if you prefer ufw as firewall instead of iptables, use the command below
# ufw reload