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.

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 requires openjdk-11-jdk. To install this, open a terminal and issue the commands:

sudo apt-get install default-jresudo apt-get install openjdk-11-jdk

Once that completes, you’re ready to continue on.

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. Give the installer executable permissions with the command chmod u+x bootstrap-debian.sh.
6. Run the installer with the command sudo ./bootstrap-debian.sh
7. When prompted (Figure A), type YES.

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

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.

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 following commands:

sudo /usr/share/opennms/bin/runjava -ssudo nano /etc/default/opennms

In the newly created file, add the following:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin/java

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).

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.

Subscribe to the Data Insider Newsletter

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more. Delivered Mondays and Thursdays

Subscribe to the Data Insider Newsletter

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more. Delivered Mondays and Thursdays