How To Set up OpenNMS on Ubuntu 20.04

In this guide, we want to teach you to Set up OpenNMS Horizon on Ubuntu 20.04.

OpenNMS is an open-source network monitoring platform that helps you visualize and monitor everything on your local and distributed networks. OpenNMS offers comprehensive fault, performance, and traffic monitoring with alarm generation in one place. Highly customizable and scalable, OpenNMS integrates with your core business applications and workflows.

In this guide, we will teach you to install OpenNMS by using the docker.

Steps To Set up OpenNMS on Ubuntu 20.04

To install OpenNMS, you must log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our guide on Initial Server Setup with Ubuntu 20.04.

Then, you must have Docker and Docker Compose installed on your server. To do these, you can follow these guides:

Install and Use Docker on Ubuntu 20.04

Install and Use Docker Compose on Ubuntu 20.04

When you are done, follow the steps below.

Install OpenNMS Horizon on Ubuntu 20.04

First, you need to create a project directory for OpenNMS and switch to it with the commands below:

# mkdir opennms
# cd opennms

Then, you need to create a new docker-compose.yml file to install OpenNMS. You can use your favorite text editor, here we use vi:

sudo vi docker-compose.yml

Add the following content to the file: You can visit the GitHub OpenNMS release page to get the latest version.

version: '3'

volumes:
  data-postgres: {}
  data-opennms: {}

services:
  database:
    image: postgres:15
    container_name: database
    environment:
      - TZ=Europe/Berlin
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    volumes:
      - data-postgres:/var/lib/postgresql/data
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U postgres" ]
      interval: 10s
      timeout: 30s
      retries: 3

  horizon:
    image: opennms/horizon:31.0.5
    container_name: horizon
    environment:
      - TZ=Europe/Berlin
      - POSTGRES_HOST=database
      - POSTGRES_PORT=5432
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - OPENNMS_DBNAME=opennms
      - OPENNMS_DBUSER=opennms
      - OPENNMS_DBPASS=opennms
    volumes:
      - data-opennms:/opt/opennms/share/rrd
      - ./overlay:/opt/opennms-overlay
    command: ["-s"]
    ports:
      - "8980:8980/tcp"
      - "8101:8101/tcp"
      - "61616:61616/tcp"
    healthcheck:
      test: [ "CMD", "curl", "-f", "-I", "http://localhost:8980/opennms/login.jsp" ]
      interval: 1m
      timeout: 5s
      retries: 3

When you are done, save and close the file.

Next, download and build the container for OpenNMS on Ubuntu 20.04 with the following command:

sudo docker-compose up -d

Verify the running container with the command below:

sudo docker ps -a
Output

CONTAINER ID   IMAGE                    COMMAND                  CREATED          STATUS                             PORTS                                                                                                                                                      NAMES
1235780ed100   postgres:15              "docker-entrypoint.s…"   13 seconds ago   Up 11 seconds (healthy)            5432/tcp                                                                                                                                                   database
ff248fd47ee7   opennms/horizon:31.0.5   "/entrypoint.sh -s"      13 seconds ago   Up 11 seconds (health: starting)   0.0.0.0:8101->8101/tcp, :::8101->8101/tcp, 1162/udp, 0.0.0.0:8980->8980/tcp, :::8980->8980/tcp, 10514/udp, 0.0.0.0:61616->61616/tcp, :::61616->61616/tcp   horizon

Access OpenNMS Web Interface

At this point, you can access OpenNMS Horizon through the Web interface on Ubuntu 20.04 by typing your server’s IP address in your web browser followed by 8980:

http://IP_Address:8980

You will see the OpenNMS horizon login screen. Enter admin as the username and password and click Login.

OpenNMS Login
OpenNMS Login

Then, you should see the OpenNMS Horizon dashboard on Ubuntu 20.04.

OpenNMS Dashboard Ubuntu 20.04
OpenNMS Dashboard

You can now change the password to a preferred one by navigating to admin → Change Password.

Change default Admin Password OpenNMS
Change default Admin Password
Add New Admin Password for OpenNMS
Add New Admin Password

How To Monitor Systems with OpenNMS

To be able to monitor systems, you need to add them to OpenNMS on Ubuntu 20.04. Begin by clicking on the “+“ icon as shown below.

Add node to OpenNMS
Add node

Enter the required details such as requisitionIP Address, and Node Label, and click Provision.

OpenNMS Node Credentials
Node Credentials

After the node has been added, it will appear under Info → Nodes.

You can now view graphs and create alerts for the device.

Monitor Devices with OpenNMS Ubuntu 20.04
Monitor Devices

For more information, you can visit OpenNMS Documentation.

Conclusion

At this point, you have learned to Set up OpenNMS Horizon on Ubuntu 20.04.

Hope you enjoy it. You can visit Orcacore Website to get more guides and articles.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

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

Stay informed and not overwhelmed, subscribe now!