Dashboards (Superset)
The G2P Bridge ships a set of read-only monitoring dashboards for the platform Apache Superset (commons-services-superset). They give operators a view of disbursements, failures, reconciliation, SPAR mappings and the Example Bank — without any custom UI.
Superset connects to the bridge / SPAR / Example-Bank databases as a read-only data source and stores the dashboards in its own metadata database. The G2P Bridge Helm chart is not coupled to Superset — the dashboards are uploaded manually by a Superset admin (see Why manual).
Dashboards offered
Operations Overview
g2p_bridge
totals, amount disbursed, by-stage, by-program, volume over time, recent disbursements
Failures & Exceptions
g2p_bridge
cancellations, FA / sponsor-dispatch error codes, distribution by current stage
Reconciliation & Settlement
g2p_bridge
reconciliation records, recon errors by reason, reversals
SPAR — Mappings, Strategies & Parties
spar
ID→FA mappings, strategy registry, banks registry
Example Bank (Simulator)
example_bank_db
accounts & balances, payment batches by status, transactions over time
All five are read-only. The dashboards themselves are release-agnostic — table names are identical across bridge releases; only the database connection is environment-specific (set once, at import time).
Prerequisite — the read-only DB role
Superset connects with a SELECT-only Postgres role (superset_ro) so SQL Lab and the dashboards can read data but never modify it. This is automated by the bridge chart — enable it once per environment:
# values.yaml
supersetReadOnly:
enabled: true # default falseOn install and every upgrade the chart then:
creates the
superset_rorole (read-onlySELECTong2p_bridge,example_bank_dbandspar, including future tables), andpublishes its generated password in a Secret named
<release>-superset-ro(keypassword), kept stable across upgrades.
The database names are taken from chart values, not hard-coded: global.bridgeDB (tracks the release name), global.exampleBankDB, and global.sparDB (surfaced in Rancher as “SPAR Database Name”, default spar) — override global.sparDB if SPAR's database is named differently in your environment.
Read the password (you'll paste it once during import):
Not using the chart automation? Create the role manually with
deployment/superset/01-readonly-role.sqlfrom the g2p-bridge repo.
Uploading the dashboards (admin steps)
After the bridge and Superset are both installed:
Download the bundle
g2p-bridge-dashboards.zip— from the GitHub Release assets (recommended; no checkout needed) or fromdeployment/superset/in the g2p-bridge repo.Get the read-only password from the
<release>-superset-roSecret (above).In Superset: log in (SSO) → Settings → Import Dashboards →
upload
g2p-bridge-dashboards.zip,tick “Overwrite existing”,
when prompted, paste the
superset_ropassword for each connection.
Open the dashboards under Dashboards.
That's the whole flow: download → upload → paste password once. The export masks passwords, so nothing secret is stored in the ZIP or the repo.
Re-importing / updating
Re-uploading the ZIP with “Overwrite existing” ticked updates the dashboards in place (matched by UUID) — same dashboards, same URLs, content replaced. It is not a delete-and-recreate, and it never creates duplicates. Note it is an update, not a full sync: a chart removed in a newer bundle is not auto-deleted.
Connection details (host / database are environment-specific)
A Superset export stores each connection's full host + database name — the bundled ZIP was generated in-cluster, so its three connections point at host commons-postgresql and databases g2p_bridge, spar, example_bank_db. On import, Superset keeps host and database and only re-prompts for the password. Both the host and the database name are environment-specific, so for anything other than the default in-cluster setup you must adjust them. Two ways:
Edit the connections after import — Settings → Database Connections → edit each of the 3 (
g2p_bridge,spar,example_bank) and set all three of:host:port → your Postgres (external IP/host),
database name → your actual DB. The bridge DB name is derived from the Helm release name (dashes → underscores): release
g2p-bridge→g2p_bridge, releaseopeng2p-bridge→openg2p_bridge. (spar/example_bank_dbare usually unchanged.)password → the
superset_ropassword (from the<release>-superset-roSecret).
Provision instead of importing (recommended for external / renamed setups — nothing to edit) — run
provision_dashboards.py, passing the host and (if the release was renamed) the bridge DB name:(
BRIDGE_DBdefaults tog2p_bridge;SPAR_DB/EXAMPLE_BANK_DBare also overridable.)
The read-only role itself is created on whatever global.postgresqlHost points at, so it already works with external Postgres — only the static bundle carries a fixed host.
Troubleshooting
permission denied for table disbursements (or any table) — the connection authenticated (password is fine) but the superset_ro role has no SELECT on the tables. This happens when the role's grants were applied before the bridge app created its tables (first install), or on external Postgres where the database owner differs from the user the app uses to create tables. Fix by re-applying the grants now that the tables exist — either:
re-run the chart job:
helm upgrade <release> …(the grant job re-runs), orgrant directly (as the Postgres superuser / DB owner), per database:
The chart's role Job now waits for the tables to exist before granting and sets future-table default privileges for every table-owning role (not just the DB owner), so a fresh or external-Postgres install grants correctly on its own.
Dashboards show a connection error after a reinstall — the superset_ro password the dashboards' connection stored no longer matches the role. By design the password is kept stable across uninstall/reinstall (the <release>-superset-ro Secret has resource-policy: keep, a plain helm uninstall keeps it, and the uninstall script preserves it too), so this normally does not happen. It only happens if you uninstalled with --drop-superset-ro, deleted the Secret, or moved to a fresh environment — all of which mint a new password.
Re-importing the ZIP does not fix it and does not re-prompt for the password: Superset matches the database connection by UUID and silently reuses the existing connection (with the stale password). To fix, do one of:
Re-run the provisioner (recommended — sets the password directly via the ORM, no re-import needed):
Edit the connection in Superset: Settings → Database Connections → edit the
g2p_bridge/spar/example_bankconnection → paste thesuperset_ropassword from the Secret.Fully remove, then re-import: run
remove_dashboards.py(it deletes the dashboards and the connections), then re-import the ZIP — now it prompts for the password because the connection is new. (Deleting only the dashboards in the Superset UI leaves the connection, which is exactly why a re-import doesn't prompt.)
Why manual
Superset and the bridge have independent lifecycles — you may run Superset without the bridge, or the reverse. If Superset preloaded these dashboards, they would point at databases/tables that may not exist (broken charts). So they are loaded only where the bridge data actually exists, by an admin, against whichever database the connection points at.
Uninstalling — clean teardown
To remove everything (nothing left hanging; a later reinstall is fresh), run these two commands, in order. Replace <ns> with your namespace.
Step 1 — remove the dashboards from Superset:
Step 2 — uninstall the bridge (DBs, roles, the superset_ro role + Secret, everything):
Done — Superset has no bridge dashboards/connections, Postgres has no bridge DBs or roles, and Kubernetes has no bridge workloads/secrets.
Maintaining the bundle (for maintainers)
The dashboards are defined in code at deployment/superset/provision_dashboards.py (idempotent). To regenerate the shareable ZIP after editing, run it inside the Superset pod and re-export:
Last updated
Was this helpful?