unpoller_unpoller/pkg
Cody Lee 97d3f995b1
Enrich alarms with device names for Loki logs
Added device name enrichment to alarms so that Loki logs show
human-readable device names instead of just MAC addresses.

Changes:
- Modified collectAlarms to fetch devices and build MAC-to-name lookup
- Added extractDeviceNameFromAlarm helper to extract MAC addresses from
  alarm messages and lookup corresponding device names
- Device names are extracted from messages like "AP[fc:ec:da:89:a6:91]"
  or from SrcMAC/DstMAC fields
- Added go.mod replace directive to use local unifi library with new
  DeviceName field

The device_name field will now be included in the JSON output sent to
Loki, making it easier to identify which device triggered an alarm.

Fixes #415

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:17:12 -06:00
..
datadogunifi Populate num_user field for VPN subsystem metrics 2026-01-25 12:09:01 -06:00
influxunifi Populate num_user field for VPN subsystem metrics 2026-01-25 12:09:01 -06:00
inputunifi Enrich alarms with device names for Loki logs 2026-01-25 12:17:12 -06:00
lokiunifi feat: add UniFi Protect logs support with Loki integration 2025-12-22 22:55:30 +01:00
mysqlunifi add integration test guard; 2023-07-31 14:40:33 -05:00
poller Add config option to suppress unknown device type messages 2026-01-25 11:24:33 -06:00
promunifi Populate num_user field for VPN subsystem metrics 2026-01-25 12:09:01 -06:00
unittest Temp fix for test cases and warning from Dockerfile 2025-12-24 00:23:05 -05:00
webserver Fix health check port binding conflict (issue #892) 2025-12-09 08:11:21 -06:00