mirror of
https://github.com/unpoller/unpoller.git
synced 2026-09-30 03:21:28 +02:00
feat: add save_syslog option for v2 system-log API
Add new save_syslog config option to collect events from the v2 UniFi
system-log API (/v2/api/site/{site}/system-log/all).
Changes:
- Add SaveSyslog field to Controller struct
- Add collectSyslog() function using v2 API
- Keep collectEvents() using v1 API for backwards compatibility
- Add RedactIPPII() helper for PII redaction
- Update lokiunifi to log raw JSON (parseable with Loki | json)
- Reduce indexed labels to low-cardinality fields only
- Add SystemLogEntry handler in lokiunifi report
Config: save_syslog (v2 API) vs save_events (v1 API)
Env: UP_UNIFI_DEFAULT_SAVE_SYSLOG=true
This commit is contained in:
@@ -174,13 +174,19 @@
|
||||
# Enable this only if using InfluxDB or Loki. This will leak PII data!
|
||||
save_ids = false
|
||||
|
||||
# Enable collection of UniFi Events (InfluxDB/Loki only).
|
||||
# This may store a lot of information. Only recommended for testing and debugging.
|
||||
# There are no dashboards to display this data. It can be used for annotations.
|
||||
# This is a new (June, 2020) feature. Please provide feedback if you try it out!
|
||||
# Enable this only if using InfluxDB or Loki. This will leak PII data!
|
||||
# Enable collection of UniFi Events using the v1 API (InfluxDB/Loki only).
|
||||
# This uses the legacy /api/s/{site}/stat/event endpoint.
|
||||
# For UDM devices, use save_syslog instead (v2 API).
|
||||
# Enable this only if using InfluxDB or Loki. This may leak PII data!
|
||||
save_events = false
|
||||
|
||||
# Enable collection of UniFi System Log using the v2 API (Loki only).
|
||||
# This uses the /v2/api/site/{site}/system-log/all endpoint.
|
||||
# Recommended for UDM/UDM-Pro/UCG devices running modern firmware.
|
||||
# Provides richer event data including client roaming, admin access, etc.
|
||||
# Enable this only if using Loki. This may leak PII data!
|
||||
save_syslog = false
|
||||
|
||||
# Enable collection of UniFi Alarms (InfluxDB/Loki only).
|
||||
# There are no dashboards to display this data. It can be used for annotations.
|
||||
# This is a new (June, 2020) feature. Please provide feedback if you try it out!
|
||||
@@ -232,6 +238,7 @@
|
||||
# hash_pii = false
|
||||
# save_ids = false
|
||||
# save_events = false
|
||||
# save_syslog = false
|
||||
# save_alarms = false
|
||||
# save_anomalies = false
|
||||
# save_dpi = false
|
||||
|
||||
Reference in New Issue
Block a user