You are browsing a read-only backup copy of Wikitech. The live site can be found at

LibreNMS: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
Line 97: Line 97:

Run puppet
Run puppet
Run sudo -u librenms ./

==== Rollback ====
==== Rollback ====

Revision as of 18:21, 11 September 2019

LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems including Cisco, Linux, Juniper, Foundry, and many more.

LibreNMS is a community-based fork of the last GPL-licensed version of Observium.


Currently hosted on netmon1002 and netmon2001

Replaces Observium which ran on Streber.

  • Software is not installed via Debian package
  • Software installed in: /srv/deployment/librenms/
  • RRD data stored in: /srv/librenms/
  • User creds are stored in MySQL: # grep auth_mechanism /srv/deployment/librenms/librenms/config.php
  • Authentication is done via LDAP

How to

Add a device to LibreNMS

Configure the read only v2c SNMP community on the device

Via webUI:

And use the device FQDN, keep all the other fields as it (and do not force add it).

The device should be discovered and polled in the next 10min.

Via CLI:

$ ssh
$ cd /srv/deployment/librenms/librenms
$ sudo -u librenms php addhost.php <fqdn>
Added device <fqdn> (XXX)
$ sudo -u librenms php discovery.php -h XXX && sudo -u librenms php poller.php -h XXX

Upgrade LibreNMS

Let's assume your remote is configured like the following. And we're tracking new versions in different branches.

origin	ssh://<username> (fetch)
origin	ssh://<username> (push)
upstream (fetch)
upstream (push)

git fetch upstream

git checkout -b upstream-<version> <version>

(Verify you're in the upstream-<version> branch)

composer install --no-dev (your will be prompted for any missing php requirements)

git add -f vendor

git commit -m "Add composer requirements for LibreNMS<version>"

mkdir scap

vim scap/scap.cfg

git_repo: librenms/librenms
git_deploy_dir: /srv/deployment
ssh_user: deploy-librenms
dsh_targets: /etc/dsh/group/librenms
git_submodules: False
lock_file: /tmp/scap.librenms.lock
config_deploy: False
keyholder_key: deploy_librenms

git add scap

git commit -m "Add Scap config"

git push origin upstream-<version>

On deploy1001:

cd /srv/deployment/librenms/librenms/

git fetch origin

git status - note the current branch

git checkout upstream-<version>

scap deploy Upgrade LibreNMS to <version> - <task>

On netmon*:

Run puppet

Run sudo -u librenms ./


On deploy1001:

cd /srv/deployment/librenms/librenms/

git fetch origin

git checkout <previous branch>

scap deploy Rollback LibreNMS to <version> - <task>

On netmon*:

Run puppet

Check the logs

LibreNMS logs in 4 different locations:

  • /srv/deployment/librenms/librenms/logs/librenms.log
  • /var/log/librenms.log
  • /var/log/librenms/daily.log
  • /var/log/apache2/

It would be great to have the first 3 in a single location.


Interface grouping

LibreNMS can group interfaces based on their description's prefix, for example "Transit:", "Peering:". Which is shown under the "ports" dropdown.

Prefixes not shown in the dropdown are still reachable by editing the URL, for example:

IRC Alerting

LibreNMS IRC bot named librenms-wmf outputs the alerts and recoveries on the -operations channel. This to help correlate series of alerts between different monitoring tools.

More details about the alerts can be found on .

If the bot misbehaves or is too noisy and needs to be stopped, three options:

Then file a task to track the issue.

If IRC alerting is not working:

  1. Make sure the bot is running
  2. Make sure the fifo file librenms/.ircbot.alert (created by the IRC bot) is writable by www-data (the LibreNMS app)

External links