How to Install and Configure OpenNMS on Ubuntu 18.04

Install OpenNMS Ubuntu
In this article, I'll explain a simple method to install and configure OpenNMS on our Ubuntu 18.04 systems. OpenNMS is a highly integrated, open-source, and enterprise-grade network management system that can be used to monitor and manage numerous devices from a single instance.  This keeps you up to date on what's happening with your network by periodically checking all services available, isolating problems, collecting performance information, and performing actions that can help to resolve outages.

Currently, there are two distributions of OpenNMS available namely Horizon and Meridian. The Meridian is meant for companies and businesses who are looking for stability and long-term support. On the other hand, Horizon is designed for monitoring and managing new technologies and IT environments. Both these distributions are open-source software.

OpenNMS Key Features:

  • Automatic acknowledgment of self-clearing problems
  • Provisioning
  • Supports all Popular OS distributions like Windows, Linux/Unix, Mac and Solaris
  • Service Monitoring
  • Event Management
  • Performance Measurement
  • Charting support

Pre-requisites

  • A well-configured freshly installed Ubuntu 18.04 system with root privileges and a proper hostname with Static IP.
  • Java: 8 or above
  • PostgreSQL: 9.3+

Let's begin with our installation stages one by one.

Step 1: Update your System

Before starting the installation, I would recommend updating your system software with the latest available versions. You can do this by running these commands below:

#apt-get update -y
#apt-get upgrade -y

Step 2: Download and Install OpenNMS

In this step, we will download a bootstrap script to install OpenNMS on Debian/Ubuntu systems. The script executes all the steps for this software installation automatically as listed below:

  • Oracle Java 8 JDK Installation
  • PostgreSQL Server installation and Setup
  • Build OpenNMS Repositories
  • Installing OpenNMS with core services and Web application
  • Initialize and bootstrapping the database
  • Start OpenNMS

You can download and extract the OpenNMS installer from Github and execute the bootstrap-debian.sh script to carry out our installation.

# wget https://github.com/opennms-forge/opennms-install/archive/master.zip
# unzip master.zip
Archive: master.zip
33e5138d33912a5ce9faf260a411cc7a20e44ead
creating: opennms-install-master/
extracting: opennms-install-master/.gitignore
inflating: opennms-install-master/LICENSE
inflating: opennms-install-master/README.adoc
inflating: opennms-install-master/bootstrap-debian-dev.sh
inflating: opennms-install-master/bootstrap-debian.sh
inflating: opennms-install-master/bootstrap-yum.sh

# cd opennms-install-master/
# bash bootstrap-debian.sh

The installer takes you through various interactive sections with yes or no questions and configuration windows while proceeding with the installation. It is quite self-explanatory and easy to understand. Initially, it will provide you with an overview of the tasks which the script performs and will ask your confirmation to proceed with the installation.

#bash bootstrap-debian.sh
This script installs OpenNMS on your system. It will
install all components necessary to run OpenNMS.

The following components will be installed:

- Oracle Java 8 JDK
- PostgreSQL Server
- OpenNMS Repositories
- OpenNMS with core services and Webapplication
- Initialize and bootstrapping the database
- Start OpenNMS

If you have OpenNMS already installed, don't use this script!

If you get any errors during the install procedure please visit the
bootstrap.log where you can find detailed error messages for
diagnose and bug reporting.

Bugs or enhancements can be reported here:

- https://github.com/opennms-forge/opennms-install/issues -

If you want to proceed, type YES: yes

Starting setup procedure ...

Install OpenNMS Repository ... OK
Install OpenNMS Repository Key ... OK
OK
Update repository ... OK
Install PostgreSQL database ... OK
Start PostgreSQL database ... OK

Enter database username: opennms
Enter database password:*******
Reading package lists... Done
Building dependency tree
Reading state information... Done

Once we proceed with the installation, it will setup the OpenNMS repository and update the repository packages, then it installs PostgresSQL. After the PostgresSQL installation, it will prompt to enter the OpenNMS database credentials required to proceed. You can enter your OpenNMS DB user/password credentials as required during this setup.

Secondly, it will open up a window to choose the PostgresSQL-postfix gateway configuration for email intimation. You can choose the internet-site and click Ok to proceed further.

Postfix email gateway

Next, we need to enter FQDN hostname of your system and click Ok to proceed as in the screenshot:

mailname setup

After the PostgresSQL setup, it will start with the Java Installation. This will open-up two windows to approve the Licence Agreement to download the Oracle JDK package and proceed with the installation.

java_installer

License Agreement

In the next stage, it will open-up a window to initimate us to run the OpenNMS installer script located at /usr/share/opennms/bin/install manually to configure the OpenNMS-database as in the screenshot. You can click ok to complete the installation.

opennms_installer

Once the component installations are complete. It will start and enable the OpenNMS service automatically and report about the successful installation.

Congratulations
---------------

OpenNMS is up and running. You can access the web application with

http://this-systems-ip:8980

Login with username admin and password admin

Please change immediately the password for your admin user!
Select in the main navigation "Admin" and go to "Change Password"

Thank you computing with us.

Finally, to complete the installation we need to proceed with configuring OpenNMS database as stated before by manually running the installer script located at  /usr/share/opennms/bin/install as below:

# /usr/share/opennms/bin/install -dis
==============================================================================
OpenNMS Installer
==============================================================================

Configures PostgreSQL tables, users, and other miscellaneous settings.

This script will automatically configure and upgrade the database tables, users and all other settings as required.

Step 3: Access OpenNMS

Now you can point your browser to http://Server-IP or Hostname:8980 to access the OpenNMS Web interface.

OpenNMS Web login Console

There you can enter the default admin credentials to log in as below:

User: admin
Password: admin

OpenNMS Web Console

Change Default Password

For security reasons, I'll advise modifying your default password soon after login. You can select the Change password option from the drop-down by clicking the Admin tab.

Choose Change password

Change Password

You can enter the current password and your new password as in the screenshot and click submit to modify your password.

Adding a New Node

Now, let's see how to add a new node to our Monitoring system. You need to navigate through the path Admin >> Quick Add Node button. It will open up a window to enter the Node details as in the screenshot.

Add Node

You can enter all the required information like, Requisition, IP Address, Node Label, Community string, Device username, Device password, then click on Provision button. Now, click Ok to continue. Finally, you can navigate through the tab Info >> Nodes and see our added node status. You can click on the label button to view the node status, notification, and events in the following screen:

Node OpenNMS Web Console

Read Also:

Congratulations! you have successfully installed and configured OpenNMS in your latest Ubuntu18.04 system. Now you can add more nodes to your network monitoring solution. I hope this article is informative and useful to you. Please post your valuable comments and suggestions on this.

Saheetha Shameer 2:37 am

About Saheetha Shameer

Self-motivated and dedicated Linux Administrator having 10 years of working experience on various web-hosting control panels and Unix distributions. I'm a quick learner and have a slight inclination towards following the current and emerging trends in the industry. I'm passionate about testing/reviewing new Linux applications and open source tools.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.