Need a web-based tool to monitor and manage your network devices? Look no further than OpenNMS.

networkhero.jpg

Image: Pixabay

If you administer a data center, you owe it to yourself to have all the tools necessary to keep those servers up and running. One tool you should most certainly have at the ready is a network management system that can monitor and manage many (if not all) of your devices. 

Data Center Must-Reads

One such tool is OpenNMS. This open source monitor features:

  • Automatic acknowledgment of self-clearing problems.
  • Provisioning.
  • Supports all Popular platforms.
  • Service Monitoring.
  • Event Management.
  • Performance Measurement.
  • Charting support.

I'm going to walk you through the process of installing OpenNMS on Ubuntu Server 18.04.

SEE: Hiring kit: Database administrator (TechRepublic Premium)

What you need

The only things you need to make this work are:

  • A running instance of Ubuntu Server 18.04.
  • A user account with sudo privileges.

That's it. Let's make some magic.

Update/upgrade

Before we run the installer script, make sure to update and upgrade your server with the commands:

sudo apt-get update
sudo apt-get upgrade -y

Should the kernel upgrade, you'll need to reboot the server. Because of this, make sure to run the update and upgrade at a time when a reboot is possible.

Dependency installation

There is only one dependency to install for OpenNMS … the Java JDK. However, OpenNMS only supports Java 8. To install this, open a terminal and issue the commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update 
sudo apt-get install oracle-java8-installer

Next, issue the command sudo update-alternatives —config java and make sure that Java 8 is selected as the default.

Once that completes, you're ready to continue.

Installation

Fortunately, there's a handy installer script that can be run to take care of the complex installation of OpenNMS. The script does take a while to complete, so give yourself plenty of time. Here's how to make this happen:

  1. Download the installer script with the command wget https://github.com/opennms-forge/opennms-install/archive/master.zip.
  2. Install unzip with the command sudo apt-get install unzip -y.
  3. Unzip the downloaded package with the command unzip master.zip.
  4. Change into the newly created directory with the command cd opennms-install-master
  5. When prompted (Figure A), type YES.
opennmsa.jpg

Figure A: Kicking off the OpenNMS installation.

During the installation, you will be asked to create a username for the database (Figure B) and a password for that user.

opennmsb.jpg

Figure B: Adding a PostgreSQL username and password.

The next interactive step is to configure a mail server type that meets your needs. You can choose from:

  • No configuration.
  • Internet site (mail is sent and received using SMTP).
  • Internet with smarthost (mail is received using SMTP and outgoing mail is sent using a smarthost).
  • Satellite system (mail is sent to another machine for delivery).
  • Local only.

What you select (Figure C) will depend upon your needs.

opennmsc.jpg

Figure C: Selecting your mail server type.

Once you do that, you'll need to configure the system mail name (a domain used for the sending of email). When this completes, you then have to manually run the installer with the command:

sudo /usr/share/opennms/bin/install -dis

This will complete the set up. If you get a Java error, you'll need to declare the Java installation directory. To do this, issue the command:

sudo nano /etc/default/opennms

In that file, make sure you have the following line:

JAVA_HOME=/usr/lib/jvm/java-8-oracle

Save and close that file. Re-run the installation command, and you shouldn't have any errors.
When done, make sure to start and enable the OpenNMS service with the commands:

sudo systemctl start opennms
sudo systemctl enable openms

With that out of the way, point your browser to http://SERVER_IP:8980. You should be prompted to log in (Figure D). 

opennmsd.jpg

Figure D: Logging into your new OpenNMS installation.

Use the default credentials of admin/admin. Once you log in, you're ready to start using your newly installed OpenNMS to manage your network devices. Next time around, we'll add a node to OpenNMS.

Also see