# Integrate Spike with LibreNMS

### Service and Integration

Make sure to add a LibreNMS integration and copy the webhook URL.

{% content-ref url="create-integration-and-service-on-dashboard" %}
[create-integration-and-service-on-dashboard](https://docs.spike.sh/integrations-guideline/create-integration-and-service-on-dashboard)
{% endcontent-ref %}

### Using webhooks with LibreNMS

**Step 1**

* From the **Alerts** menu, choose **Alert Transports** from the dropdown.
* Create a new Alert Transport

![](https://1743514643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ln3jS1bJTTsE3yoEcOu%2Fuploads%2Fgit-blob-a0f7c735d01c2a9215b4cb110a04bf59b615d66d%2Fimage%20\(58\).png?alt=media)

**Step 2**

* Give a **Name** to the Alert Transport
* Select `Api` as **Transport type**
* **Default alert** is toggled to `ON`
* Choose the **API Method** as `POST`
* Paste the Spike webhook URL
* In **Body**, paste the following template given below.

```
{
  "device_id": "{{ $device_id }}",
  "hostname": "{{ $hostname }}",
  "sysName": "{{ $sysName }}",
  "sysDescr": "{{ $sysDescr }}",
  "sysContact": "{{ $sysContact }}",
  "os": "{{ $os }}",
  "type": "{{ $type }}",
  "ip": "{{ $ip }}",
  "hardware": "{{ $hardware }}",
  "version": "{{ $version }}",
  "features": "{{ $features }}",
  "serial": "{{ $serial }}",
  "uptime_short": "{{ $uptime_short }}",
  "uptime_long": "{{ $uptime_long }}",
  "description": "{{ $description }}",
  "notes": "{{ $notes }}",
  "location": "{{ $location }}",
  "uptime": "{{ $uptime }}",
  "ping_avg": "{{ $ping_avg }}",
  "title": "{{ $title }}",
  "elapsed": "{{ $elapsed }}",
  "builder": "{{ $builder }}",
  "id": "{{ $id }}",
  "uid": "{{ $uid }}",
  "state": "{{ $state }}",
  "severity": "{{ $severity }}",
  "alert_notes": "{{ $alert_notes }}",
  "ping_timestamp": "{{ $ping_timestamp }}",
  "ping_loss": "{{ $ping_loss }}",
  "ping_min": "{{ $ping_min }}",
  "ping_max": "{{ $ping_max }}",
  "rule": "{{ $rule }}",
  "name": "{{ $name }}",
  "proc": "{{ $proc }}",
  "timestamp": "{{ $timestamp }}",
  "transport": "{{ $transport }}",
  "transport_name": "{{ $transport_name }}",
  "message": "{{ $msg }}"
}
```

![LibreNMS configuration](https://1743514643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ln3jS1bJTTsE3yoEcOu%2Fuploads%2Fgit-blob-ba5213fb23dc34699739844ece8c4e1d3730a40f%2Fimage.png?alt=media)
