Authentication Parameters

The LibreNMS provider offers two ways to authenticate:

  • LibreNMS Host URL - This is the URL of your LibreNMS instance.
  • LibreNMS API Key - This is the API key created in the User Settings of your LibreNMS account and is used to authenticate requests to the LibreNMS API.

Connecting LibreNMS to Keep

  1. Open LibreNMS dashboard and click on settings in the top right corner.
  1. Click on Create API access token to generate a new API key.
  1. Give a description to the API key and click on Create API Token.

Webhooks Integration

  1. Open LibreNMS dashboard and open Alerts tab in the navigation bar and click on Alert Transports.
  1. Click on Create add transport and select Transport type as API. Select the API Method as POST.

  2. Fill the API URL with https://api.keephq.dev/alerts/event/libre_nms.

  1. Copy the below JSON and paste it in body field.
{
  "title": "{{ $title }}",
  "hostname": "{{ $hostname }}",
  "device_id": "{{ $device_id }}",
  "sysDescr": "{{ $sysDescr }}",
  "sysName": "{{ $sysName }}",
  "sysContact": "{{ $sysContact }}",
  "os": "{{ $os }}",
  "type": "{{ $type }}",
  "ip": "{{ $ip }}",
  "display": "{{ $display }}",
  "version": "{{ $version }}",
  "hardware": "{{ $hardware }}",
  "features": "{{ $features }}",
  "serial": "{{ $serial }}",
  "status": "{{ $status }}",
  "status_reason": "{{ $status_reason }}",
  "location": "{{ $location }}",
  "description": "{{ $description }}",
  "notes": "{{ $notes }}",
  "uptime": "{{ $uptime }}",
  "uptime_short": "{{ $uptime_short }}",
  "uptime_long": "{{ $uptime_long }}",
  "elapsed": "{{ $elapsed }}",
  "alerted": "{{ $alerted }}",
  "alert_id": "{{ $alert_id }}",
  "alert_notes": "{{ $alert_notes }}",
  "proc": "{{ $proc }}",
  "rule_id": "{{ $rule_id }}",
  "id": "{{ $id }}",
  "faults": "{{ $faults }}",
  "uid": "{{ $uid }}",
  "severity": "{{ $severity }}",
  "rule": "{{ $rule }}",
  "name": "{{ $name }}",
  "string": "{{ $string }}",
  "timestamp": "{{ $timestamp }}",
  "contacts": "{{ $contacts }}",
  "state": "{{ $state }}",
  "msg": "{{ $msg }}",
  "builder": "{{ $builder }}"
}
  1. Follow the below steps to create a new API key in Keep.

  2. Go to Keep dashboard and click on the profile icon in the botton left corner and click Settings.

  1. Select Users and Access tab and then select API Keys tab and create a new API key.
  1. Give name and select the role as webhook and click on Create API Key.
  1. Copy the API key.
  1. Add a new header with key as X-API-KEY and create a new API key in Keep and paste it as the value and save the webhook.
  1. Save the webhook.

  2. You can add devices from the Devices tab in the LibreNMS dashboard and select the alert transport that you have created.

  1. Now, you will receive the alerts in Keep.