OpenNMS Monitoring - connorethanjay/ISDE-Homelab GitHub Wiki

OpenNMS can be set up in either a LXC container or a virtual machine. For the sake of convenience in my environment, I am setting up OpenNMS in a Debian 12 LXC container.

Initial steps prior to installation.

This is to add the OpenNMS repository to APT, which needs root or sudouser privileges. You will need gnupg installed for adding the key.

Installing OpenNMS with all dependencies built in.

  • apt -y install OpenNMS
    • You must manually run the OpenNMS installer after installing all packages, this is described in the screenshot below.

You may run into an error which describes "IPLIKE installation failed". This is a common occurrence and can be remediated after the install is completed.

Creating the Database (READ!!!!)

The instructions that come with OpenNMS prompt you to create a non-unicode database. This will NOT WORK! You need to create a unicode database. I have modified the instructions so that it is correct below.

  • su postgres (Su into Postgres user)
  • psql (log into postgresql)
  • CREATE USER opennms WITH PASSWORD ' YOUR PASSWORD '; (Create opennms user)
  • CREATE DATABASE opennms WITH OWNER opennms ENCODING UTF8 TEMPLATE template0; (Creating Unicode DB)
  • ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD'; (Best practice, setting a password for the Postgres super user)

Now you will need to configure database access. I have screenshotted my example as reference. You will need to modify /etc/opennms/opennms-datasources.xml. Note that these are example passwords for future reference (this VM is temporary for a class lab)

image

Final steps to initial installation.

You now need to enable and start the OpenNMS system service. Plain and simple using Systemctl enable opennms & systemctl start opennms. Use sudouser access for this.

Logging into the web interface

The initial username and password is admin / admin. This should of course be changed.

  • image
  • image