Oxidized & LibreNMS User Guide

About

This guide is meant to show the user how to backup devices on using Oxidized.

We are using Oxidized to backup device configurations via the SNMP protocol. Oxidized sources the devices list from LibreNMS.

Oxidized and LibreNMS are running as containers on the the Virtual Machine oxidized.its.carleton.edu.

 

The assumption is the device has already been configured for SNMP with the appropriate community string.

Backing up device configuration

These are the steps necessary to backup a device via SNMPv2 with Oxidized and LibreNMS.

  1. Add device to LibreNMS in the browser.

Here’s an example:

 

You can add multiple devices to LibreNMS via the API. Here is a how:

curl -X POST -d "{\"hostname\":\"<insert_device_ip_or_hostname_here>\",\"version\":\"v1\",\"community\":\"<insert_snmp_community_here>\"}" -H "X-Auth-Token: <insert_token_here>" http://oxidized.its.carleton.edu:8000/api/v0/devices

You can find the token in librenms in the browser: librenms.its.carleton.edu → Settings (top right cog) → API → API settings.

 

  1. Place device in a group in LibreNMS

Currently, we are doing this on the terminal on oxidized.its.carleton.edu via the librenms container. Oxidized then pulls that information for assigning the device to a group.

Here is an example: replace insert_device_ip_or_hostname_here and insert_group_name_here with the device’s DNS name or IP address and the appropriate group, respectively

docker exec -it librenms lnms config:set oxidized.maps.group.hostname.+ '{"regex": "/^insert_device_ip_or_hostname_here/", "value": "insert_group_name_here"}'

To understand how the group passwords are set, see the Oxidized & LibreNMS Setup Guide.

 

  1. Wait for Oxidized to backup the device.

At this point, your device should already be visible in Oxidized at oxidized.its.carleton.edu:8888/nodes.

  • Use the search bar near to top right corner of the web page to search for your device.

  • Select your device and you’ll see the device’s info as well as options to download config, show config changelog and reload:

  • If after selecting download and you see a message saying node not found, go back to the device options on the previous page and click the reload option.

  • Wait a couple of minutes and try again.

 

Updating device group and name

Device groups are updated through the librenms container on oxidized.its.carleton.edu. Here are a couple of useful librenms commands to know.

  1. Show all devices and their respective groups.

    docker exec -it librenms lnms config:get oxidized.maps.group.hostname
  2. Show a particular device by its LibreNMS ID.

  3. Update a device’s DNS name or IP, or it’s group.

 

Other useful LibreNMS info

All the information concerning Oxidized can be accessed by running this command


oxidized is an object. You can access other objects within it using the dot notation. For instance oxidized.maps.groups.hostname is a nested object containing all the hostnames of the devices which LibreNMS is providing Oxidized.