SlideShare a Scribd company logo
DATACENTER MANAGEMENT NAGIOS CONFIGURATION
Submitted By
Pankaj U. Rane (120851923024)
P.Venkatesh(120851923027)

Install and configure Nagios on Fedora Core 8 (VM or Physical Machine)
Monitor the following:
>> Local Machine
>> Remote Linux Machine (preferably Fedora) – Hostname to be displayed as “LINUX1”
>> Remote Windows Machine – Hostname to be displayed as “WIN1”
>> Remote Website – Name to be displayed as “MYWEBSITE”
*** MONITORING THE WINDOWS MACHINE***
To achieve this , we need to install an agent on the WINDOWS Machine.
Agent acts as a proxy between the Nagios Plugin that does the monitoring and the
actual service or attribute of the windows machine.
Client used for this user manual is NSClient++
The check_nt plugin will be used to communicate with the NSClient++
Steps involved:
Perform first-time pre-requisite.
Install monitoring agent on the Windows Machine.
Create new host and service definitions for monitoring the Windows Machine.
Restart the Nagios daemon.
Download the NSClient++ installer package from www.nsclient.org to the target
machine you wish to install it on.
Run the NSClient++ MSI installer package to initiate the installation. The welcome
screen will appear. Click Next to continue to the next step.
Read through the End User License Agreement.
Once you have agreed to itsterms, check the acceptance box and click Next to
continue.
You may customize the installation options on the next screen if you wish. No
changes are required for an working installation of the agent. Click Next to continue.
If an existing NSClient++ installation exists on the target machine, you will have the
option of using the old configuration file. This option is not enable if this is the first
time you are installing the client. Click Next to continue.
In the next step you will need to configure the NSClient++ agent. These steps
are important! Make sure you: Enter the IP address of the Nagios XI or Nagios
Core server in the Allowed hosts box.
Enter a password in the NSClient password box that will be required for
communication between the Nagios server and the Windows machine.
Check the following boxes in the Modules to load section:
Enable common check plugins Enable , nsclient server (check_nt) , NRPE server
and WMI checks. Click Next to continue.
Click the Install button on the next screen to begin the installation.
When the installation completes, make sure to check the Start service option and click
Finish to complete the setup.
The NSClient++ agent will now be running as a service, which means the Windows
machine is ready to be monitored with Nagios.
And now to Start->Run->cmd->services.msc and click on NSClient++ and select
the Logon tab and enable “Allow service to interact with desktop” and click “OK”
and Restart the NSClient++ service.
NOW CONFIGURE FEDORA TO MONITOR WINDOWS
#nano /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring a Windows Machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg
uncomment the cfg_file and save nagios.cfg

*** NAGIOS SERVER INSTALLATION***
Before installing Nagios server check the pre-requistives :
apache - #yum list installed | grep httpd
php
- #yum list installed | grep php
gcc compiler - # yum list installed | grep gcc
GD Development libraries - # yum list installed | grep gcc
net-snmp - # yum list installed | grep net-snmp (if not installed #yum install net-snmp)
Server Installation of Nagios :
Step1 : Create and manage account and group
a) Make sure you are in “root”
b) Create a new nagios user and give it a password
#whoami
root
#cat /etc/passwd
#useradd –m nagios ( -m : To create a user in home dir)
#ls /home/
nagios
#passwd nagios ( Set the password the nagios user)

c) Check if a group exist with the nagios name.
#cat /etc/group
#cat /etc/group | cut –d”:” –f1 | sort –u | less
nagios
d) Create a new nagcmd group for allowing external commands to be submitted through the
web interface.
#groupadd nagcmd
#cat /etc/group | grep nagcmd
nagcmd:x:502
e) Add both the nagios user and the apache user to the group.
#usermod –a –G nagcmd nagios
#usermod –a –G nagcmd apache
#cat /etc/group | grep nagcmd
nagcmd:x:502:nagios,apache
f) Download Nagios and Plugin Source Code.
nagios-3.4.1.tar.gz
nagios-plugins-1.4.16
g) Compile and install nagios
i) Extract the nagios source code tarball.
#tar xzf nagios-3.4.1.tar.gz
#ls –l
nagios-3.4.1
#cd nagios-3.4.1
nagios>#ls
ii) Run the nagios configure script, passing the name of the group you created earlier.
nagios>#./configure - -with-command-group=nagcmd
iii) Compile the nagios source code
nagios>#make all
iv) Install binaries , init scripts , sample config files and set permissions on the external
command directory.
nagios># make install
nagios># make install-init
nagios># make install-config
nagios># make install-commandmode
v) Configuration customization
#nano /usr/local/nagios/etc/objects/contact.cfg
Define contact {
email
pankaj.rane2k8@gmail.com ; (Note: should be type in single line)
and save contact.cfg
vi) Configure the web interface
a) Install the nagios web config file in the Apache conf.d directory.
nagios># make install-webconf
b) Install the classic theme for the nagios web interface
nagios># make install-classicui
c) Create a nagiosadmin account for loggin into the nagios web interface.
Note : Remember the password of nagiosadmin
We will use the htpasswd for this , htpasswd is used to create and update the flat-files used to
store usernames and passwords for basic authentication of HTTP users.
#htpasswd –c /usr/local/nagios/etc/htpasswd.users
nagiosadmin
New passwd:nagiosadmin123
Re-type passwd:nagiosadmin123
#service httpd restart
#cd .. ( come out of nagios folder)
#ls –l
#tar xzf nagios-plugin.tar.gz
#cd nagios-plugin
#./configure - -with-nagios-user=nagios - -with-nagios-group=nagios
#make
#make install
d) Start Nagios
Add nagios to the list of system services and have it automatically start when the system boots.
#chkconfig - -add nagios
#chkconfig nagios on
The chkconfig command updates and queries runlevel information for system services.
Verify the sample nagios configuration files.
nagios-plugin>#/usr/local/nagios/bin/nagios –v /usr/local/nagios/etc/nagios.cfg
0 warnings
0 Errors
#service nagios start
SE-linux is in enforcing mode make it disabled.
#getenforce
Permissive
#setenforce 0 - To disable
Go to browser http://localhost/nagios/
Username : nagiosadmin
Password:nagiosadmin123

*** MONITORING THE REMOTE LINUX MACHINE***
How to?
Use the NRPE daemon to execute Nagios plugins on the remote server and report back to the
monitoring host server.NRPE-Nagios Remote Plugin Executor.
Step1: Remote server installation and setup ( Nagios client)
Check openssl-devel is installed
#yum list installed | grep openssl-devel
Create nagios user account on remote server to be monitored
#useradd nagios
#passwd nagios
New passwd:Password1234
Download and install Nagios Plugin nagios-plugin-1.4.16.tar.gz
#tar xzf nagios-plugin-1.4.16.tar.gz
#cd nagios-plugin-1.4.16
#./configure - -with-nagios-user=nagios - -with-nagios-group=nagios
#make
#make install
Change the permissions on the plugins directory and the plugins to the nagios user.
nagios-plugin>#chown nagios.nagios /usr/local/nagios/
nagios-plugin>#chown nagios.nagios /usr/local/nagios/libexec/
Install xinetd package
nagios-plugin>#yum install xinetd
#cd . .
Download nrpe-2.13.tar.gz
#tar zxf nrpe-2.13.tar.gz
#cd nrpe-2.13
#./configure
#make all
#make install-plugin
#make install-daemon
#make install-daemon-config
#make install-xinetd
POST NRPE Configuration
Edit xinetd NRPE Entry:
Add nagios monitoring server to the “only_from” directive:
nrpe>#nano /etc/xinetd.d/nrpe
only_from = 127.0.0.1 192.168.145.132
EDIT SERVICES FILE ENTRY
Add entry for nrpe daemon:
nrpe>#nano /etc/services
go to bottom and write
nrpe

5666/tcp

and save services
Restart xinetd and set to start at boot
nrpe>#chkconfig xinetd on
nrpe>#service xinetd start
#netstat –antp | grep 5666
If you can‟t see the service disable SE Linux

#NRPE
#nano /etc/selinux/config
Set to be disabled , if it is permissive - Restart the system
#service xinetd restart
#netstat –antp | grep 5666

Check NRPE daemon is functioning
#/usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.13
#/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1
Disk OK – free space:/boot 167MB(93% inode=99%);
-w 20% (Warning)
-c 10% (Critical Warning)
-p /dev/sda1 (Parameter passing primary storage)
***NOW GO TO NAGIOS SERVER***
Download NRPE into the server, compile and configure NRPE
#tar xzf nrpe.tar.gz
#cd nrpe
nrpe>#./configure
nrpe>#make all
nrpe>#make install-plugin
CREATE NRPE COMMAND DEFINITION
A command definition needs to be created in order for the check_nrpe plugin to be used by
nagios.
#nano /usr/local/nagios/etc/objects/commands.cfg
#######################################
# NRPE CHECK COMMAND
# Command to use NRPE to check remote host
######################################
define command{
command_name check_nrpe
command_line

$USER1$check_nrpe -H $HOSTADDRESS$ -c $ARG1$

}
#######################################
# CHECK WEBSITE RESPONSE
# Command to check public service
######################################
# „check_website_response‟ command definition
define command{
command_name check_website_response
command_line $USER1$/check_website_response.sh –u $ARG1$ -w $ARG2$ -c $ARG3$
}
And save the commands.cfg
Create new linux-box-remote object template file:
#nano /usr/local/nagios/etc/objects/linux-box-remote.cfg
define host {
name linux-box-remote

; None of this template

use

; Inherit default values

generic-host

check_period

24x7

check_interval

5

retry_interval

1

max_check_attempts

10

check_command

check-host-alive

notification_period

24x7
notification_interval

30

notification_options

d,r

contact_groups

admins

register

0

; DO NOT REGISTER TIS-IT IS A TEMPLATE

}
define host{
use

linux-box-remote

; Inherit default values from template

host_name

LINUX1

; Remote Linux Server

alias

Fedora

; Alias Name

address

192.168.145.134

; IP

}
define service{
use

generic-service

host_name

fc8

service_description

CPULoad

check_command

check_nrpe!check_load

}
Save linux-box-remote.cfg
ACTIVATE the linux-box-remote.cfg template
#nano /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring remote Linux machine
cfg_file=/usr/local/nagios/etc/objects/linux-box-remote.cfg
save nagios.cfg and exit
#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
#service nagios restart
#service httpd restart
Open the browser http://localhost/nagios
Username: nagiosadmin
Password:Password123
Click on host

*** MONITORING PUBLICLY AVAILABLE SERVICES***
Examples of Pubic Services – HTTP , POP3 , IMAP etc
#cd /usr/local/nagios/libexec
(All the commands are stored in this path)
Copy check_website_response.sh to /usr/local/nagios/libexec
Add the following lines to nagios.cfg
# Definitions for monitoring Public Service
Cfg_file=/usr/local/nagios/etc/objects/publichost.cfg
Add the following to the /usr/local/nagios/etc/objects/commands.cfg
# „check_website_response‟ command definition
Define command {
Command_name

check_website_response

Command_line $USER1$/check_website_response.sh –u $ARG1$ -w $ARG2$ -c
$ARG3$
}
#cd /usr/local/nagios/libexec
libexec>#ls –l check_website_response.sh
#chmod 755 check_website_response.sh
#./ check_website_response.sh
# check_website_response.sh –w 1000 –c 2000 –u http://192.168.1.181/
RESPONSE:OK
Create the file publichost.cfg under the path /usr/local/nagios/etc/objects
define host

{

use

generic-host

; Inherit default values from a template

host_name

MYWEBSITE ; Website Name

max_check_attempts 3
contact_groups

admins

}
define service {
host_name

MYWEBSITE

service_description

Website Response : www.mywebsite.in

check_command

check_website_response!"http://192.168.1.181/"!1000!2000

max_check_attempts 5
check_interval

1

retry_interval

1

check_period

24x7

}
Save publichost.cfg
TESTING
#/usr/local/nagios/bin/nagios –v /usr/local/nagios/etc/nagios.cfg
#service nagios restart
Go to browser http://localhost/nagios
Username: nagiosadmin
Password:Password123
Click on Host and Services

More Related Content

What's hot

Docker remote-api
Docker remote-apiDocker remote-api
Docker remote-api
Eric Ahn
 
Docker command
Docker commandDocker command
Docker command
Eric Ahn
 
Webinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and moreWebinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and more
panagenda
 
Installing GravCMS
Installing GravCMSInstalling GravCMS
Installing GravCMS
George Sumpster
 
How to install nginx vs unicorn
How to install nginx vs unicornHow to install nginx vs unicorn
How to install nginx vs unicorn
baran19901990
 
Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...
Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...
Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...
OW2
 
Passwordless login with unix auth_socket
Passwordless login with unix auth_socketPasswordless login with unix auth_socket
Passwordless login with unix auth_socket
Otto Kekäläinen
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
Antony Gitomeh
 
Hadoop presentation
Hadoop presentationHadoop presentation
Hadoop presentation
MaggieZhang61
 
Odoo V8 Installation
Odoo V8 InstallationOdoo V8 Installation
Odoo V8 Installation
Emipro Technologies Pvt. Ltd.
 
Odoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenvOdoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenv
acsone
 
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PSSitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Peter Nazarov
 
How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?
Celine George
 
Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...
Otto Kekäläinen
 
Хокку про Heroku
Хокку про HerokuХокку про Heroku
Хокку про Heroku
Serge Seletskyy
 
How to install squid proxy on server or how to install squid proxy on centos o
How to install squid proxy on server  or how to install squid proxy on centos oHow to install squid proxy on server  or how to install squid proxy on centos o
How to install squid proxy on server or how to install squid proxy on centos o
Proxiesforrent
 
Ansible intro
Ansible introAnsible intro
Ansible intro
Hsi-Kai Wang
 
Ajenti control panel
Ajenti control panel Ajenti control panel
Ajenti control panel
chacheng_dbl
 

What's hot (18)

Docker remote-api
Docker remote-apiDocker remote-api
Docker remote-api
 
Docker command
Docker commandDocker command
Docker command
 
Webinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and moreWebinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and more
 
Installing GravCMS
Installing GravCMSInstalling GravCMS
Installing GravCMS
 
How to install nginx vs unicorn
How to install nginx vs unicornHow to install nginx vs unicorn
How to install nginx vs unicorn
 
Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...
Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...
Hammr Project Update: Machine Images and Docker Containers for your Cloud, OW...
 
Passwordless login with unix auth_socket
Passwordless login with unix auth_socketPasswordless login with unix auth_socket
Passwordless login with unix auth_socket
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
 
Hadoop presentation
Hadoop presentationHadoop presentation
Hadoop presentation
 
Odoo V8 Installation
Odoo V8 InstallationOdoo V8 Installation
Odoo V8 Installation
 
Odoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenvOdoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenv
 
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PSSitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
 
How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?
 
Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...
 
Хокку про Heroku
Хокку про HerokuХокку про Heroku
Хокку про Heroku
 
How to install squid proxy on server or how to install squid proxy on centos o
How to install squid proxy on server  or how to install squid proxy on centos oHow to install squid proxy on server  or how to install squid proxy on centos o
How to install squid proxy on server or how to install squid proxy on centos o
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
Ajenti control panel
Ajenti control panel Ajenti control panel
Ajenti control panel
 

Viewers also liked

Nagios nrpe
Nagios nrpeNagios nrpe
Nagios nrpe
sharad chhetri
 
BGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet WorkBGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet Work
IT Tech
 
5. mrtg in nagios1 0
5. mrtg in nagios1 05. mrtg in nagios1 0
5. mrtg in nagios1 0aqpjuan
 
Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3
IT Tech
 
Network protocols
Network protocolsNetwork protocols
Network protocols
IT Tech
 
The feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 modelsThe feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 models
IT Tech
 
How to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersHow to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routers
IT Tech
 
Ordering guide for cisco isr g2
Ordering guide for cisco isr g2Ordering guide for cisco isr g2
Ordering guide for cisco isr g2
IT Tech
 
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardwareComputer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
Shripal Oswal
 
GTU PHP Project Training Guidelines
GTU PHP Project Training GuidelinesGTU PHP Project Training Guidelines
GTU PHP Project Training Guidelines
TOPS Technologies
 
Licensing on Cisco 2960, 3560X and 3750X...
Licensing on Cisco 2960, 3560X and 3750X...Licensing on Cisco 2960, 3560X and 3750X...
Licensing on Cisco 2960, 3560X and 3750X...
IT Tech
 
Plugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlowPlugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlowNetFlow Analyzer
 
How to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco RoutersHow to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco Routers
SolarWinds
 
Central management of network and call services
Central management of network and call servicesCentral management of network and call services
Central management of network and call services
Nazmul Hossain Rakib
 
Line cards that are available for cisco catalyst 4500 series switches
Line cards that are available for cisco catalyst 4500 series switchesLine cards that are available for cisco catalyst 4500 series switches
Line cards that are available for cisco catalyst 4500 series switches
IT Tech
 
Packet Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-logPacket Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-log
Rafat Khandaker
 

Viewers also liked (18)

Nagios nrpe
Nagios nrpeNagios nrpe
Nagios nrpe
 
BGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet WorkBGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet Work
 
5. mrtg in nagios1 0
5. mrtg in nagios1 05. mrtg in nagios1 0
5. mrtg in nagios1 0
 
Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
Nagios
NagiosNagios
Nagios
 
The feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 modelsThe feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 models
 
How to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersHow to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routers
 
Ordering guide for cisco isr g2
Ordering guide for cisco isr g2Ordering guide for cisco isr g2
Ordering guide for cisco isr g2
 
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardwareComputer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
 
GTU PHP Project Training Guidelines
GTU PHP Project Training GuidelinesGTU PHP Project Training Guidelines
GTU PHP Project Training Guidelines
 
Licensing on Cisco 2960, 3560X and 3750X...
Licensing on Cisco 2960, 3560X and 3750X...Licensing on Cisco 2960, 3560X and 3750X...
Licensing on Cisco 2960, 3560X and 3750X...
 
Plugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlowPlugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlow
 
How to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco RoutersHow to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco Routers
 
Central management of network and call services
Central management of network and call servicesCentral management of network and call services
Central management of network and call services
 
Line cards that are available for cisco catalyst 4500 series switches
Line cards that are available for cisco catalyst 4500 series switchesLine cards that are available for cisco catalyst 4500 series switches
Line cards that are available for cisco catalyst 4500 series switches
 
Packet Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-logPacket Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-log
 
Netflow slides
Netflow slidesNetflow slides
Netflow slides
 

Similar to How to configure Nagios in Fedora ?

How install nagios in ubuntu 15.04, 16.04
How install nagios in ubuntu 15.04, 16.04How install nagios in ubuntu 15.04, 16.04
How install nagios in ubuntu 15.04, 16.04
Vanda KANY
 
Install nagios
Install nagiosInstall nagios
Install nagioshassandb
 
Install nagios
Install nagiosInstall nagios
Install nagioshassandb
 
Install nagios
Install nagiosInstall nagios
Install nagioshassandb
 
Learning Nagios module 1
Learning Nagios module 1Learning Nagios module 1
Learning Nagios module 1
Jayant Chutke
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
Chanaka Lasantha
 
nuxt-en.pdf
nuxt-en.pdfnuxt-en.pdf
nuxt-en.pdf
ssuser65180a
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nagios
 
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
Marc Trimble
 
Tested install-isp config3-ubuntu-16-04
Tested install-isp config3-ubuntu-16-04Tested install-isp config3-ubuntu-16-04
Tested install-isp config3-ubuntu-16-04
SANTIAGO HERNÁNDEZ
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installationfranbow
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingBeni Krisbiantoro
 
Nagios intro
Nagios intro Nagios intro
Nagios intro
Hsi-Kai Wang
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Document
uzzal basak
 
Install Nagios Core On CentOS 7
Install Nagios Core On CentOS 7Install Nagios Core On CentOS 7
Install Nagios Core On CentOS 7
sharad chhetri
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
Matt Dunlap
 
Linux
LinuxLinux
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
JohnWilson47710
 

Similar to How to configure Nagios in Fedora ? (20)

How install nagios in ubuntu 15.04, 16.04
How install nagios in ubuntu 15.04, 16.04How install nagios in ubuntu 15.04, 16.04
How install nagios in ubuntu 15.04, 16.04
 
Install nagios
Install nagiosInstall nagios
Install nagios
 
Install nagios
Install nagiosInstall nagios
Install nagios
 
Install nagios
Install nagiosInstall nagios
Install nagios
 
Learning Nagios module 1
Learning Nagios module 1Learning Nagios module 1
Learning Nagios module 1
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
nuxt-en.pdf
nuxt-en.pdfnuxt-en.pdf
nuxt-en.pdf
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
 
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
 
Tested install-isp config3-ubuntu-16-04
Tested install-isp config3-ubuntu-16-04Tested install-isp config3-ubuntu-16-04
Tested install-isp config3-ubuntu-16-04
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
 
Nagios intro
Nagios intro Nagios intro
Nagios intro
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Document
 
Install Nagios Core On CentOS 7
Install Nagios Core On CentOS 7Install Nagios Core On CentOS 7
Install Nagios Core On CentOS 7
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Linux
LinuxLinux
Linux
 
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
 
Nrpe
NrpeNrpe
Nrpe
 

Recently uploaded

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

How to configure Nagios in Fedora ?

  • 1. DATACENTER MANAGEMENT NAGIOS CONFIGURATION Submitted By Pankaj U. Rane (120851923024) P.Venkatesh(120851923027) Install and configure Nagios on Fedora Core 8 (VM or Physical Machine) Monitor the following: >> Local Machine >> Remote Linux Machine (preferably Fedora) – Hostname to be displayed as “LINUX1” >> Remote Windows Machine – Hostname to be displayed as “WIN1” >> Remote Website – Name to be displayed as “MYWEBSITE” *** MONITORING THE WINDOWS MACHINE*** To achieve this , we need to install an agent on the WINDOWS Machine. Agent acts as a proxy between the Nagios Plugin that does the monitoring and the actual service or attribute of the windows machine. Client used for this user manual is NSClient++ The check_nt plugin will be used to communicate with the NSClient++ Steps involved: Perform first-time pre-requisite. Install monitoring agent on the Windows Machine. Create new host and service definitions for monitoring the Windows Machine. Restart the Nagios daemon. Download the NSClient++ installer package from www.nsclient.org to the target machine you wish to install it on. Run the NSClient++ MSI installer package to initiate the installation. The welcome screen will appear. Click Next to continue to the next step. Read through the End User License Agreement. Once you have agreed to itsterms, check the acceptance box and click Next to continue. You may customize the installation options on the next screen if you wish. No changes are required for an working installation of the agent. Click Next to continue.
  • 2. If an existing NSClient++ installation exists on the target machine, you will have the option of using the old configuration file. This option is not enable if this is the first time you are installing the client. Click Next to continue. In the next step you will need to configure the NSClient++ agent. These steps are important! Make sure you: Enter the IP address of the Nagios XI or Nagios Core server in the Allowed hosts box. Enter a password in the NSClient password box that will be required for communication between the Nagios server and the Windows machine. Check the following boxes in the Modules to load section: Enable common check plugins Enable , nsclient server (check_nt) , NRPE server and WMI checks. Click Next to continue. Click the Install button on the next screen to begin the installation. When the installation completes, make sure to check the Start service option and click Finish to complete the setup. The NSClient++ agent will now be running as a service, which means the Windows machine is ready to be monitored with Nagios. And now to Start->Run->cmd->services.msc and click on NSClient++ and select the Logon tab and enable “Allow service to interact with desktop” and click “OK” and Restart the NSClient++ service. NOW CONFIGURE FEDORA TO MONITOR WINDOWS #nano /usr/local/nagios/etc/nagios.cfg # Definitions for monitoring a Windows Machine cfg_file=/usr/local/nagios/etc/objects/windows.cfg uncomment the cfg_file and save nagios.cfg *** NAGIOS SERVER INSTALLATION*** Before installing Nagios server check the pre-requistives : apache - #yum list installed | grep httpd php - #yum list installed | grep php gcc compiler - # yum list installed | grep gcc GD Development libraries - # yum list installed | grep gcc net-snmp - # yum list installed | grep net-snmp (if not installed #yum install net-snmp) Server Installation of Nagios : Step1 : Create and manage account and group a) Make sure you are in “root” b) Create a new nagios user and give it a password #whoami
  • 3. root #cat /etc/passwd #useradd –m nagios ( -m : To create a user in home dir) #ls /home/ nagios #passwd nagios ( Set the password the nagios user) c) Check if a group exist with the nagios name. #cat /etc/group #cat /etc/group | cut –d”:” –f1 | sort –u | less nagios d) Create a new nagcmd group for allowing external commands to be submitted through the web interface. #groupadd nagcmd #cat /etc/group | grep nagcmd nagcmd:x:502 e) Add both the nagios user and the apache user to the group. #usermod –a –G nagcmd nagios #usermod –a –G nagcmd apache #cat /etc/group | grep nagcmd nagcmd:x:502:nagios,apache f) Download Nagios and Plugin Source Code. nagios-3.4.1.tar.gz nagios-plugins-1.4.16 g) Compile and install nagios i) Extract the nagios source code tarball. #tar xzf nagios-3.4.1.tar.gz #ls –l nagios-3.4.1 #cd nagios-3.4.1 nagios>#ls ii) Run the nagios configure script, passing the name of the group you created earlier. nagios>#./configure - -with-command-group=nagcmd iii) Compile the nagios source code nagios>#make all iv) Install binaries , init scripts , sample config files and set permissions on the external command directory. nagios># make install nagios># make install-init nagios># make install-config nagios># make install-commandmode v) Configuration customization
  • 4. #nano /usr/local/nagios/etc/objects/contact.cfg Define contact { email pankaj.rane2k8@gmail.com ; (Note: should be type in single line) and save contact.cfg vi) Configure the web interface a) Install the nagios web config file in the Apache conf.d directory. nagios># make install-webconf b) Install the classic theme for the nagios web interface nagios># make install-classicui c) Create a nagiosadmin account for loggin into the nagios web interface. Note : Remember the password of nagiosadmin We will use the htpasswd for this , htpasswd is used to create and update the flat-files used to store usernames and passwords for basic authentication of HTTP users. #htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin New passwd:nagiosadmin123 Re-type passwd:nagiosadmin123 #service httpd restart #cd .. ( come out of nagios folder) #ls –l #tar xzf nagios-plugin.tar.gz #cd nagios-plugin #./configure - -with-nagios-user=nagios - -with-nagios-group=nagios #make #make install d) Start Nagios Add nagios to the list of system services and have it automatically start when the system boots. #chkconfig - -add nagios #chkconfig nagios on The chkconfig command updates and queries runlevel information for system services. Verify the sample nagios configuration files. nagios-plugin>#/usr/local/nagios/bin/nagios –v /usr/local/nagios/etc/nagios.cfg 0 warnings 0 Errors #service nagios start SE-linux is in enforcing mode make it disabled. #getenforce Permissive #setenforce 0 - To disable
  • 5. Go to browser http://localhost/nagios/ Username : nagiosadmin Password:nagiosadmin123 *** MONITORING THE REMOTE LINUX MACHINE*** How to? Use the NRPE daemon to execute Nagios plugins on the remote server and report back to the monitoring host server.NRPE-Nagios Remote Plugin Executor. Step1: Remote server installation and setup ( Nagios client) Check openssl-devel is installed #yum list installed | grep openssl-devel Create nagios user account on remote server to be monitored #useradd nagios #passwd nagios New passwd:Password1234 Download and install Nagios Plugin nagios-plugin-1.4.16.tar.gz #tar xzf nagios-plugin-1.4.16.tar.gz #cd nagios-plugin-1.4.16 #./configure - -with-nagios-user=nagios - -with-nagios-group=nagios #make #make install Change the permissions on the plugins directory and the plugins to the nagios user. nagios-plugin>#chown nagios.nagios /usr/local/nagios/ nagios-plugin>#chown nagios.nagios /usr/local/nagios/libexec/ Install xinetd package
  • 6. nagios-plugin>#yum install xinetd #cd . . Download nrpe-2.13.tar.gz #tar zxf nrpe-2.13.tar.gz #cd nrpe-2.13 #./configure #make all #make install-plugin #make install-daemon #make install-daemon-config #make install-xinetd POST NRPE Configuration Edit xinetd NRPE Entry: Add nagios monitoring server to the “only_from” directive: nrpe>#nano /etc/xinetd.d/nrpe only_from = 127.0.0.1 192.168.145.132 EDIT SERVICES FILE ENTRY Add entry for nrpe daemon: nrpe>#nano /etc/services go to bottom and write nrpe 5666/tcp and save services Restart xinetd and set to start at boot nrpe>#chkconfig xinetd on nrpe>#service xinetd start #netstat –antp | grep 5666 If you can‟t see the service disable SE Linux #NRPE
  • 7. #nano /etc/selinux/config Set to be disabled , if it is permissive - Restart the system #service xinetd restart #netstat –antp | grep 5666 Check NRPE daemon is functioning #/usr/local/nagios/libexec/check_nrpe -H localhost NRPE v2.13 #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1 Disk OK – free space:/boot 167MB(93% inode=99%); -w 20% (Warning) -c 10% (Critical Warning) -p /dev/sda1 (Parameter passing primary storage) ***NOW GO TO NAGIOS SERVER*** Download NRPE into the server, compile and configure NRPE #tar xzf nrpe.tar.gz #cd nrpe nrpe>#./configure nrpe>#make all nrpe>#make install-plugin CREATE NRPE COMMAND DEFINITION A command definition needs to be created in order for the check_nrpe plugin to be used by nagios. #nano /usr/local/nagios/etc/objects/commands.cfg ####################################### # NRPE CHECK COMMAND
  • 8. # Command to use NRPE to check remote host ###################################### define command{ command_name check_nrpe command_line $USER1$check_nrpe -H $HOSTADDRESS$ -c $ARG1$ } ####################################### # CHECK WEBSITE RESPONSE # Command to check public service ###################################### # „check_website_response‟ command definition define command{ command_name check_website_response command_line $USER1$/check_website_response.sh –u $ARG1$ -w $ARG2$ -c $ARG3$ } And save the commands.cfg Create new linux-box-remote object template file: #nano /usr/local/nagios/etc/objects/linux-box-remote.cfg define host { name linux-box-remote ; None of this template use ; Inherit default values generic-host check_period 24x7 check_interval 5 retry_interval 1 max_check_attempts 10 check_command check-host-alive notification_period 24x7
  • 9. notification_interval 30 notification_options d,r contact_groups admins register 0 ; DO NOT REGISTER TIS-IT IS A TEMPLATE } define host{ use linux-box-remote ; Inherit default values from template host_name LINUX1 ; Remote Linux Server alias Fedora ; Alias Name address 192.168.145.134 ; IP } define service{ use generic-service host_name fc8 service_description CPULoad check_command check_nrpe!check_load } Save linux-box-remote.cfg ACTIVATE the linux-box-remote.cfg template #nano /usr/local/nagios/etc/nagios.cfg # Definitions for monitoring remote Linux machine cfg_file=/usr/local/nagios/etc/objects/linux-box-remote.cfg save nagios.cfg and exit #/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg #service nagios restart #service httpd restart Open the browser http://localhost/nagios
  • 10. Username: nagiosadmin Password:Password123 Click on host *** MONITORING PUBLICLY AVAILABLE SERVICES*** Examples of Pubic Services – HTTP , POP3 , IMAP etc #cd /usr/local/nagios/libexec (All the commands are stored in this path) Copy check_website_response.sh to /usr/local/nagios/libexec Add the following lines to nagios.cfg # Definitions for monitoring Public Service Cfg_file=/usr/local/nagios/etc/objects/publichost.cfg Add the following to the /usr/local/nagios/etc/objects/commands.cfg # „check_website_response‟ command definition Define command { Command_name check_website_response Command_line $USER1$/check_website_response.sh –u $ARG1$ -w $ARG2$ -c $ARG3$ } #cd /usr/local/nagios/libexec libexec>#ls –l check_website_response.sh #chmod 755 check_website_response.sh #./ check_website_response.sh # check_website_response.sh –w 1000 –c 2000 –u http://192.168.1.181/ RESPONSE:OK
  • 11. Create the file publichost.cfg under the path /usr/local/nagios/etc/objects define host { use generic-host ; Inherit default values from a template host_name MYWEBSITE ; Website Name max_check_attempts 3 contact_groups admins } define service { host_name MYWEBSITE service_description Website Response : www.mywebsite.in check_command check_website_response!"http://192.168.1.181/"!1000!2000 max_check_attempts 5 check_interval 1 retry_interval 1 check_period 24x7 } Save publichost.cfg TESTING #/usr/local/nagios/bin/nagios –v /usr/local/nagios/etc/nagios.cfg #service nagios restart Go to browser http://localhost/nagios Username: nagiosadmin Password:Password123 Click on Host and Services