Nagios Conference 2012 - Bryan McLellan - Using Nagios With Chef
Nagios pawan kumar- stpl 30042012
-
Upload
pawan-kumar -
Category
Technology
-
view
1.018 -
download
0
description
Transcript of Nagios pawan kumar- stpl 30042012
NAGIOS
Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.
Capabilities to monitor applications, services, operating systems, network protocols, system metrics and infrastructure components with a single tool
Centralized view of entire monitored IT infrastructure
Detailed status information available through web interface
Alert acknowledgments provide communication on known issues and problem response
Event handlers allow automatic restart of failed applications and services
#yum install httpd php
#yum install gcc glibc glibc-common
#yum install gd gd-devel
#/usr/sbin/useradd -m nagios
#passwd nagios
#/usr/sbin/groupadd nagcmd
#/usr/sbin/usermod -a -G nagcmd nagios
#/usr/sbin/usermod -a -G nagcmd apache
Configure mail server
Download Nagios and plugins
: - http://www.nagios.org/download/
Create a directory for storing the downloads.
mkdir ~/downloads
cd ~/downloads
Extract the Nagios source code tarball.
cd ~/downloads
#tar xzf nagios3.2.2.tar.gz
#cd nagios3.2.2
./configure withcommandgroup=nagcmd
make all
make install
make installinit
make installconfig
make installcommandmode
Don't start Nagios yet there's still more that needs to be done...
#vim /usr/local/nagios/etc/objects/contacts.cfg
make installwebconf
#htpasswd c /usr/local/nagios/etc/htpasswd.users nagiosadmin
#service httpd restart
#cd ~/downloads
#tar xzf nagiosplugins.tar.gz
#cd nagiosplugins
./configure withnagiosuser=nagios –withnagiosgroup=nagios
make
make install
chkconfig add nagios
chkconfig nagios on
Verify the sample Nagios configuration files.
#/usr/local/nagios/bin/nagios v /usr/local/nagios/etc/nagios.cfg
If there are no errors, start Nagios.
#service nagios start
#vim /etc/selinux/config
Login to the Web Interface
You should now be able to access the Nagios web interface at the URL below. You'll be prompted for the username (nagiosadmin) and password you specified earlier.
http://localhost/nagios/
h
Permission Error Then#chown nagios.nagiocmd /usr/local/nagios/var/rw
#chmod g+rwx /usr/local/nagios/var/rw
#chmod g+s /usr/local/nagios/var/rw
Configuration Of Nagios
Below line number
# vim /usr/local/nagios/etc/objects/contacts.cfg
30 define contact{
31 contact_name nagiosadmin ; Short name of user
32 use generic-contact ; Inherit default values from generic- contact template (d efined above)
33 alias Nagios Admin ; Full name of user
35 email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS **
36 }
#vim /usr/local/nagios/etc/objects/localhost.cfg
change Below line number
29 host_name pawan.com
30 alias pawan
31 address 192.168.0.55
32 }
49 members pawan.com
You can define monitor services in :-----
#vim /usr/local/nagios/etc/objects/localhost.cfg
For example:- in last line
# Define a service to check FTP on the local machine.
# Disable notifications for this service by default, as not all users may have FTP enabled.
define service{
use local-service ; Inherit default values from a template
host_name pawan.com
service_description ftp
check_command check_ftp
}