From 2b3cd32b9c466ae4867663a1be7a4e8babd5382f Mon Sep 17 00:00:00 2001 From: Sean Whalen <44679+seanthegeek@users.noreply.github.com> Date: Thu, 21 May 2026 13:52:33 -0400 Subject: [PATCH] chore: move PostgreSQL Grafana dashboard into dashboards/grafana/ (#780) The PostgreSQL dashboard shipped at the repo-root grafana/ by oversight; every other dashboard source lives under dashboards/ (opensearch/, grafana/, splunk/). Move it next to the existing Grafana dashboard, list it in dashboards/README.md, and fix the CHANGELOG path reference. Co-authored-by: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 2 +- dashboards/README.md | 1 + .../grafana}/Grafana-DMARC_Reports-PostgreSQL.json | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename {grafana => dashboards/grafana}/Grafana-DMARC_Reports-PostgreSQL.json (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2211697..3e75bb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ Backwards compatibility to RFC 7489 is maintained. #### PostgreSQL storage backend -New optional PostgreSQL output backend as a lighter-weight alternative to Elasticsearch/OpenSearch, configured via a `[postgresql]` section (host/port/user/password/database or a libpq `connection_string`). Tables are created automatically on first run, and the schema captures the RFC 9990 aggregate fields (`np`, `testing`, `discovery_method`, `generator`, `xml_namespace`, and per-result `human_result`). A Grafana dashboard (`grafana/Grafana-DMARC_Reports-PostgreSQL.json`) is included. Aggregate and SMTP-TLS reports are de-duplicated via `ON CONFLICT`; failure reports via an arrival-date / From / To / Subject check mirroring the Elasticsearch backend. +New optional PostgreSQL output backend as a lighter-weight alternative to Elasticsearch/OpenSearch, configured via a `[postgresql]` section (host/port/user/password/database or a libpq `connection_string`). Tables are created automatically on first run, and the schema captures the RFC 9990 aggregate fields (`np`, `testing`, `discovery_method`, `generator`, `xml_namespace`, and per-result `human_result`). A Grafana dashboard (`dashboards/grafana/Grafana-DMARC_Reports-PostgreSQL.json`) is included. Aggregate and SMTP-TLS reports are de-duplicated via `ON CONFLICT`; failure reports via an arrival-date / From / To / Subject check mirroring the Elasticsearch backend. The backend is opt-in: install it with `pip install parsedmarc[postgresql]` (it pulls in `psycopg`). It is not a mandatory dependency because the prebuilt `psycopg` binary wheels are not available for every platform. diff --git a/dashboards/README.md b/dashboards/README.md index 564b43d..e2a3bd3 100644 --- a/dashboards/README.md +++ b/dashboards/README.md @@ -4,6 +4,7 @@ This directory holds the dashboard sources that ship with parsedmarc: - [opensearch/opensearch_dashboards.ndjson](opensearch/opensearch_dashboards.ndjson) — the source-of-truth saved-objects export. It is imported into both **OpenSearch Dashboards** and **Kibana** (the file format is compatible with both). - [grafana/Grafana-DMARC_Reports.json](grafana/Grafana-DMARC_Reports.json) — the Grafana dashboard, with two Elasticsearch datasources (`dmarc-ag`, `dmarc-fo`). +- [grafana/Grafana-DMARC_Reports-PostgreSQL.json](grafana/Grafana-DMARC_Reports-PostgreSQL.json) — the Grafana dashboard for the PostgreSQL backend. - [splunk/](splunk/) — three Splunk dashboard XML views (`dmarc_aggregate`, `dmarc_failure`, `smtp_tls`). Edits to any of these files should be exported from a running instance after authoring the change in the UI, not hand-edited (with the occasional exception of small XML tweaks for Splunk). diff --git a/grafana/Grafana-DMARC_Reports-PostgreSQL.json b/dashboards/grafana/Grafana-DMARC_Reports-PostgreSQL.json similarity index 100% rename from grafana/Grafana-DMARC_Reports-PostgreSQL.json rename to dashboards/grafana/Grafana-DMARC_Reports-PostgreSQL.json