How Decidim dashboards in Grafana connect to participation data
Decidim provides importable Grafana dashboard examples that connect to participation data either through open data CSV files or through the GraphQL API. A city, government or organization that wants participation metrics on screens its staff already use should start by choosing that data path, because the choice decides how current the numbers are and how much data the dashboards can show. This section explains how the three parts divide the work and sets the boundary of what this page covers: the supported method described in the Decidim documentation, and nothing beyond it.
Decidim owns the source data. It holds the processes, proposals, meetings and other participation records, and it is the only system that decides what is public. The data path is the bridge. With open data CSV, Decidim publishes files covering all public data, but those files are not real time, so they suit trend charts and periodic reporting. With the GraphQL API, the dashboards query Decidim directly and see current records, but the API limits how many resources a single request returns. The Decidim Grafana documentation recommends CSV beyond the last 10 or 20 resources, so any dashboard showing full history should be planned around CSV from the start. Confirm the current limit in the instance's own API documentation before you design panels.
The Grafana instance is the third part, and it is where most of the operational decisions sit. Grafana reads the data through a data source you configure, then renders the imported dashboards for your staff. Ask who will own the Grafana server, where it runs, how its users sign in, and who may edit dashboards versus view them. Decide early whether the instance is shared with other teams, because that affects access control and the data sources people can reach. Also confirm which Grafana version your team will run, since Grafana's own support windows for minor releases affect how long a given installation stays supported.
What you need before connecting Decidim to Grafana
Connecting Decidim to Grafana depends on four things being in place before any dashboard is built: a supported Decidim instance, a supported self-hosted Grafana with a production database, a network path from Grafana to Decidim, and a named owner for what data is shared. Check each one first, because a gap in any of them shows up later as stale or missing panels.
A supported Decidim version
Security updates currently cover the 0.32.x and 0.31.x branches, and older branches are not supported. Confirm which minor version your instance runs before you choose a data source, since the Grafana examples depend on the public endpoints of that instance. If you run 0.30.x or earlier, plan an upgrade first, moving one minor version at a time with a database backup before each step. Ask your platform team to confirm the exact version from the running instance, not from the deployment record.
Decidim security policyA supported self-hosted Grafana
Run a Grafana release that is still inside its support window, and plan to apply patch releases as they arrive. Install it in infrastructure your organization controls so the dashboards and their data stay under your governance. Pick a supported installation method, such as packages or Docker images, and record the version in your change log. Confirm with your Grafana provider which release line you are on before you import any dashboard.
Grafana installation docsA production database for Grafana
Grafana stores its configuration in SQLite by default, but the installation docs say SQLite does not scale for production. Use MySQL 8.0 or later, or PostgreSQL 12 or later, for any production deployment or high availability setup. Decide which database team owns backups and restores before the dashboards become part of regular reporting. Ask whether the database sits in the same network zone as Grafana and whether its credentials are stored in your secrets manager.
Network access to public Decidim endpoints
Grafana must reach the public Decidim endpoints that serve open data CSV files or the GraphQL API. Test that path from the Grafana host, not from your workstation, because egress rules, proxies and web application firewalls often differ between them. Confirm that TLS certificates are valid and that outbound rules allow the Decidim hostname. If the Grafana instance runs in a restricted network, ask the Decidim operator which endpoints must be opened.
A named data owner for shared data
Someone in the organization must decide which public Decidim data appears on dashboards and who approves changes to that scope. The Decidim admin panel controls what is published, so the admin or data owner should confirm which processes, components and fields are part of the open data export before anyone builds a panel. Record that decision, along with who can view the dashboards in Grafana, so a later audit can trace it.
Freshness requirements for each panel
Before choosing CSV or the GraphQL API, write down how current each panel must be. CSV open data covers all public data but is not real time, while the GraphQL API offers real-time access with a limit on the number of resources returned. Ask the data owner whether a panel needs live counts or a daily snapshot, and whether a larger history must be included. That answer determines which connection method you configure in the next steps.
Choosing open data CSV or the GraphQL API
Panels that show the latest proposals, comments or meeting registrations are the case where the GraphQL API fits best. Decidim's Grafana examples can query the API for the most recent resources, so a panel reflects new participation without waiting for an export. The trade-off is the resource limit: the API returns a bounded number of items per query, and the Decidim docs recommend switching to CSV once a panel needs more than the last 10 or 20 resources. Plan the panel to show a small, fixed window, such as the latest activity for a single process, and keep it that way.
- Use the API for short windows: A panel of the latest ten to twenty items stays within the recommended range and refreshes with the query.
- Scope queries tightly: Filter by space or component so the most recent items are the ones participants care about, not a mix from the whole instance.
- Expect HTML in responses: Text fields from the API may contain markup, so check how the panel renders titles and bodies before publishing.
- Plan for a moving window: A count of "last 20 items" is not a total, so label the panel accordingly.
- Confirm authentication needs: Check whether your instance exposes the API publicly or requires authentication before you rely on it.
Before you build, confirm the exact query limit and access rules on your Decidim version in the instance documentation.
Totals, trends across a whole participation cycle and comparisons between processes need the complete record. The open data CSV files cover all public data, so they are the right source for these panels. The trade-off is timing: CSV files are not real time, so a figure is only as current as the last export. For a dashboard that reports a finished consultation or an annual summary, that lag is usually acceptable and the complete dataset is more valuable than freshness.
- Use CSV for totals: Counts of proposals, votes or participants across a full process rely on the complete dataset rather than a limited window.
- Schedule the refresh: Match the export schedule to how often officials review the dashboard, and show the last update time on the panel.
- Keep the files together: Load the CSV files into a data store that Grafana can query, so trends are computed from one consistent snapshot.
- Document the data scope: Note which public components and spaces are included, so readers do not assume private or unpublished data is covered.
- Test with a known total: Compare a dashboard figure with the count shown in the Decidim admin area for the same space.
Confirm with your Decidim administrator how the open data export is scheduled and where the files are published on your instance.
Panels that show what is happening right now, such as the number of open votes or active meetings, are where real-time access matters most. The GraphQL API offers real-time access, so it is the natural path for live status. Because the API limits how many resources come back, a live panel should not try to list everything. Instead, it should count or display a small set of current items. A live panel still justifies the API when the operational question depends on the present state rather than the history, and when a few minutes of delay would change what an operator does.
- Limit live panels to current state: Show open items, current status or the newest entries rather than full lists.
- Choose refresh intervals deliberately: Frequent queries add load on the Decidim instance, so agree a refresh rate with the platform team.
- Separate live and historical views: Keep live status on its own dashboard so readers do not mistake a window for a total.
- Handle failures visibly: Show an error or stale marker when the API is unreachable instead of a zero that looks valid.
- Review access and rate limits: Confirm the limits that apply to your instance and any authentication the queries require.
Ask your platform team to confirm the query rate and access settings before a live panel goes into a public or executive view.
How to import and configure the Decidim Grafana dashboards
This sequence takes you from an open data export on the Decidim side to Grafana panels that you have checked against figures visible on the public platform. Each step ends with a check so you know the dashboards are reading the right data before anyone relies on them.
Confirm the open data export on Decidim
Ask the platform administrator to confirm that the open data export is enabled and that the export task runs on a schedule. Open the generated files on the server or in the download location, and confirm they contain the processes, proposals and results you plan to chart. The step is done when the administrator can name the last export time and you have opened at least one file that contains recent proposals. Ask the administrator to confirm the export location and access rules, since Grafana will need to read those files.
Import the example dashboards into Grafana
Download the example dashboards from Decidim's Grafana documentation and import them into your Grafana instance using the dashboard import function. Your Grafana team should review each panel's queries before saving, because the examples are starting points and assume a particular data layout. The step is done when every example dashboard appears in your dashboard list and opens without errors, even if the panels still show no data.
Choose and configure the data source
Decide between open data CSV and the GraphQL API before you edit the panels. CSV covers all public data but is not real time, so it suits historical reporting and larger datasets. The GraphQL API gives real-time access but limits the number of resources returned, and the Decidim documentation recommends CSV beyond the last 10 or 20 resources. Configure the data source for the option you chose, using the endpoint or file location your Decidim instance exposes. The step is done when a single test panel returns rows from your instance.
Set time ranges and variable filters
Set the dashboard time range and the variables that filter by space, component or other fields in the examples. Confirm that the filters match the labels your organization uses for processes and components, since the names in your instance may differ from the examples. Choose a fixed window for the first verification so the counts can be compared with a known date range. The step is done when changing a filter updates the panels as expected and the selected range is recorded with your verification notes.
Verify each panel against public counts
Compare each panel with the figures shown on the public pages of your Decidim instance for the same filter and date range. Counts of proposals, meetings or votes should match, and differences should be explained before you publish. If a panel does not match, check the query, the time zone, whether the data is unpublished or hidden, and whether the CSV file was refreshed after the period you selected. The step is done when every panel has a recorded match or a documented reason for a difference.
Document the dashboards and set access
Record the data source, export schedule, filters and verification results for each dashboard in a short runbook that your team keeps with the instance configuration. Set Grafana folder and user permissions so that only the intended audiences can view or edit dashboards, and confirm which accounts can change data sources. The step is done when the runbook is stored with the team, permissions are tested with a non-administrator account, and the owner of each dashboard is named.
How data moves from Decidim into Grafana panels
The flow starts in the public Decidim instance, which exposes open data CSV files and a GraphQL endpoint. Grafana reads from one of these through a data source inside the internal network, and dashboard panels render the results for viewers. The trust boundary sits between the public internet and the Grafana network, so check which side each connection crosses and whether the Grafana server or the viewers' browsers are the ones calling Decidim. Note that CSV files are not real time, while the GraphQL route is live but capped in how many resources it returns.
Two Decidim sources feed Grafana panels across the public and internal boundary.
Why the GraphQL pagination limit decides the dataset strategy
The resource limit on GraphQL responses decides whether a Grafana panel can be trusted for older data. Decidim's Grafana examples can read through the GraphQL API, which gives real-time access, but the docs cap how many resources a single response returns and recommend CSV once a panel needs more than the last 10 or 20 resources. A panel that covers older proposals, meetings or processes can therefore look complete while silently showing only the most recent items. Decide the dataset strategy per panel before building anything: live counters and recent activity can stay on GraphQL, while historical totals, trends and per-space breakdowns belong on the CSV open data files.
To test a panel for truncation, compare its numbers with an independent count. Take the total number of proposals, meetings or processes in the Decidim admin or public listing for the same space and period, then compare it with the value the panel shows. If the panel stops at exactly 10 or 20 items, or its total does not match the source, the query is truncated. Confirm the exact limit and its behavior on your Decidim version in the Grafana documentation before relying on a threshold, because the number your instance enforces is the one that matters.
If a panel needs more than the limit allows, split the query rather than widening it. Filter by participatory space, such as one process or assembly at a time, or by a time window such as a year or quarter, and sum the results in the dashboard. Check that the windows do not overlap or leave gaps at their boundaries, especially around the creation dates of items. For long-term reporting, the CSV open data export is usually the simpler and more auditable option, and the scheduled export and file contents are covered in the open data section.
Mapping Decidim data fields to Grafana panels
This table pairs each main Decidim entity with its likely data source, the Grafana panel types it usually feeds, how current the data is, and where time zone or locale settings can shift your numbers. Read the source column first, because the CSV and GraphQL routes trade freshness for completeness. The main takeaway is that date-based panels need one agreed time zone before you compare them with figures reported from the platform.
| Entity | Source and panel types | Refresh behavior | Time zone or locale check |
|---|---|---|---|
| Processes and assemblies | CSV for full history, feeding status tables and counts by participatory space. GraphQL only for a short list of recent spaces. | CSV is periodic. GraphQL is near-immediate but limited to the most recent resources. | Confirm which date fields the export uses for start and end dates and whether they are stored in UTC. |
| Proposals | CSV for time series of submissions and bar charts by category or state. GraphQL for a short activity feed. | CSV is periodic. GraphQL is near-immediate for the last 10 or 20 items. | Check how creation and publication timestamps are stored, since weekly counts shift at midnight in different zones. |
| Meetings | CSV for meeting counts by month and calendar-style tables. GraphQL for upcoming meetings in a short list. | CSV is periodic. GraphQL is near-immediate but capped by the resource limit. | Meeting start times often need conversion to the organization's zone, so set the Grafana dashboard zone to match. |
| Participatory budgets | CSV for allocated amounts and stacked bars by budget or project. GraphQL for current project totals if the list is short. | CSV is periodic. Totals can lag behind voting that is still open. | Check currency symbols and decimal separators in exported amounts, which can differ by locale. |
| Participants | CSV for registration counts over time as stat and trend panels. Avoid pulling personal fields into shared dashboards. | CSV is periodic. GraphQL access depends on the permissions of the API user. | Confirm the timestamp used for registration and whether the export includes data that your privacy review does not allow. |
| Multilingual content | CSV or GraphQL text fields in tables and lists, with titles shown in one chosen language. | Follows the refresh behavior of the source route used. | Decide which locale to display, because titles and descriptions can be empty or differ in translation. |
Hardening the Grafana side of the integration
Grafana sits between your Decidim data and the people who read it, so its settings need the same care as the Decidim instance itself. The cards below cover the Grafana security settings, access to dashboards and editing rights, and the data boundary that keeps private participant information out of panels.
Cookie and browser protections
Grafana's security hardening guidance recommends secure and SameSite cookies, which keep session cookies off plain HTTP and limit cross-site sending. Pair them with a Content Security Policy and Trusted Types so injected scripts cannot run in a logged-in dashboard session. Check these settings in your Grafana configuration file and test them through the reverse proxy, because a TLS terminator in front of Grafana can change what the browser sees.
Security hardening docsVersion exposure and metrics endpoint
Grafana can hide its version from unauthenticated visitors, which removes an easy target for version-specific attacks. The metrics endpoint should require authentication so that internal runtime data is not readable by anyone who can reach the server. Confirm both settings in your deployment, and confirm that your load balancer or monitoring system can still scrape the endpoint once authentication is required.
Domain verification against DNS rebinding
Grafana can verify the domain in incoming requests, which blocks DNS rebinding attacks that would let a malicious page reach an internal Grafana instance through a victim's browser. Set the expected public domain in the server configuration and test access from every hostname your staff use, including any internal aliases. Dashboards hosted on a network you do not control are the most exposed case.
Login and identity provider confirmation
Grafana's authentication docs list LDAP, generic OAuth, Entra ID, Okta, GitHub, GitLab and Google OAuth for all editions, while SAML, team sync and SCIM provisioning are limited to Grafana Enterprise and Grafana Cloud. Confirm which of these your organization's identity provider supports before you design role mapping, because role changes made in the identity provider will not flow into Grafana without a supported sync method.
Authentication docsDashboard editing and folder permissions
Limit dashboard editing to a small group, such as the team that owns the Decidim data model, and keep most viewers in a read-only role. Organize dashboards into folders with explicit permissions so that a participation team cannot change a shared panel by accident. Record who holds the Editor and Admin roles, review that list when staff change, and decide whether panels that query the Decidim API can be edited by people outside the owning team.
Public versus private dashboards
Decide which dashboards are public before anyone builds them, because a public dashboard shows its panels to people who never sign in. Treat a public dashboard as a publication decision that needs the same review as a published report. Keep operational views, such as API error rates or the number of failed sign-ins, in private folders that only the platform team can open.
Public Decidim data only in panels
Panels should query only data that Decidim already publishes, such as the open data CSV exports or public API fields for processes, proposals and meetings. Private proposals, unpublished results, moderation queues and participant identities should never reach a Grafana data source. Write this rule into the dashboard design document and review each new query against it before the panel goes live.
Decidim Grafana docsCommon Grafana dashboard failures and fixes
This table lists the failures teams most often hit when a Decidim dashboard runs in Grafana, with the cause and fix for each. Read it when a panel looks wrong, and check the data source choice first, since most symptoms trace back to how the dashboard connects to Decidim.
| Failure | Likely cause | Fix |
|---|---|---|
| Panels show fewer records than expected | The GraphQL API returns a limited number of resources per query, so counts and tables stop at that cap | Confirm the cap in the Decidim Grafana docs. For totals or history beyond the last 10 or 20 resources, switch the affected panels to the open data CSV files. |
| Numbers look stale or lag behind the platform | CSV files are exports, not live data, so they only reflect the last time the export ran | Check the export schedule and the file timestamp. Use GraphQL panels where near-real-time figures matter, and label CSV-based panels with their refresh time. |
| Data source errors after a Decidim upgrade | A minor release changed field names, types or query shape, so queries or CSV column references no longer match | Read the upgrade notes for the target version, compare the current schema and CSV headers with saved queries, and update panel definitions in a staging copy before production. |
| Missing or shifted values on time-based panels | Timestamps come from Decidim in UTC while Grafana panels use the browser or dashboard time zone | Set the dashboard time zone explicitly, convert timestamps in queries or transformations, and test daily counts near midnight against a known record. |
| Dashboards show no data after a Grafana upgrade | Grafana major or minor releases can change plugin behavior, data source settings or panel options, and older dashboards may not load cleanly | Test dashboards on a staging Grafana at the target version first, review the upgrade guide for the release, and keep dashboards as provisioned files so they can be restored. |
| Data source connection fails for some users only | Authentication or network rules differ between users, such as tokens, proxies or access policies on the Decidim side or the Grafana side | Confirm which credentials the data source uses, verify network paths from the Grafana server to Decidim, and check Grafana authentication settings for the affected group. |
| Duplicate or inconsistent counts across dashboards | Panels query different scopes, such as different organizations, spaces or date filters, or mix CSV and GraphQL sources | Document the source and filter for each panel, use one source per metric where possible, and reconcile totals against the Decidim admin panel. |
Questions buyers ask about Decidim Grafana dashboards
Can our in-house team build Decidim Grafana dashboards without a partner?
Yes, if your team already runs Rails applications, PostgreSQL and Grafana and can read the Decidim Grafana documentation. The dashboard examples are importable, but they still need a Grafana data source, credentials for either the open data files or the GraphQL API, and panels that match your own participation questions. Ask yourself whether someone on the team will own the dashboards after launch, because the work recurs with each Decidim and Grafana upgrade. A partner is useful when you need the work scoped in writing, delivered on a fixed timeline, or handed over with documentation your operations team can follow.
What drives the effort of a Decidim Grafana dashboard project?
Effort rises with four factors:
- The number of panels and the questions each panel must answer.
- The volume of data, since the GraphQL API returns a limited number of resources, so larger datasets push the design toward CSV.
- Identity and hosting choices, such as how Grafana users sign in and whether Grafana runs on infrastructure you control.
- The number of Decidim instances, because each instance needs its own data source, access settings and checks.
Ask for each of these to be listed separately in a quote so you can see which choices change the price.
How long does a Decidim Grafana dashboard project take?
The timeline depends on the number of panels, the data sources, the identity setup and how many Decidim instances are in scope, so no general duration applies. The first step is agreeing on the questions the dashboards must answer, because that fixes the data each panel needs. Next come the data source connections, the imported or rebuilt panels, access controls and a review with the people who will use the dashboards. Ask for the timeline as a list of milestones tied to the written scope, and confirm which steps depend on access to your Decidim and Grafana environments.
What must our organization provide before dashboard work starts?
Plan to provide the following before work starts:
- Access to a Decidim instance or a test copy, and a named contact who knows which spaces and components you want to report on.
- A Grafana instance or a decision about where it will run, along with the Grafana database choice. Grafana's installation documentation says SQLite does not scale for production, so production setups need MySQL or PostgreSQL.
- Decisions on who may view the dashboards and how they sign in.
- Read access to the open data files or API credentials, and the list of questions that the dashboards must answer.
Confirm each item with your own infrastructure and security teams before the scope is fixed.
Should Decidim Grafana dashboards use open data CSV or the GraphQL API?
Choose CSV for larger datasets and historical reporting, and the API when you need near real-time figures for a small set of recent records. Decidim's Grafana documentation notes that the open data CSV files cover all public data but are not real time, while the GraphQL API offers real-time access with a limit on the number of resources returned. The docs recommend CSV beyond the last 10 or 20 resources. Many dashboards use both: CSV for totals and trends, and the API for a short live feed. Confirm how many records your panels must read and how fresh they must be before you decide.
How do Decidim and Grafana upgrades affect the dashboards?
Each upgrade can change the data the dashboards read or the way Grafana loads them, so every upgrade needs a test pass. Decidim's update guidance says to move one minor version at a time, follow each release's upgrade instructions because some change database structures, and back up the database first. Grafana's upgrade guidance says minor releases arrive every other month and patch releases at least monthly, with each minor release supported for 9 months. Build the dashboards as provisioned files kept in version control, so that you can reapply them after an upgrade. Ask any partner to state how upgrades and retesting are priced and scheduled.
Does the Decidim Grafana dashboard project expose participant data?
The dashboards themselves can be built to show only aggregated public data, but the exposure depends on how Grafana is hosted and who can reach it. Grafana's security hardening documentation recommends secure cookies, a Content Security Policy, hiding the version from unauthenticated users, requiring authentication for the metrics endpoint and domain verification against DNS rebinding. Grafana's authentication options also differ by edition, so SSO features such as SAML may need Grafana Enterprise or Grafana Cloud. Confirm your data classification, your identity provider and the Grafana edition you plan to run before the design is approved.
What does the Grafana license mean for running these dashboards?
Grafana moved from Apache License 2.0 to AGPLv3 for Grafana, Loki and Tempo on April 20, 2021, and offers Grafana Enterprise as a non-AGPL commercial option. Using Grafana internally under the open-source license is a different question from distributing modified versions or offering it as a hosted service, so have your legal team review the terms that apply to your use. Plugins and agent software may carry their own licenses. Confirm which Grafana edition, plugins and hosting model you will use before you commit to the design.
Official Decidim and Grafana sources to read first
Start with the Decidim Grafana documentation, which is the primary reference for this topic. It describes the importable dashboard examples, the two connection methods (open data CSV files and the GraphQL API), and the guidance to prefer CSV beyond the last 10 or 20 resources. Read it against the Decidim version you run, because the dashboard examples and the open data export depend on your release. The current documentation is published on the develop branch, so confirm with your Decidim team whether the page matches your installed 0.31.x or 0.32.x release before you copy any query or file path. Also check that the instance you connect to exposes the endpoints the examples expect, since the public API and open data settings are controlled per organization.
Then read the Grafana side in this order: the installation guide, the high availability guide, the authentication guide and the security hardening guide. The installation guide sets the database requirement, since SQLite is not suitable for production and MySQL or PostgreSQL is required for production and high availability. The high availability guide covers the active-active pattern behind a load balancer and notes that alerting needs extra configuration to avoid duplicate notifications. The authentication guide shows which login methods your edition supports, which matters if your staff sign in through SAML or SCIM. The security hardening guide lists cookie, Content Security Policy and metrics endpoint settings to review before exposing dashboards to a wider audience.
Grafana publishes new minor and patch releases often, and its documentation changes with them, so treat every page here as a snapshot to check against the version you deploy. Record the Grafana and Decidim versions you tested, pin them in your change records, and confirm current behavior with the upstream release notes and your own staging environment before go-live. Ask your DeployOpen contact to walk through these sources during scoping so the build plan reflects the versions you actually run.
How DeployOpen scopes and delivers Decidim dashboards
DeployOpen treats Decidim dashboards in Grafana as a fixed-scope piece of work inside your own infrastructure. We agree in writing which Decidim instance, data path and Grafana deployment are covered, then build, test, document and hand over the dashboards so your team can run them.
How we scope
- Confirm which Decidim instance, spaces and components the dashboards must cover
- Choose between open data CSV and the GraphQL API for each panel, with the row limits in mind
- Agree the Grafana deployment, data source connections and who owns each dashboard in writing
How we build
- Import and adapt the Decidim Grafana examples to your organization's processes and metrics
- Connect the chosen data sources and set refresh schedules that match how current the data must be
- Test panels against known Decidim data and review queries for correctness and load
How we hand over
- Deliver dashboards, data source configuration and provisioning files for your version control
- Document each panel's source, refresh behavior, known limits and the steps to add a new view
- Walk your platform and analytics teams through operation, access and update procedures
How we support
- Available as a retainer for dashboard changes, Grafana updates and Decidim upgrades
- Retesting dashboards after Decidim minor version upgrades, which follow their own upgrade instructions
- Ongoing review of data source access and Grafana security settings as part of the agreed scope

