Posted in Cloud Computing, Uncategorized

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 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

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 for ServerName

Download the Nagios plugin from

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 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.


Nagios Core Documentation:


Install WildFly on Ubuntu 12.04 LTS and Ubuntu 12.10

WildFly = JBoss

Install JBoss 7.0.2 Application Server on on Ubuntu 12.04 LTS and Ubuntu 12.10 Ubuntu 11.10 or Ubuntu 11.04 or Ubuntu 10.10 or Ubuntu 10.04 LTS

Java – Download Free EBooks and Whitepapers

Application Server vs. Web Server
Application Server vs. Web Server
Application Servers in Java, .net and PHP
Application Servers in Java, .net and PHP

Application Server is a framework that provides execution environment for application written in specific Programming Language.

JBoss is an Open Source Java EE based Application server developed by Redhat which operates on Cross Platform. It supports Servlet Specification 3.3 and JSP specification of 2.2.

JBoss Application Server (Source: JBoss)
JBoss Application Server (Source: JBoss)

Before you install JBoss you’ll want to make sure that you’ve installed Java.

Use Synaptic Package Manager to install Java.

Use Synaptic Package Manager to install Java
Use Synaptic Package Manager to install Java
Synaptic Package Manager installing Java
Synaptic Package Manager installing Java
java -version
java -version
java -version
java -version


JBoss is distributed under LGPL; LGPL is a free software license published by the Free Software Foundation (FSF). It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License.

Red Hat charges to provide a support service for:

  • ·JMS integration
  • ·Java Naming and Directory Interface (JNDI)
  • ·Java Transaction API (JTA)
  • ·Java Authorization Contract for Containers (JACC) integration
  • ·JavaMail
  • ·JavaServer Faces 1.2 (Mojarra)
  • ·Jport subscription for JBoss Enterprise Middleware.


  • ·Java Server Pages
  • ·Java Servlet
  • ·JBoss Web ServicesS
  • ·JDBC
  • ·Load balancing
  • ·Aspect-oriented programming (AOP) support
  • ·Clustering
  • ·Deployment API
  • ·Distributed caching (using JBoss Cache, a standalone product)
  • ·Distributed deployment (farming)
  • ·Enterprise JavaBeans versions 3 and 2.1
  • ·Failover (including sessions)
  • ·Hibernate integration
  • ·Java Authentication and Authorization Service (JAAS)
  • ·Java EE Connector Architecture (JCA) integration
  • ·Java Management Extensions
  • ·Management API
  • ·OSGi framework
  • ·SOAP with Attachments API for Java
  • ·Teiid data virtualization system- Teiid is a data virtualization system that allows applications to use data from multiple, heterogeneous data stores.


Java SE 6 or later


Download JBoss
Download JBoss

Extract the file into usr/share/

Extract files from JBoss Archive
Extract files from JBoss Archive
Extracting files from JBoss Archive
Extracting files from JBoss Archive
Extracted files for JBoss Standalone installation
Extracted files for JBoss Standalone installation

Now, Lets Test it…If we haven’t installed Java then we will get an ERROR.

Java not Found Error in JBoss installation
Java not Found Error in JBoss installation
JBoss Running
JBoss Running

Now lets open Jboss in Web Browser

JBoss Application Server 7
JBoss Application Server 7

Lets Verify the Admin Console

JBoss Application Server 7 Admin Console
JBoss Application Server 7 Admin Console

Start JBoss 7 as a service on Ubuntu

Previous versions of JBoss included a scripts (like that could be copied to /etc/init.d in order to add it as a service – so it would start on boot up. I can’t seem to find any similar scripts in JBoss 7.

If you have copied from other editor or any web page then you will find some unwanted character in the file which will give you error when you will try to run the script.

Error: Bad Interpreter…

Verify Interpreter by “which sh” command in console

Result will be /bin/sh

Then verify the script openining it in VI editor.

Error: JBoss 7 as a service on Ubuntu
Error: JBoss 7 as a service on Ubuntu

Remove all unwanted Characters

JBoss 7 as a service on Ubuntu
JBoss 7 as a service on Ubuntu

Save it

JBoss 7 as a service on Ubuntu - Save Changes
JBoss 7 as a service on Ubuntu – Save Changes

Restart the Machine and try following

Restart JBoss Service
Restart JBoss Service



Posted in AWS, Cloud Computing, Java

Install WildFly on Ubuntu in Amazon EC2 Micro Instance

WildFly == Jboss


JBoss is distributed under LGPL; LGPL is a free software license published by the Free Software Foundation (FSF). It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License.

Java – Download Free EBooks and Whitepapers

  1. Create Amazon Machine Instance (AMI) with Ubuntu server 12.04.01 LTS in AWS Free Usage Tier? ->
  2. Verify whether Java is installed or not. in AWS instance we created, verify it with command java -version
  3. Download
  4. Extract the file into usr/share/
  5. Edit standalone.xml file at /usr/share/jboss-as/standalone/configuration and edit the interface definitions to use address instead of the default.
        <inet-address value=""/>    <inet-address value=""/>


  6. Run from bin
[root@domU-12-31-39-04-9C-B2 jboss-as-7.0.2.Final]# cd bin/[root@domU-12-31-39-04-9C-B2 bin]# ./ Bootstrap EnvironmentJBOSS_HOME: /tmp/jboss-as-7.0.2.FinalJAVA: /usr/lib/jvm/jre/bin/javaJAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true=========================================================================15:15:21,489 INFO  [org.jboss.modules] JBoss Modules version 1.0.2.GA15:15:21,910 INFO  [org.jboss.msc] JBoss MSC version 1.0.1.GA

15:15:21,975 INFO  [] JBoss AS 7.0.2.Final “Arc” starting

15:15:23,444 WARN  [] No security realm defined for native management service, all access will be unrestricted.

15:15:23,464 INFO  [] creating http management service using network interface (management) port (9990)

15:15:23,467 WARN  [] No security realm defined for http management service, all access will be unrestricted.

15:15:23,481 INFO  [] Removing bootstrap log handlers

15:15:23,497 INFO  [] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)

15:15:23,511 INFO  [] (Controller Boot Thread) Activating Infinispan subsystem.

15:15:23,660 INFO  [] (Controller Boot Thread) JBAS011800: Activating Naming Subsystem

15:15:23,672 INFO  [] (MSC service thread 1-1) JBAS011802: Starting Naming Service

15:15:23,681 INFO  [] (Controller Boot Thread) JBAS011910: Activating OSGi Subsystem

15:15:23,722 INFO  [] (Controller Boot Thread) Activating Security Subsystem

15:15:23,726 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.2.0.Beta2

15:15:23,785 INFO  [org.xnio] (MSC service thread 1-1) XNIO Version 3.0.0.Beta3

15:15:23,823 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.0.0.Beta3

15:15:24,149 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-1) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-

15:15:24,204 INFO  [] (MSC service thread 1-2) Listening on /

15:15:24,212 INFO  [] (Controller Boot Thread) Activating EE subsystem

15:15:24,501 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http–

15:15:24,502 INFO  [] (MSC service thread 1-1) Starting remote JMX connector

15:15:24,735 INFO  [] (MSC service thread 1-2) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)

15:15:24,966 INFO  [] (MSC service thread 1-1) Bound data source [java:jboss/datasources/ExampleDS]

15:15:25,893 INFO  [] (MSC service thread 1-2) Started FileSystemDeploymentService for directory /tmp/jboss-as-7.0.2.Final/standalone/deployments

15:15:25,921 INFO  [] (Controller Boot Thread) JBoss AS 7.0.2.Final “Arc” started in 4812ms – Started 93 of 148 services (55 services are passive or on-demand)