Nagios Monitoring Tool Installation
Nagios Monitoring Tool Installation
Nagios Monitoring Tool Installation
Server Nagios:
Step1:
Installing the Nagios ,Nagios-plugins-all
, Nagios-plugins-nrpe .
Step2:
Enabling the service Nagios
check you installed the http
added the port 80 in firewall or
disable it…
Step3:
After enabling the service you can login
the url by,
http://192.168.5.11/nagios
your server ip addresses
Step4:
Username: nagiosadmin
Password: (empty)
To set the password,
htpasswd –c /etc/nagios/passwd
nagiosadmin
now my ,
username: nagiosadmin
password: redhat123
Step5:
If you need a custom directory instead
of ,
http://192.168.5.11/nagios
u have to change it in the configuration
file called…
vi /etc/httpd/conf.d/nagios.conf
before that check your version of
httpd
Then,
Require all granted
If you enable this , think that you are
having the PUBLIC IPADDRESS
every one can access this Nagios
page …..
You want specific person to access
the page(url), you can enable this
Step6:
vi /etc/nagios/nagios.cfg
this file is your complete Nagios
configuration file….
LINE18: /var/log/nagios/nagios.log
log file on server side
LINE29:
/etc/nagios/objects/commands.cfg
Plugins we install that will executed by
command which is present in this
commands.cfg file…
LINE30
/etc/nagios/objects/contacts.cfg
Failover alert and whom you want to
contact that will be stored in the
contacts file
LINE31
/etc/nagios/objects/timeperiods.cfg
It will be default we are not going to
change in this …
LINE32
/etc/nagios/objects/templates.cfg
Your view about the page…
Step7:
Step8:
contacts.cfg
localhost.cfg
This file having the values…sometimes
you will specify the values in the client
nodes itself
[ we have to create this directory when
you enabled in Nagios.cfg file]
templates.cfg
This will denote the information about
screen …how to need the Nagios page
3.servers/
node1.cfg(for node1 machine)
node2.cfg(for node2 machine)
Till you can add n number of
machines…..
In that node1.cfg:
define host{
use linux-server
host_name node1
alias node1
address 192.168.5.12
max_check_attempts 2
normal_check_interval 10
retry_check_interval 1
notification_interval 5
}
define service{
use generic-service
host_name node1
service_description PING
check_command
check_ping!100.0,20%!500.0,60%
}
define service{
use generic-service
host_name node1
service_description Root Partition
check_command
check_nrpe!check_sda2
#\!20%\!10%\!/
}
define service{
use generic-service
host_name node1
service_description Boot Partition
check_command
check_nrpe!check_sda1
#\!20%\!10%\!/
}
define service{
use generic-service
host_name node1
service_description Httpd_service
check_command
check_nrpe!check_httpd
#\!20%\!10%\!/
}
# for current users
define service{
use generic-service
host_name node1
service_description Current Users
check_command
check_nrpe!check_users\!20\!50
}
define service{
use generic-service
host_name node1
service_description Total Processes
check_command
check_nrpe!check_total_procs
#\!250\!400\!RSZDT
}
# for current load
define service{
use generic-service
host_name node1
service_description Current Load
check_command
check_nrpe!check_load\!5.0,4.0,3.0\!10
.0,6.0,4.0
define service{
use generic-service
host_name node1
service_description HTTP
check_command
check_nrpe!check_http
notifications_enabled 1
##(notification will be enabled while
giving 1)
}
}
Like this you can monitor n number of
service in each nodes…
http://192.168.5.11/vaishu
CLIENT CONFIGURATION:
In client side you have to install the
following package,
yum install Nagios-plugins-all nrpe
-y
systemctl enable nrpe
systemctl start nrpe
After the installation,
vi /etc/nagios/nrpe
These plugins are linked with the server
and the values are applied to the
specific nodes…