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
- Connect to the LibreNMS console with a user having administrator rights.
- Go to Settings > API access.
- Click on Create API access token.
- Select the User for which to generate the token.
- Copy the generated API token (X-Auth-Token).
- Store the token securely for use in OverSOC configuration.
- The token can also be retrieved via a QR Code if available in your version.
Configuration Steps
1. User Account Setup
- Ensure you have a user account with appropriate permissions
- The account should have read access to device information
- Verify that the user can access the API settings section
2. API Token Generation
- Go to Settings > API access
- Click Create API access token
- Select the user and create the token
- Copy the generated API token immediately
- Securely store the token for OverSOC configuration
3. Configure in OverSOC
- In OverSOC, go to Data Sources Settings > Sources.
- Select LibreNMS and click Configure.
- Enter the LibreNMS server URL (hostname or IP address).
- Paste the API token in the authentication field.
- Use the X-Auth-Token header for authentication.
- 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