Installing the OpenNMS Network Monitoring Platform on Ubuntu and Debian Servers
If you’ve ever had a rack‑of‑devices that start blinking red for no good reason, OpenNMS is your new best friend. Below are the steps to get it running on fresh Ubuntu or Debian installs – plus some tweaks I learned from watching my network go haywire after a half‑hearted upgrade.
5‑minute prep: Why you need these packages
OpenNMS relies on Java, PostgreSQL and a handful of helper tools. The first few commands install the exact versions that play nicely together, avoiding the “it works on my laptop” nightmare. I’ve seen this happen after a bad driver update that broke the default libpq‑client – you’ll get stuck with an empty database until you fix it.
sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install -y curl gnupg2 postgresql \ openjdk-11-jre-headless
Installing Java first guarantees the OpenNMS service starts cleanly; PostgreSQL is required for data persistence, and curl will fetch our repo key in a second.
5‑step install: Adding the OpenNMS repository
1. Add the GPG key – This ensures the packages come from a trusted source.
curl -fsSL https://opennms.org/release.asc | sudo apt-key add -
2. Register the repo – The key points to the correct OpenNMS branch for your distro.
echo "deb https://packages.opennms.org/apt/$(lsb_release -sc) main" \
| sudo tee /etc/apt/sources.list.d/opennms.list
3. Update the package index – Pull in the new repo data.
sudo apt-get update
4. Install OpenNMS – The meta‑package pulls everything else you need.
sudo apt-get install -y opennms
5. Initialize the database – This creates schema and default admin user.
sudo -u opennms /opt/opennms/bin/setup.sh
>
️ If setup.sh complains about a missing PostgreSQL role, run:
>
> sudo -u postgres createuser -s opennms
> sudo -u postgres createdb -O opennms opennms
>
5‑step tweak: Harden the default config
OpenNMS ships with a very permissive opennms.properties. You’ll want to lock it down before you let anyone in.
1. Open /opt/opennms/etc/opennms.properties in your editor.
2. Find org.opennms.netmgt.poller.threadpool.size=10 and bump it to 50 if you plan to monitor dozens of nodes – otherwise the scheduler will choke under load.
3. Uncomment #org.opennms.web.authentication.principal.attribute=username if you’re using LDAP; otherwise, leave it commented.
4. Save and exit.
sudo systemctl restart opennms
5‑step verify: Make sure OpenNMS is alive
sudo systemctl status opennms curl -I http://localhost:8980/opennms/login.jsp | grep Status
If you see a 200 OK and the service shows “active (running)”, you’re good. The default admin login is username admin, password admin. Change that immediately – I learned the hard way when a disgruntled intern found it in my notes.
5‑step add your first device
1. Log into http://your-server:8980/opennms.
2. Navigate to Nodes => Add.
3. Pick “SNMP” as the method, then enter the IP of a switch you control.
4. Hit Add – OpenNMS will ping it and populate its services.
> I’ve seen this happen after a bad driver update: if your SNMP agent is running on an old firmware, OpenNMS will silently ignore the device because the community string mismatches. Double‑check that value before blaming the platform.
5‑step keep it fresh
- Regular updates:
sudo apt-get update && sudo apt-get upgrade -y opennms
- Backup the DB daily: pg_dumpopennms > /var/backups/opennms_$(date +%F).sql.
- Monitor OpenNMS itself – add a node for localhost and watch CPU and memory; you’ll see issues before they hit your real devices.
5‑final tip: Don’t let the UI scare you
OpenNMS’s web interface can look intimidating. The key dashboards are Node List, Events and Reports. Once you get used to filtering events by severity, you’ll spend fewer minutes hunting down “unknown” alerts and more time actually fixing problems.
That’s it. You’ve installed a full‑blown network monitoring stack on Ubuntu or Debian, hardened the defaults, and added your first device. Time to sit back while OpenNMS quietly turns your chaotic network into a set of graphs you can read without pulling your hair out.