> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/l/librenms.md).

# LibreNMS

|                             |                                  |
| --------------------------- | -------------------------------- |
| Category                    | Network monitoring               |
| Asset types                 | Devices                          |
| Authentication              | API token (X-Auth-Token)         |
| Direction                   | OctoXLabs → LibreNMS (read only) |
| Supported LibreNMS versions | Not specified                    |
| Available since             | Not specified                    |

LibreNMS is an open source network monitoring system. OctoXLabs reads the devices that LibreNMS monitors and adds them to the device inventory.

## Use cases

* **Find monitored devices that other tools do not see.** List devices that LibreNMS monitors but CrowdStrike does not report.

```
Adapters = librenms AND NOT Adapters = falcon-crowdstrike
```

* **List monitored Linux devices.** Filter on OS type.

```
Adapters = librenms AND OS.Type = Linux
```

## Before you begin

### Network

| Source              | Destination   | Port                | Protocol |
| ------------------- | ------------- | ------------------- | -------- |
| OctoXLabs connector | LibreNMS host | 8000 (configurable) | HTTPS    |

Clear **Is Secure?** to use HTTP. If a proxy is set, requests go through it.

### Required permissions

Not verified: the sources do not name a permission. The token belongs to the user you select in LibreNMS. That user must be able to list devices.

## Create credentials in LibreNMS

{% stepper %}
{% step %}

### Open API access

In the LibreNMS web interface, go to `/api-access/`.
{% endstep %}

{% step %}

### Create a token

Click **Create API access token**.
{% endstep %}

{% step %}

### Choose the user

Select the user you want to generate the token for and enter an optional description.
{% endstep %}

{% step %}

### Save the token

Click **Create API Token**. Save the generated key in a secure location. OctoXLabs needs it.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter    | Required | Type    | Default | Description                                                                                        |
| ------------ | -------- | ------- | ------- | -------------------------------------------------------------------------------------------------- |
| IP           | Yes      | String  | None    | IP address of the LibreNMS host.                                                                   |
| Port         | No       | Integer | 8000    | Port number.                                                                                       |
| X-Auth Token | Yes      | String  | None    | LibreNMS API token.                                                                                |
| Is Secure?   | No       | Boolean | True    | Connect over HTTPS.                                                                                |
| Timeout      | No       | Integer | 30      | Seconds to wait for an API response.                                                               |
| Proxy        | No       | String  | None    | Proxy address. The connector uses it as `http://<value>` for HTTP and `https://<value>` for HTTPS. |

## What the connection test does

The test requests the device list with the token. It passes when the API answers with status 200. A 401 answer is reported as an authentication token error.

## API endpoints called

| Method | Path            | Purpose                           |
| ------ | --------------- | --------------------------------- |
| GET    | /api/v0/devices | Lists all devices in one request. |

## Fields fetched

| LibreNMS field | OctoXLabs field                                             |
| -------------- | ----------------------------------------------------------- |
| hostname       | Hostname (primary identifier; falls back to the IP address) |
| ip             | IpAddresses                                                 |
| os             | OS.FullOsString and OS.Type                                 |

## Troubleshooting

| Error message                                                      | Cause                                                                                   | Fix                                                                                            |
| ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Missing or invalid authentication token.                           | LibreNMS answered 401.                                                                  | Check the token and that its user is still active.                                             |
| Unknown error, Please contact the development team for assistance. | The device request failed with a status other than 401.                                 | Check the log line above this message for the status code and URL.                             |
| Status Code: `, followed by URL, Method and the response body`     | The API answered with a status other than 200. This is the shared REST connector error. | Read the status code and body in the message, then check the credentials, permissions and URL. |

## Change history
