4 C
Texas

How To Install OpenNMS On Ubutnu 20.04

Today we are going to learn that how to install OpenNMS Network Monitoring Tool on Ubuntu 20.04. OpenNMS is an open source network management tool that can be used to see the critical problems of remote devices. It supports many functions like Provisioning, Services Monitoring, Event managing, chart support & many other features. The main feature is that it operates from the central location & handles unlimited devices. Simply follow the below steps for an easy and optimal installation of OpenNMS on Ubuntu 20.04.

Step 1: Update Your System

Make sure that your system is updated before starting the installation.

sudo apt update && sudo apt upgrade -y

Reboot your system if needed.

- Advertisement -
sudo reboot

And then install the other required packages by typing.

sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y

After resolving the dependencies, move towards the next step.

Step 2: Install Docker & Docker Compose on Ubuntu 20.04

To install docker on Ubuntu 20.04, add the repostiory & then install the latest version as latest version is not present on Ubuntu default repository.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

After adding the repo hit the below command to install the docker & docker compose.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose -y

Verify the status by typing

sabi@Ubuntu20:~$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor prese>
Active: active (running) since Tue 2020-12-01 11:24:04 PKT; 23s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 40347 (dockerd)
Tasks: 13
Memory: 48.9M
CGroup: /system.slice/docker.service
└─40347 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/co>
دسمبر 01 11:24:01 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:01.635102089>
دسمبر 01 11:24:01 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:01.635109806>
دسمبر 01 11:24:01 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:01.635117110>
دسمبر 01 11:24:01 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:01.635344751>
دسمبر 01 11:24:03 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:03.538423340>
دسمبر 01 11:24:03 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:03.870371403>
دسمبر 01 11:24:04 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:04.205068138>
دسمبر 01 11:24:04 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:04.205249608>
دسمبر 01 11:24:04 Ubuntu20 systemd[1]: Started Docker Application Container En>
دسمبر 01 11:24:04 Ubuntu20 dockerd[40347]: time="2020-12-01T11:24:04.245907850>
lines 1-21/21 (END)

See the installed version of docker by running

sabi@Ubuntu20:~$ docker -v
Docker version 19.03.13, build 4484c46d9d

For docker compose

sabi@Ubuntu20:~$ docker-compose -v
docker-compose version 1.25.0, build unknown

Step 3: Install OpenNMS On Ubuntu 20.04

Run the given command to create a project folder for OpenNMS.

sudo mkdir opennms

Now, switch to the created directory & create a new docker-compose.yml file in order to install OpenNMS.

cd opennms
sudo nano docker-compose.yml

Paste the below content into the file.

version: '3'
volumes:
data-postgres: {}
data-opennms: {}
services:
database:
image: postgres:12
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:26.1.1
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

Save & exit the file. Then hit the given command to download & build the container for opennms.

sudo docker-compose up -d

Check the running container by typing

sudo docker ps -a

Output:

sabi@Ubuntu20:~/opennms$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a77e102ae833 opennms/horizon:26.1.1 "/entrypoint.sh -s" 17 minutes ago Up 18 seconds (health: starting) 0.0.0.0:8101->8101/tcp, 1162/udp, 0.0.0.0:8980->8980/tcp, 10514/udp, 0.0.0.0:61616->61616/tcp horizon
c4716857deef postgres:12 "docker-entrypoint.s…" 17 minutes ago Up 19 seconds (healthy) 5432/tcp database

Step 4: Accessing OpenNMS Via Web

Go to your favourite browser and access the OpenNMS by typing http://your-server-ip:8980. You’ll see the login page. Provide default credentails to login.

User:admin
Pass:admin

How To Install OpenNMS On Ubutnu 20.04

You’ll be redirected to the dashboard. Now, click on the “+” icon on the top right side to add new server node(device to be monitored).

How To Install OpenNMS On Ubutnu 20.04

Give it a name & press “OK”. You’ll see the similar screen.

Now, fill the required fields to add the new device to be monitored.

You’ll see a success message once added. Press “Ok” button

How To Install OpenNMS On Ubutnu 20.04

And navigate to the Info>>>Nodes to see the new device added.

How To Install OpenNMS On Ubutnu 20.04

So, this is how you can install OpenNMS on Ubuntu 20.04

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article