Add auth exporter module: implement Prometheus scrape configuration, exporter logic, and Grafana dashboard

This commit is contained in:
2025-10-03 00:59:58 +02:00
parent eb60d37c2d
commit cd69dbc25a
7 changed files with 303 additions and 0 deletions
@@ -0,0 +1,20 @@
Auth exporter Grafana dashboard
=================================
This directory contains a Grafana dashboard JSON you can import to visualize the auth-exporter metrics.
Panels included
- Active sessions (by source) — `auth_sessions_active`
- Auth sessions started (rate) — `sum by (source, method) (rate(auth_sessions_total[5m]))`
- Parse errors (rate) — `rate(auth_exporter_parse_errors_total[5m])`
- Exporter uptime — `auth_exporter_uptime_seconds`
- User label drops — `rate(auth_exporter_user_labels_dropped_total[5m])`
- Top users table (optional, only useful if `--export-usernames` is enabled) — `topk(N, sum by (username) (rate(auth_sessions_by_user_total[5m])))`
How to import
1. In Grafana, go to Dashboards → Import.
2. Upload the `auth_exporter_dashboard.json` file or paste its JSON.
3. Choose your Prometheus datasource.
Privacy and performance note
- The "Top users" table requires the exporter to be run with `--export-usernames`. That option can generate high-cardinality series and should only be enabled for small, controlled environments or with a username whitelist.