On this page

  1. OpenNMS
    1. Examples



OpenNMS is an opensource enterprise network management tool. It helps network administrators to monitor critical services on remote machines and collects the information of remote nodes by using SNMP. OpenNMS has a very active community, where you can register yourself to discuss your problems. Normally OpenNMS installation and configuration takes time, but I have tried to cover the installation and configuration part in a few steps.

OpenNMS provides the following features.

ICMP Auto Discovery
SNMP Capability Checking
ICMP polling for interface availability
HTTP, SMTP, DNS and FTP polling for service availability
Fully distributed client server architecture
JAVA Real-time console to allow moment-to-moment status of the network
XML using XSL style web access and reporting
Business View partitioning of the network using policies and rules
Graphical rule builder to allow graphical drag/drag relationships to be built
JAVA configuration panels
Redundant and overlapping pollers and master station
Repeating and One-time calendaring for scheduled downtime

The source code of OpenNMS is available for download from sourceforge.net. A production release (stable) and a development release (unstable), I have used 1.2.7 stable release in this howto. I have tested this configuration with Redhat/Fedora, Suse, Slackware, Debian and it works smoothly. I am assuming that readers already have Linux background. You can use the following configuration for other distributions too. Before you start OpenNMS installation, you need to install following packages:

tomcat 4.*
postgres 8.*


Download jdk1.5* from www.sun.com and unpack it with following command.


After unpacking, you will have a directory named jdk1.5*, Rename it to java directory and move it to /usr/lib.


mv jdk.* java

mv java /usr/lib/

Setup Environment variable for java home. Insert the following entries in /etc/profile.

export JAVA_HOME

save the file then exit and run the command to read /etc/profile.

source /etc/profile

Tomcat 4.*

Download tomcat 4.* from tomcat.apache.org and extract it from archive zip/tar.gz.

Rename tomcat.* to tomcat and then move it to /opt folder.

mv tomcat.* /opt/tomcat

Setup Environment variable for tomcat home. Insert the following entries in /etc/profile.


Save the file then exit and run the command to read /etc/profile.

source /etc/profile

Postgres 8.*

Download stable version of Postgresql from www.postgresql.org and extract it from archives bz2/tar.gz.

go into postgresql* directory and run the following script.

./configure --prefix=/opt/pgsql

In our installion, /opt/pgsql is the destination directory for postgresql installation.

Now start the installation of postgresql with following command.

make install

After this process, add a user to manage postgresql and define home directory /opt/pqsql/ for this user.

adduser postgres

You need to create a directory called "data" into /opt/pqsql, where you can store your data and assign it following permission.

mkdir /opt/pgsql/data
chown postgres /opt/pgsql/data

Switch user to postgres

su - postgres

Now you need to initialize your postgres databases.

$bin/initdb -D data/

Setup Environment variable for postgres home. Insert the following entries in /etc/profile.


Save the file then exit and run the command to read /etc/profile.

source /etc/profile


You can download rrdtool from http://rrdtool.paracoda.com/download.en.html untar the files from tarball. And run the following commands.

tar xzvf rrdtool1.2*.tar.gz
cd rrdtool*
./configure --prefix=/usr/local/rrdtool ; make ; make install

When you run configure script, it may ask to install cgilib, if you don't have cgilib on your system, download cgilib from sourceforge.net and install it.

Then run the above commands again to install rrdtool.

Setup Environment variable for rrdtool home. Insert the following entries in /etc/profile.


Save the file then exit and run the command to read /etc/profile.

source /etc/profile


Now we will install OpenNMS.

Download OpenNMS 1.2.* source code from www.opennms.org (i had used 1.2.7 version during configuration). untar it.

tar xzvf opennms-source-1.2.*.tar.gz

Rename opennms-1.2.* to opennms directory.

mv opennms-1.2.* opennms

Go into OpenNMS directory and create a file named build.properties.

Add following lines in the build.properties file.


Save the file and exit

Now you can run following command to install opennms

sh build.sh install

If installation process returns errors and asks to define the path for rrdtool, then you will have to put following entries in the build.properties file.

build.rrdtool.include.dir="add here include directory path for rrdtool without double quotes"
build.rrdtool.lib.dir="add here lib directory path for rrdtool without double quotes"
build.rrdtool.bin="add here binary path for rrdtool without double quotes"

Save the file and exit

Run the following command again

sh build.sh install

It will take time to complete installation process.

Setup Environment variable for OpenNMS home. Insert the following entries in /etc/profile.


Save the file then exit and run the command to read /etc/profile

source /etc/profile

Checking perl modules

Go into /opt/opennms/bin directory and run all *.pl scripts with perl command to check for the missing modules. if any of these *.pl scripts returns a error for missing module then install its module with cpan.

Configure OpenNMS

Run the following commands to configure OpenNMS.

$OPENNMS_HOME/bin/runjava -s #This command will search jre
$OPENNMS_HOME/bin/runjava -S "path to JRE without quotes" #Define your path for jre

Now run following command to create OpenNMS database and make sure postgres service is running.

$OPENNMS_HOME/bin/install -disU #This command will setup postgresql database for opennms

$OPENNMS_HOME/bin/install -y -w $CATALINA_HOME/webapps -W \ $CATALINA_HOME/server/lib #This command will setup the web application

Configure auto discovery

Go into following directory, open the discovery-configuration.xml with vi and add your ip range in begin and end tags.

vi discovery-configuration.xml

Save the file and exit

Final Steps

Run the following commands to start services.

sudo -u postgres /opt/pgsql/bin/pg_ctl -D /opt/pgsql/data -l /opt/pgsql/logfile\ start
$OPENNMS_HOME/bin/opennms start

Now you can login to main page of OpenNMS in your browser.


Use user name "admin" and password "admin" to logging to main page.

Written by Saad Khan

Share this page:

10 Comment(s)

Add comment


From: Anonymous

Thank you for the writeup, very informative. 

How well does OpenNMS perform in a largish environment? I am currently monitoring 38793  data sources on 315 hosts stored in 13285 rrd files using cacti. The poller runs every minute and averages 25 second run time. I was also curious how OpenNMS compared in ease of maintenance and administration.



From: saad khan

According to http://www.opennms.org/index.php/FAQ-About, it claims that, they have people using openNMS to monitore 80,000 devices, and have a look at following link, its a old report, but can be useful for you.


it says, openNMS can monitor up to 20,000 devices from a single instance.

From: Anonymous

This is great tutorial. I believe it should be on homepage

Please add your diggs

From: Anonymous

A link to the OpenNMS website would be nice ;)

http://www.opennms.org  from what I can see :)



These instructions are pretty out of date, and a ton of work has gone into packaging OpenNMS for most major distributions.

 Please do yourself a favor and check out the OpenNMS web site at http://www.opennms.org/ and see if the download instructions are appropriate for your distribution before attempting to build from source.

 Also keep in mind that while 1.5.9x is still technically unstable, it is at least as stable as the 1.2.x series, and is recommended for new installs.

From: Anonymous

Hi ,

Can any one suggest me from which site I can downlaod opnsnmp tar ball.



From: Anonymous

I think Zabbix is better in terms of easy of installation and also features.

From: BG

Yet another article about how to build (or configure, in your terms) OpenNMS. The 'official' documentation was OK in the first place.

How about an article that explains how to configure OpenNMS, i.e. how to set individual triggers and notification methods for each interface. Such 'official' documentation doesn't exist after all !

From: SKoti

Do you have articles setting up OpenNMS version 1.12.1 using "Source" Package?


From: Muhammad Aqeel


could any body tell me how to display the snmp parameters of a specific node in an excell sheet which should be able to update the values by fetching them from postgresql database of opennms.?