# NetAlertX

> Turn NetAlertX's device reports into incidents: down opens, reconnected closes, new devices are flagged.

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

[NetAlertX](https://github.com/netalertx/NetAlertX) scans your network for devices. Point its Webhook publisher at InfraInbox and each report is split into one event per device, on the destinations you choose, with routing, quiet hours and re-notify on top.

**Tested with:** NetAlertX 26.x's own sample report; not yet run against a live NetAlertX.

## What you get

| NetAlertX reports | In InfraInbox |
|---|---|
| A device is down | An ERROR incident for that device, keyed by its MAC address |
| That device reconnected | The same incident resolves |
| A new device joined the network | A WARNING incident for that device |
| Only other events or plugin changes | One info event in the inbox, with the counts |

The built-in rule keeps a down device's incident open until it reconnects, so it never closes just because a day went by. A new-device incident closes after 24 hours of quiet.

## Prerequisites

- A NetAlertX instance that can reach your InfraInbox server.
- Devices you care about marked in NetAlertX to alert when down: it only reports those.

## Setup

1. Go to **Add source → NetAlertX** (dashboard screen `/sources/new/netalertx`) and name it. InfraInbox issues a key for the URL, shown once, with the webhook URL filled in.
2. In NetAlertX, open **Settings → Publishers → Webhook** and fill it in:

   | Field | Value |
   |---|---|
   | URL | `https://infrainbox.example.com/hooks/netalertx/iik_src_…` |
   | Payload type | `json` |
   | Request method | `POST` |

3. Enable the Webhook publisher, and in the notification settings choose which sections to send: new devices, down devices and reconnected devices.

The URL, with a placeholder where the key goes, stays on the source's **Connect** tab.

## Check it works

Unplug a device that's set to alert when down and wait for NetAlertX's next scan. An incident opens; plug it back in and the incident resolves.

## Limitations

> **Warning:** The key is part of the URL, so it can end up in a reverse proxy's access log. Rotate it from the **Connect** tab if it leaks.

- **Payload type must be `json`.** With `html` or `text`, InfraInbox can't read the devices: the report is kept as an unparsed event you can open.
- NetAlertX's webhook signature (`WEBHOOK_SECRET`) isn't checked: the key in the URL already proves who sent it.

## Next

- [Routing rules](https://infrainbox.app/docs/notifications/routing.md) — send new-device alerts somewhere different from down devices
- [Built-in rules](https://infrainbox.app/docs/notifications/presets.md) — edit or override the default rule
