Nagios Cloud Monitotring


Nagios Cloud Monitotring
Computer Network, Network Monitoring and Management

Figure 1: Computer Network, Network Monitoring and Management

Computers connected with communication channels shares resources and information with each other. Network monitoring supervises all or specific operations of computer network using various network monitoring products. It ensures performance and availability of network services by identifying and reporting failures of network services. Network management refers to the actions, procedures, and tools that are related to keeping network services up and running, keeping track of resources, performing upgrades, and configuring resources of networked systems. Network Management is a superset of network monitoring term.

In this article our focus will be on open source network monitoring and infrastructure monitoring tool known as Nagios. It provides monitoring and reporting for network services such as HTTP, SMTP, SSH, and FTP; host resources such as logs, storage and processor usage. It monitors IT infrastructure, detect the problems before they occur and alerts the stockholders. Web based GUI is available. It is also used to monitor publicly available services. It is very useful for SMBs.

Effective usage of it ensures issue tracking within timely manner; SLAs, which are very critical in today’s dynamic IT world, can be met effectively and it ensures that outages will have minimal effect on organization’s IT infrastructure as it monitors infrastructure extensively.

Nagios Core

Nagios Core is an open source, infrastructure monitoring system that enables organizations to identify IT infrastructure problems before they have an effect on critical business processes.

Nagios Core provides base for Nagios XI – commercial monitoring solution.

Nagios Core allows to monitor your entire IT infrastructure to ensure IT resources, applications, services, and business processes are functioning appropriately. In the event of a failure, it can alert technical staff of the problem in timely manner which allows them to commence remediation processes before outages affect business processes, end-users, or customers. It is licensed under GNU General Public License.

How it works?

How Nagios Works

Figure 2 – How it Works?

Features

Features of Nagios

Figure 3 – Features

It can empower IT organizations and Cloud Service Providers to identify and resolve issues in a way that outages have minimal impact on IT infrastructure and processes. It provides extensive and detailed monitoring of IT resources, detection of outages, deep visibility into entire infrastructure and detailed report on the status of resources, services and other components. Availability reports, Historical reports and third party addons help into getting insight whether SLAs are being met effectively or not.

Multiple online resources are available which can be useful to the users; support forum, Support portal, and Community mailing lists is also very useful.

Comparison with IBM Tivoli Network Manager and Nimsoft Monitoring Solution

  Nagios Nimsoft Monitoring Solution IBM Tivoli Network Manager
Trend Prediction No Yes Yes
Auto Discovery Plug-in Yes Yes
Syslog Plug-in Yes Yes
Distributed Monitoring Yes Yes Yes
Data Storage Flat file,SQL SQLServer,Oracle MySQL,Oracle Database,DB2
Access Control Yes Yes Yes
License GPL Commercial Commercial

Use Cases

ISPs, Government agencies, Health care, Manufacturing, and financial institutions can use it effectively for network monitoring.

Banking and Finance Industry

It is desirable to have networking monitoring product which is easy to setup, configure and maintain. It must monitor different kind of devices and multiple platforms within adequate budget. Banking and financial industry deals with critical, time bound and monetary transactions which should be made available to customers all the time. Its alerting capabilities help banking and finance industries to decrease the downtime of various services within adequate budget due to its open source availability.

Telecommunication Industry

Telecommunication providers who use various application and system resources monitored by various network monitoring systems can use it to provide deep insight into the complex IT infrastructure. By using single solution in the form of Nagios, operational efficiency and cost benefits can be achieved.

Monitor openSUSE Virtual Machine

To run a Nagios core, you need a machine running Linux or Unix variant, Network accessibility as basic prerequisite.

We can use VMware workstation or VMware Player to create virtual machine; In fact any other product can be used also. Install openSUSE 12.2 operating system on the virtual machine as we will use that linux variant in the below steps. Insert openSuse 12.2 DVD and from VMware workstation, go to Edit Settings of that virtual machine to connect to the openSUSE DVD.

Prerequisite packages:

  • C/C++ development libraries
  • php5
  • apache2
  • apache2-mod_php5

We will use Zypper command to install prerequisite packages. Zypper is a command line package manager.  It uses libzypp and provides functions such as repository access, and package installation. Zypper RPM packages are by default available on standard openSUSE installation media and need not to install the packages manually. It can be used to install/remove/update packages or patches, and plain rpm files; it also provides detailed installation summary.

To install C/C++ development libraries:

zypper install kernel-source make gcc gcc-c++

To install other packages:

zypper install rrdtool php5 php5-gd php5-zlib apache2-mod_php5 perl-SNMP net-snmp-32bit nmap ncpfs libwavpack1 apache2

Download open source  http://www.nagios.org/download/

Nagios XI is a commercial version built on Nagios core; its pre-build packages are available on the its website. VMware virtual machine, vSphere OVF, Microsoft virtual machine and source installer is available.

Login with root, create user, change password and add a group.

linux-5vhd:/home/mitesh # /usr/sbin/useradd -m nagios

linux-5vhd:/home/mitesh # passwd nagios

Changing password for nagios.

New Password:

Password changed.

Add gorup nagcmd

sudo groupadd nagcmd

sudo groupadd Nagios

Add users nagios in group nagcmd  and  nagios  group

sudo usermod  -G nagcmd Nagios

Extract the Nagios core tar file; cd the the extracted folder and execute following commad:

sudo ./configure -with-command-group=nagcmd

Sudo make all

Successful execution will end with “Enjoy!” message.

Installs the init script in /etc/rc.d

linux-5vhd:/home/nagios # sudo make install-init

/usr/bin/install -c -m 755 -d -o root -g root /etc/rc.d

/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/rc.d/nagios

*** Init script installed ***

Installs sample config files in /usr/local/nagios/etc

sudo make install-config

Installs and configures permissions on the directory

linux-5vhd:/home/nagios # sudo make install-commandmode

/usr/bin/install -c -m 775 -o nagios -g nagcmd -d /usr/local/nagios/var/rw

chmod g+s /usr/local/nagios/var/rw

*** External command directory configured ***

Configure Nagios for apache

linux-5vhd:/home/nagios # sudo make install-webconf

/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/conf.d/nagios.conf

*** Nagios/Apache conf file installed ***

Make a webadmin password for  nagios  admin

linux-5vhd:/home/nagios # htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

New password: (admin)

Re-type new password:

Adding password for user nagiosadmin

Restart Apache

linux-5vhd:/home/nagios # sudo /etc/init.d/apache2 restart

redirecting to systemctl

linux-5vhd:/home/nagios # service apache2 status

apache2.service – apache

Loaded: loaded (/lib/systemd/system/apache2.service; disabled)

Active: active (running) since Tue, 06 Nov 2012 01:18:16 +0530; 1min 47s ago

Process: 18724 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=0/SUCCESS)

Main PID: 18743 (httpd2-prefork)

CGroup: name=systemd:/system/apache2.service

├ 18743 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start

├ 18744 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start

├ 18745 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start

├ 18746 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start

├ 18747 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start

└ 18748 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start

Nov 06 01:18:04 linux-5vhd start_apache2[18724]: httpd2-prefork: apr_sockaddr_info_get() failed for linux-5vhd

Nov 06 01:18:04 linux-5vhd start_apache2[18724]: httpd2-prefork: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

Download the Nagios plugin from http://www.nagios.org/download/plugins/

Extract the file

cd nagios-plugins-1.4.15

sudo ./configure –with-user=nagios –with-group=nagcmd

sudo make

Wait for 10-15 minutes approximately – Checking of various parameters until the command finishes the execution.

sudo make install

Add Nagios to the list of system services to make it automatically start when the system starts.

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

Open Browser and Access http://localhost/nagios

Nagios Web Interface

Figure 4 – Nagios Web Interface

Network Outage details from Nagios

Nagios Web Interface - Tactical Monitoring Overview

Figure 5 – Nagios Web Interface – Tactical Monitoring Overview

Current Network Status

Current Network Status

Figure 6 – Current Network Status

Alert History in Nagios Web Interface

Alert History

Figure 7 – Alert History

Verify Performance information.

Performance Information

Figure 8 – Performance Information

Information on Scheduling Queues

Check Scheduling Queues

Figure 9 – Check Scheduling Queues

Nagios Checker-Mozilla Firefox add-ons for Nagios

Mozilla Firefox add-ons for Nagios provide status bar display to provide information on the status of resources from Nagios. Nagios web interface information is parsed and information is made available to the indicator. Add-on has been successfully verified with Nagios 3, 2.5+, 2.0b4, 1.5, 1.3 and 1.2.

Add the Nagios Checker from https://addons.mozilla.org/en-US/firefox/addon/nagios-checker/ to Firefox. Restart Firefox. Right click on the “N” sign in status bar and click on settings option. Provide Nagios web URL, Username and Password.

 Nagios Checker Settings - Web Interface

Figure 10 – Nagios Checker Settings – Web Interface

Provide Static Script URL.

Nagios Checker Settings - Script URL

Figure 11 – Nagios Checker Settings – Script URL

Click Ok and within seconds, you will be able to see the status provided by Nagios on the status bar.

Nagios Checker Status

Figure 12 – Nagios Checker Status

Cloud Monitoring with nagios

As per NIST’s definition, Cloud computing is a model for enabling

  • Ubiquitous,
  • Convenient,
  • On-demand network access

to a shared pool of    configurable computing resources

  • Networks
  • Servers
  • Storage

that can be rapidly provisioned and de-provisioned with minimal management effort. Virtualization is the core of Cloud Computing considering it provides, Cost saving by reducing upfront investment in infrastructure. In Virtualization, we create multiple virtual environments on a single physical resource by decoupling OS from hardware, create an abstraction between OS and the hardware and optimize resource utilization with the use of virtualization product.

When we say Cloud Monitoring, it is in the context of monitoring resources available in Cloud or provided by Cloud service providers.

In virtual world monitoring of resources is not only necessary but crucial also to provide high availability and fault tolerance, and to avoid single point failure since resources are shared. Monitoring of virtual system is dynamic cince the resources are vitual and can be treated in similar way to files. Reource monitoring for scaling up and scaling down is also critical considering the huge capacity (virtyally unlimited) provided by Cloud service providers.

Public Cloud Monitoring

Cloud monitoring refers to the monitoring of the performance of physical or virtual servers, storage, networks, and the applications running on them. Cloud monitoring tools are employed can collect data and illustrate patterns that might be difficult to spot otherwise in dynamic infrastructure and services provided by Cloud service providers. It used to achieve high availability.

Nagios provides monitoring of Cloud resources; compute, storage and network services. Nagios is proficient of monitoring a variety of servers and operating systems in both physical and virtual environment. We have seen an example where we have used Nagios to monitor virtual machine created in VMware workstation. With Nagios, it is easy to detect Cloud Computing environment issues, detection of network outages and application availability.

Benefits and Limitations

Implementing effective Cloud monitoring with Nagios offers multiple benefits:

  • High Availability: Increased server, services, and application availability
  • Fault Tolerance: Fast detection of network outages
  • SLA compliance: Fast detection of cloud computing environment problems
  • Data availability: Fast detection of storage subsystem problems

Amazon Web Services (AWS) Monitoring

Nagios provides monitoring of Amazon EC2, Amazon Simple Storage Services etc. Nagios solutions that provide Cloud monitoring capabilities and benefits are Nagios XI and Nagios Core.

Reference

http://compnetworking.about.com/od/itinformationtechnology/f/net_monitoring.htm

Nagios Core Documentation: http://nagios.sourceforge.net/docs/nagioscore/3/en/toc.html

http://library.nagios.com/library/products/nagiosxi/manuals

https://addons.mozilla.org/en-US/firefox/addon/nagios-checker/

http://searchenterpriselinux.techtarget.com/definition/Nagios

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s