Monitoring

Fixing LibreNMS After Updates: Missing Restify Provider

Fixing LibreNMS After Updates: Missing Restify Provider #

After a routine package update on my RHEL 9 LibreNMS server, the web UI stopped working and the logs showed a very familiar Laravel-style error:

[CRITICAL] Exception: Error Class "Binaryk\LaravelRestify\RestifyApplicationServiceProvider" not found @ /opt/librenms/app/Providers/RestifyServiceProvider.php:15

At first glance it looks like a code issue, but in this case the root cause was simpler: the PHP dependencies under /opt/librenms were stale or partially updated.

Automated Network Monitoring: Adding Servers to LibreNMS with Ansible

Automated Network Monitoring: Adding Servers to LibreNMS with Ansible #

Adding servers to LibreNMS by hand is tedious, and should be done by automation. In this post, I’ll show you how I’ve automated the entire process of configuring SNMP and adding servers to LibreNMS using Ansible.

The Workflow #

Basically what the playbook does is:

  1. Install and configure SNMP
  2. Set up necessary firewall rules
  3. Add the server to LibreNMS
  4. Add it to the correct device group.

The Playbook #

Step 1: Installing SNMP Components #

- name: Ensure snmp is installed
  ansible.builtin.dnf:
    name:
      - net-snmp
      - net-snmp-utils
    state: present

The net-snmp package is needed for the SNMP daemon.