OpenNMS Quick Start Guide

Quick Installation, Configuration and Test Drive

Steve Giles

Marshall Christy

2001


Table of Contents

Preface
1. Chapter 1
1.1. Minimum Requirements
2. Chapter 2
2.1. Uninstalling Preconfigured Software
2.2. JAVA
3. Chapter 3
3.1. Directory Structure
3.2. Installing OpenNMS from the Web Installer
3.3. Post installation
4. Chapter 4
4.1. Adding Addresses
4.2. Other Configurations
5. Chapter 5
5.1. Starting OpenNMS
5.2. Viewing the Network

List of Tables

1.1. Guide Requirements
3.1. Installation Directories

Preface

Acknowledgments and Copyrights

Copyrights.  The following copyrights are relevant to OpenNMS code or documentation:

  • Copyright (c) 2002 Sortova Consulting Group, Inc. All rights reserved.

  • Copyright (c) 1999-2001 Oculan Corp. All rights reserved.

  • Copyright (c) 1996-2001 PostgreSQL, Inc.

  • Copyright (c) 1994 Regents of California, Inc.

  • Copyright (c) 1994-2001 Sun Microsystems, Inc

  • Copyright (c) 1994-2001 IBM Corporation

  • Copyright (c) 2001 Microsoft Corporation

  • Copyright (c) 2001 Netscape

  • Copyright (c) 2001 Red Hat, Inc.

  • Copyright (c) 1999-2001 ExoLab Group

  • Copyright (c) 1999-2001 Apache Software Foundation

  • Copyright (c) 1998-2001 The Mozilla Organization

Useful links for information.  The following URLs are relevant to OpenNMS code or documentation:

Chapter 1. Chapter 1

Minimum Requirements

Table of Contents

1.1. Minimum Requirements

Minimum Requirements

Warning: This document is deprecated and refers to old code. A new document is being developed, but for now the best source of information can be found on Sourceforge. This document may be wrong on a number of important issues, and it will definitely waste your time.

For purposes of this guide, requirements are very specific. While actual requirements may vary, this document's purpose is to guide a user installing and configuring quickly.

Table 1.1.  Guide Requirements

ResourceMinimum RequirementAvailable Resources
OpenNMS Installation Media/FileVersion 1.0.0 or greaterwww.OpenNMS.org
Linux Op SystemRedhat Linuxwww.redhat.com
JAVA Virtual Machine (JVM)Version 1.4 or greaterjava.sun.com
Free Disk Space25Mb (+8Mb/SNMP Device) in /opt, 25Mb in /tmp 
Free Memory192 MB available (256 suggested) 

Chapter 2. Chapter 2

Configuring Dependencies

For purposes of this quick start guide, it is assumed that the web installer will be installing and configuring most of your dependencies. you may want to make sure that some packages are not installed prior to beginning the web installer, in order to insure correct configuration.

Uninstalling Preconfigured Software

If you would like to install and configure dependency software on your machine, you may want to use the OpenNMS Installation Guide. Otherwise we will begin by checking for already installed software that may not be configured to run with OpenNMS.

The packages we need to insure are not already installed are listed below, along with a command line to test whether or not the RPMs are currently installed.

	PostgreSQL         # rpm -qa | grep -i postgres
	Tomcat             # rpm -qa | grep -i tomcat
	RRDTool            # rpm -qa | grep -i rrdtool
	OpenNMS            # rpm -qa | grep -i opennms
		

JAVA

The JDK package is necessary for building from source and for running OpenNMS with the Tomcat web interface, because the compiler components of the JDK are used to turn JSP web pages into Java at runtime. The environment variable JAVA_HOME should be set to /usr/java/j2sdk1.4.0 or the directory where it was installed.

Chapter 3. Chapter 3

Installation

Directory Structure

When installed, OpenNMS defaults to the following directories:

Table 3.1. Installation Directories

LocationDirectory
OpenNMS Binaries/opt/OpenNMS/
OpenNMS Config Files/opt/OpenNMS/etc/
SQL Libraries/usr/lib/pgsql/opennms/
Boot script/etc/rc.d/init.d/opennms
Database Store/var/

Installing OpenNMS from the Web Installer

To install or upgrade on a supported RPM platform, run, as root:

	lynx -source http://install.opennms.org | sh
		

NOTE: It has been noticed that in some cases, the install script will "hang" after it has completed installing the OpenNMS RPMs. The only thing left to be done at this point is to install the documentation. If you notice this condition during your install you can safely use <ctrl>C to break out of the script.

At that point you can either run the script again, and the documentation will be installed, or simply verify that OpenNMS was installed by typing ...

	rpm -qa | grep -i opennms
			

Post installation

After installing OpenNMS using the web installer, you will need to log out and log back in as root, this will allow the setup of important environment environment variables. Possibly the most important of these being $OPENNMS_HOME which will be set to /opt/OpenNMS by default.

Chapter 4. Chapter 4

Configuring OpenNMS

Adding Addresses

Next we must define address(es) to be polled and service(s) to be monitored. The configuration files for OpenNMS are in the $OPENNMS_HOME/etcdirectory. These files can be edited with vi or most any other *nix text editor. Most of the files in the etc directory are in XML format, and should be fairly intuitive. (This is strictly a matter of opinion though I guess.)

The first task is assigning addresses. We will start by setting up a discovery range. This is done in discovery-configuration.xml, and should look similar to the following ...

	<include-range retries="2" timeout="3000">
	<begin>192.168.0.1</begin>
	<end>192.168.0.254</end>
	</include-range>
			

Next we want to ensure that the pollers are aware of this range of addresses. This is done in poller-configuration.xml.

	<include-range begin="192.168.0.1" end="192.168.0.254"/>
			

Note: you may also want to ensure that your network has a management-policy of managed in capsd-configuration.xml. Default configuration is managed for all non-local, valid ip addresses.

Other Configurations

There are many other files in the etc directory that you may wish to make changes to, in order to achieve your desired results. Some of the more common things you may want to configure are as follows.

snmp-config.xml. set snmp community strings

log4j.properties. change default logging levels

views.xml + viewsdisplay.xml. change default catagories and display properties

Chapter 5. Chapter 5

Viewing the Network

Starting OpenNMS

Make sure you remembered to start the necessary dependencies.

	/sbin/service postgresql start 
		

After those dependencies are started, you can start OpenNMS

	/sbin/service opennms start
		or
	/opt/OpenNMS/bin/opennms.sh start
		

You will also want to ensure that the tomcat server is running.

	/sbin/service tomcat4 start
		

You can check the status of OpenNMS using the following command.

	# /opt/OpenNMS/bin/opennms.sh status
	OpenNMS.Poller                          : running
	OpenNMS.Eventd                          : running
	OpenNMS.OutageManager                   : running
	OpenNMS.Discovery                       : running
	OpenNMS.Actiond                         : running
	OpenNMS.Capsd                           : running
	OpenNMS.Dhcpd                           : running
	OpenNMS.Notifd                          : running
	OpenNMS.RTCViewCategoryManager          : running
	OpenNMS.Trapd                           : running
			

If there are any problems or services are not starting correctly, you can check the logs for more information. The log files are located in /var/log/opennms/

NOTE: If you need to stop the current OpenNMS processes you can use one of the following commands.

	/opt/OpenNMS/bin/opennms.sh stop
	/opt/OpenNMS/bin/opennms.sh kill
			

Viewing the Network

Once everything is started, you can, in your web browser, go to the following address.

	http://127.0.0.1:8080/opennms/
		

login: admin/admin

After logging in you will be directed to the main OpenNMS view of your network. Although most browsers will work, only the following are officially supported... for Linux: Netscape 4.7+, Netscape 6+, Mozilla 0.8+ and for Windows: Netscape 4.7+, Netscape 6+, IE 5.5+