Install OpenNMS Network Monitoring in Debian and Ubuntu (2024)

OpenNMS (Open Network Management System) is a free and open source, scalable, extensible, enterprise-grade and cross-platform Java-based network management platform was designed to monitor critical services on remote machines and gathers the information of remote hosts data by using SNMP and JMX (Java Management Extensions).

Read Also: Install OpenNMS Network Monitoring Tool in CentOS/RHEL 7

OpenNMS runs on Linux and Windows operating systems and comes with a web-based console for easily administering networks and applications, supported by a Postgres database management system in the backend.

OpenNMS Requirements

  • Debian 9 or higher, Ubuntu 16.04 LTS or higher
  • Installed OpenJDK 11 Development Kit
  • 2 CPU, 2 GB RAM, 20 GB disk

In this article, we will explain how to install and setup the latest OpenNMS Horizon network service monitoring software in Debian and Ubuntu Linux distributions.

Step1: Installing Java – OpenJDK 11 in Ubuntu

First, install the most recent version of OpenJDK Java 11 using the following apt command.

$ sudo apt-get install openjdk-11-jdk

Next, verify the version of Java installed on your system.

$ java -version
Install OpenNMS Network Monitoring in Debian and Ubuntu (1)

Then set the Java environment variable for all users on boot time, by adding the following line in /etc/profile file.

export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64

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

$ source /etc/profile

Step 2: Install OpenNMS Horizon in Ubuntu

To install OpenNMS Horizon, add the apt repository in /etc/apt/sources.list.d/opennms.list and add GPG key, then update the APT cache using the following commands.

$ cat << EOF | sudo tee /etc/apt/sources.list.d/opennms.listdeb https://debian.opennms.org stable maindeb-src https://debian.opennms.org stable mainEOF$ wget -O - https://debian.opennms.org/OPENNMS-GPG-KEY | apt-key add -$ apt update

Next, install OpenNMS Horizon meta-packages (opennms-core and opennms-webapp-jetty) with all built-in dependencies (jicmp6 and jicmp, postgresql and postgresql-libs).

$ sudo apt install opennms

Then verify that the OpenNMS meta packages have been installed in the /usr/share/opennms directory using the tree utility.

$ cd /usr/share/opennms$ tree -L 1
Install OpenNMS Network Monitoring in Debian and Ubuntu (2)

Note: It is recommended to disable the OpenNMS Horizon apt repository after installation to prevent upgrades while it is running:

$ sudo apt-mark hold libopennms-java libopennmsdeps-java opennms-common opennms-db

Step 3: Initialize and Setup PostgreSQL

On Debian and Ubuntu, immediately after installing the packages, the installer initializes Postgres database, starts the service and enables it to auto-start at system boot.

To check if the service is up and running, run the following command:

$ sudo systemctl status postgresql
Install OpenNMS Network Monitoring in Debian and Ubuntu (3)

Next, switch to the postgres user account and create an opennms database user with a password.

$ sudo su - postgres$ createuser -P opennms$ createdb -O opennms opennms
Install OpenNMS Network Monitoring in Debian and Ubuntu (4)

Now secure the postgres default/superuser account by setting a password.

$ psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"
Install OpenNMS Network Monitoring in Debian and Ubuntu (5)

At this stage, you need to set up the database access in OpenNMS Horizon configuration file.

$ sudo vim /usr/share/opennms/etc/opennms-datasources.xml

Find the sections below and set credentials to access the PostgreSQL database:

<jdbc-data-source name="opennms" database-name="opennms" class-name="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/opennms" user-name="opennms-db-username" password="opennms-db-user-passwd” /><jdbc-data-source name="opennms-admin" database-name="template1" class-name="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/template1" user-name="postgres" password="postgres-super-user-passwd" />
Install OpenNMS Network Monitoring in Debian and Ubuntu (6)

Save the changes in the file and close it.

Step 4: Initialize and start OpenNMS Horizon

To initialize OpenNMS, you need to intergrate it with Java. So, run the following command to detect the Java environment and persist in /usr/share/opennms/etc/java.conf configuration file.

$ sudo /usr/share/opennms/bin/runjava -s
Install OpenNMS Network Monitoring in Debian and Ubuntu (7)

Next, you need to initialize the database and detect system libraries persisted in /opt/opennms/etc/libraries.properties by running the OpenNMS installer.

$ sudo /usr/share/opennms/bin/install -dis
Install OpenNMS Network Monitoring in Debian and Ubuntu (8)

Now start OpenNMS service via systemd for now, then enable it to auto-start at system startup and check its status with these commands.

$ sudo systemctl start opennms$ sudo systemctl enable opennms$ sudo systemctl status opennms
Install OpenNMS Network Monitoring in Debian and Ubuntu (9)

If you have a UFW firewall running on your system, you need to open the port 8980 in your firewall.

$ sudo ufw allow 8980/tcp$ sudo ufw reload

Step 5: Access OpenNMS Web Console and Login

Now open a web browser and point it to the following URL to access the OpenNMS web console.

http://SERVER_IP:8980/opennmsOR http://FDQN-OF-YOUR-SERVER:8980/opennms

After the login interface shows up as shown in the following image, use the default login credentials: username is admin and the password is admin.

Install OpenNMS Network Monitoring in Debian and Ubuntu (10)

Once you have successfully logged on for the first time, you will access the admin dashboard.

Install OpenNMS Network Monitoring in Debian and Ubuntu (11)

Next, you need to change the default admin password by going to the main navigation menu, click “adminChange Password, under User Account Self-Service, click “Change Password“.

Enter the current/default password, set a new password and confirm it, then Click “Submit“. Afterwards logout and login with your new password.

Finally, learn how to set up, configure, and maintain an OpenNMS Horizon via the web interface, add nodes and application by consulting the OpenNMS Administrators Guide.

Read Also: How to Add Hosts in OpenNMS Monitoring Server

OpenNMS is an enterprise-grade network and application monitoring tool. As usual, reach us through the feedback form below for any questions or comments about this article.

Install OpenNMS Network Monitoring in Debian and Ubuntu (2024)
Top Articles
Latest Posts
Article information

Author: Duane Harber

Last Updated:

Views: 5471

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duane Harber

Birthday: 1999-10-17

Address: Apt. 404 9899 Magnolia Roads, Port Royceville, ID 78186

Phone: +186911129794335

Job: Human Hospitality Planner

Hobby: Listening to music, Orienteering, Knapping, Dance, Mountain biking, Fishing, Pottery

Introduction: My name is Duane Harber, I am a modern, clever, handsome, fair, agreeable, inexpensive, beautiful person who loves writing and wants to share my knowledge and understanding with you.