LibreNMS LibreNMS

Configure the LibreNMS connector to set up API access and retrieve information

Objective

The purpose of this document is to provide a procedure for setting up the LibreNMS API and generating the API token (X-Auth-Token) required to retrieve network monitoring information from LibreNMS.

Upon completion of this procedure, you will be able to provide:

  • Server IP/URL
  • API Token (X-Auth-Token)

Creating Access Credentials

  1. Connect to the LibreNMS console with a user having administrator rights.
  2. Go to Settings > API access.
  3. Click on Create API access token.
  4. Select the User for which to generate the token.
  5. Copy the generated API token (X-Auth-Token).
  6. Store the token securely for use in OverSOC configuration.
  7. The token can also be retrieved via a QR Code if available in your version.

Configuration Steps

1. User Account Setup

  1. Ensure you have a user account with appropriate permissions
  2. The account should have read access to device information
  3. Verify that the user can access the API settings section

2. API Token Generation

  1. Go to Settings > API access
  2. Click Create API access token
  3. Select the user and create the token
  4. Copy the generated API token immediately
  5. Securely store the token for OverSOC configuration

3. Configure in OverSOC

  1. In OverSOC, go to Data Sources Settings > Sources.
  2. Select LibreNMS and click Configure.
  3. Enter the LibreNMS server URL (hostname or IP address).
  4. Paste the API token in the authentication field.
  5. Use the X-Auth-Token header for authentication.
  6. Click Save Configuration.

Authentication

The LibreNMS connector uses API Token authentication with the X-Auth-Token header.

Testing API Access

You can test the API token using curl:

curl -H "X-Auth-Token: YOUR_TOKEN" "https://YOUR_SERVER/api/v0/devices"

Security Recommendations

  • Use HTTPS for API communication
  • Regularly rotate API tokens
  • Monitor API access logs
  • Restrict API access to necessary IP ranges

Official Documentation

For more information, see the LibreNMS API Documentation