> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# LibreNMS

> Connect LibreNMS with an API token so agents check devices and alerts, then acknowledge an alert or set maintenance.

Connect LibreNMS so [CloudThinker](https://docs.cloudthinker.io/guide/agents/overview.md) can check devices, alerts, alert rules, and event logs, and, if you allow it, acknowledge an alert or put a device into maintenance. The connection signs in with a LibreNMS API token and can do only what the token's user is allowed to do.

## Prerequisites

* A LibreNMS server that CloudThinker can reach over HTTPS. For a private address, follow [Reaching private services](https://docs.cloudthinker.io/guide/connections/overview.md#reaching-private-services).
* A LibreNMS user for CloudThinker with the **global-read** role, or the **admin** role if agents should make changes.
* The **Admin** role in your CloudThinker workspace. See [Roles](https://docs.cloudthinker.io/guide/security/roles.md).

## Setup

**1. Create an API token**

Sign in to LibreNMS as the CloudThinker user. Open **Settings** (the gear icon), then **API Settings → API Access**, and click **Create API access token**. Add a description, choose an expiration, and click **Create**. Copy the token: LibreNMS shows it only once. See [LibreNMS's API instructions](https://docs.librenms.org/API/).

**2. Connect in CloudThinker**

Open **Settings → Workspace → Connections**, open the **Discover** tab, and select **LibreNMS**. Click **Connect**, fill in the fields below, then click **Connect** in the dialog.

**Success state:** the connection shows a **Connected** status with your LibreNMS version. CloudThinker then opens a chat that takes a read-only deep look at the connection ("Often takes about 15 min. You can leave the chat."). To run it again later, open the card's **More** menu and choose **Try in chat**.

## Connection details

| Field | Required | Description |
| - | - | - |
| **LibreNMS URL** | Yes | The HTTPS address you open LibreNMS at, such as `https://librenms.example.com`. Keep any path LibreNMS is served under, and leave off `/api/v0`, credentials, query strings, and fragments |
| **API token** | Yes | The token you created |
| **CA certificate (optional)** | No | The PEM of the private certificate authority that issued the LibreNMS certificate. Leave it empty to use public trust. CloudThinker always checks the certificate and hostname |

CloudThinker refuses redirects, so enter the exact address LibreNMS answers at.

## Required permissions

The token acts as the user who created it. Pick the user's role in LibreNMS by what agents should do. See [LibreNMS's roles](https://docs.librenms.org/Extensions/Authentication/).

| You want agents to | LibreNMS role |
| - | - |
| Check devices, alerts, alert rules, and event logs | **global-read**, a read-only role for all devices |
| Also acknowledge or unmute alerts and set maintenance | **admin**, a read and write role for all of LibreNMS |

> [!TIP]
>
> Start with a **global-read** user. Agents can still investigate every device, and no approval, mistaken or automatic, can change anything in LibreNMS.

## Agent capabilities

| Capability | What agents can do |
| - | - |
| **Overview** | Report the LibreNMS version, device totals by operating system, down devices, open and acknowledged alerts, and alert rule totals |
| **Alerts** | List open, acknowledged, or recovered alerts, newest first, with severity, rule, device, and note |
| **One device** | Read a device's status, reason, operating system, hardware, uptime, maintenance state, open alerts, and recent event log |
| **Changes** | Acknowledge one open alert, unmute one acknowledged alert, or put one device into maintenance |

Reads run without asking. Each change targets one alert or device, and the agent reads it again afterwards to confirm the change. Maintenance starts at once and lasts from 1 minute to 7 days. It silences every alert on the device until it ends, and only the LibreNMS web interface can end it early. The agent says so before it asks.

Agents cannot add or delete devices or edit alert rules. Make those changes in LibreNMS.

Writes also need **Allow writes** on, which starts on. To lock writes in CloudThinker, open **LibreNMS** in **Settings → Workspace → Connections** and turn off the **Allow writes** switch on its detail panel.

Every change an agent makes goes through your workspace's [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md) first. On the default **Auto · Rules + AI · Ask me** mode, AI judgment can let a safe change run without asking — and an Allow [Rule](https://docs.cloudthinker.io/guide/approvals/rules.md) can too. Choose **Manual** to approve every change yourself.

### Verify the connection

```text theme={null}
Give me a LibreNMS overview: version, device totals, down devices, and open alerts by severity
```

Expect your LibreNMS version with real device hostnames and alert counts. A failed section is unavailable data, not zero alerts.

### Example prompts

```text theme={null}
Which LibreNMS devices are down, and which alerts are open right now?
How is core-switch-01 doing in LibreNMS? Show its open alerts and recent events
Put edge-router-02 into LibreNMS maintenance for 90 minutes
```

## Troubleshooting

> [accordion] LibreNMS rejected the API token.
>
> The token is wrong, expired, or deleted. Create a new token in LibreNMS, then edit the connection and paste it into **API token**.

> [accordion] The token works, but its user cannot read LibreNMS. Give that user global read access.
>
> Give the token's user the **global-read** role, or **admin** for changes, then connect again.

> [accordion] That address has no LibreNMS API. Check the URL and any path LibreNMS is served under.
>
> Enter the address from your browser, including any path LibreNMS runs under. Leave off `/api/v0`.

> [accordion] LibreNMS answered with a redirect. Use the exact https address you open LibreNMS at.
>
> Enter the final HTTPS address LibreNMS serves directly, not an address that forwards to it.

> [accordion] The LibreNMS certificate is not trusted.
>
> Install a certificate from a trusted authority, or paste the issuing CA certificate into **CA certificate (optional)**. If CloudThinker says the CA certificate is not valid PEM, paste the full certificate, including its `BEGIN` and `END` lines.

> [accordion] Could not reach LibreNMS over HTTPS. Check the URL and that the sandbox can reach it.
>
> CloudThinker could not open a connection to that address. Confirm the URL starts with `https://` and that your firewall lets CloudThinker reach LibreNMS. Browser access from your laptop alone is not enough.

> [accordion] An agent says the LibreNMS write tool is off
>
> **Allow writes** is off on this connection, so the change was refused and nothing changed. Turn it on in the connection's detail panel, or make the change in LibreNMS.

## Security

* **Least privilege** — grant only the permissions the agents need for your use case; start read-only and widen later.
* **Read-only by default** — use read-only credentials unless you want agents to make changes through this connection.
* **Rotate credentials** — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
* **Revoke on offboarding** — remove the credential at the provider when you delete a connection or a teammate leaves.

- Use a dedicated LibreNMS user for CloudThinker, so you can revoke its token without affecting anyone else.
- Choose a token expiration that matches your rotation schedule, and create a new token before it lapses.

## Related

> [card] [Approval rules](https://docs.cloudthinker.io/guide/approvals/rules.md)
>
> Decide which LibreNMS changes run, wait for a person, or are refused.

> [card] [Zabbix](https://docs.cloudthinker.io/guide/connections/zabbix.md)
>
> Triage Zabbix problems, read host metrics, and schedule maintenance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.