# Pulse

> Send Pulse's alerts into InfraInbox as incidents that close when Pulse resolves them.

Web page: https://infrainbox.app/docs/sources/pulse/

[Pulse](https://github.com/rcourtman/Pulse) watches Proxmox, Docker and more, and raises alerts on thresholds and connectivity. Point its generic webhook at InfraInbox and each Pulse alert becomes an incident, on the destinations you choose, with routing, quiet hours and re-notify on top.

**Tested with:** built from Pulse 6.x's webhook documentation; not yet run against a live Pulse.

## What you get

| Pulse sends | In InfraInbox |
|---|---|
| An alert, `warning` or `critical` | An incident at that severity, keyed by Pulse's alert ID |
| The same alert again | The same incident |
| Its `resolved` notification | That incident resolves |

The built-in rule keeps Pulse's incidents open until Pulse resolves them, so none closes just because a day went by. Each event's type is `pulse.<alert type>` (`pulse.cpu`, `pulse.connectivity`, …) for your own [routing rules](https://infrainbox.app/docs/notifications/routing.md).

## Prerequisites

- A Pulse instance that can reach your InfraInbox server over HTTPS. Pulse blocks webhooks to private addresses by default: if InfraInbox is on your LAN, allow it under **Settings → System → Network → Webhook Security**.
- One InfraInbox source takes all of one Pulse's alerts.

## Setup

1. Go to **Add source → Pulse** (dashboard screen `/sources/new/pulse`) and name it. InfraInbox issues an ingest key, shown once, with the settings below filled in.
2. In Pulse's alert notification settings, add a webhook:

   | Field | Value |
   |---|---|
   | Service | Generic |
   | URL | `https://infrainbox.example.com/v1/events` |
   | Method | POST |
   | Header | `Authorization: Bearer iik_src_…` |

3. Set its payload template to:

   ```json
   {
     "title": "{{.ResourceName | jsonString}}: {{.Message | jsonString}}",
     "severity": "{{if .Level}}{{.Level | jsonString}}{{else}}info{{end}}",
     "action": "{{if eq .Event "resolved"}}resolve{{else}}trigger{{end}}",
     "type": "pulse.{{.Type | lower | jsonString}}",
     {{if and .ResourceType .ResourceName}}"resource": "{{.ResourceType | lower | jsonString}}:{{.ResourceName | jsonString}}",{{end}}
     "dedupKey": "pulse:{{.ID | jsonString}}",
     "body": "{{.Message | jsonString}}"
   }
   ```

4. Save, and send Pulse's test notification. The source shows **Receiving events**; a test without an alert level arrives as info and opens no incident.

The same settings, with a placeholder where the key goes, stay on the source's **Connect** tab.

## Check it works

Lower a threshold in Pulse until a resource crosses it. An incident opens; restore the threshold and Pulse's resolved notification closes it.

## Limitations

- Pulse can group several alerts into one notification. InfraInbox then gets one event, about the alert the notification leads with.
- After a restart, Pulse may send many resolved notifications at once. Each closes only its own incident.

## Next

- [Routing rules](https://infrainbox.app/docs/notifications/routing.md) — send critical Pulse alerts somewhere louder
- [Built-in rules](https://infrainbox.app/docs/notifications/presets.md) — edit or override the default rule
