mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-09 07:45:41 +02:00
* feat(promunifi): add firewall policy metrics (closes #928) Bump unifi client to v5.22.0 and wire up firewall policy data end-to-end: - poller.Metrics: add FirewallPolicies []any slice - inputunifi: collect GetFirewallPolicies() per poll cycle; apply DefaultSiteNameOverride; augment into poller.Metrics - promunifi: export per-rule (rule_enabled, rule_index) and per-site aggregate metrics (rules_total, rules_enabled, rules_disabled, rules_by_action, rules_predefined, rules_custom, rules_logging_enabled) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * feat: export firewall policies to influx, datadog, and otel outputs Extends firewall policy support (PR #979) to all remaining output plugins: - influxunifi: batchFirewallPolicy() writes measurement "firewall_policy" with tags (rule_name, action, protocol, ip_version, source/dest zone, site_name, source) and fields (enabled, index, predefined, logging) - datadogunifi: batchFirewallPolicy() emits the same data as Datadog gauges under the "firewall_policy.*" namespace - otelunifi: exportFirewallPolicies() emits per-rule gauges (unifi_firewall_rule_enabled, unifi_firewall_rule_index) and per-site aggregates (rules_total, rules_enabled, rules_disabled, rules_by_action, rules_predefined, rules_custom, rules_logging_enabled) Also rebases onto master to pick up the otelunifi plugin (PR #978). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
poller
UniFi Poller Core
This module ties the inputs together with the outputs.
Aggregates metrics on request. Provides CLI app and args parsing.
Ideal
This library has no notion of "UniFi" or controllers, or Influx, or Prometheus.
This library simply provides an input interface and an output interface.
Each interface uses an []any type, so any type of data can be used.
That is to say, you could write input and output plugins that work with, say,
Cisco gear, or any other network (or even non-network) data. The existing plugins
should provide ample example of how to use this library, but at some point the
godoc will improve.
Features
- Automatically unmarshal's plugin config structs from config file and/or env variables.
- Initializes all "imported" plugins on startup.
- Provides input plugins a Logger, requires an interface for Metrics and Events retrieval.
- Provides Output plugins an interface to retrieve Metrics and Events, and a Logger.
- Provides automatic aggregation of Metrics and Events from multiple sources.