Skip to main content
A dashboard definition is a JSON file that lists the widgets of a dashboard and their queries. You keep the file in your repository, review changes to it like code, and apply it to a project.

Write a definition

Save the definition as a JSON file, for example dashboards/service-latency.json:
dashboards/service-latency.json
Keep widget_id values stable. They let Squasher update the same widgets when you apply the file again.

Apply the definition

With the CLI, after you sign in with squasher login:
To update a dashboard that already exists, add --dashboard-id <dashboard_id>. With the API, send the definition in a definition field. Add dashboard_id next to it to update an existing dashboard.
The API returns 201 when it creates a dashboard and 200 when it updates one. The key needs the project:write scope. The ingest key from the Setup page does not have it. See API keys and Dashboards API.

Definition reference

Valid widget query sources

Start from a template

List the built-in templates and whether your project has the data each one needs, preview one with your data, then create a dashboard from it:
In the dashboard, select Dashboards, then the Templates tab. Templates are grouped by Ready and Needs setup. Select a template to see its widgets with your data, then select Create dashboard. A template that needs setup shows what to send and a link to the setup guide.

Test a query before you apply it

Run one widget query from the CLI to check the result:
squasher dashboards inspect-query takes the same flags and returns a summary of the result that is easier to read.

See the dashboard

Select Dashboards in the sidebar, under Telemetry, and open the dashboard. Choose a time range, an Environment, and a Service at the top. To change the layout by hand, select Edit layout. To add a widget, select Add widget. Changes that you make in the dashboard are not written back to your file. Apply the file again to restore its version.

Next steps

Explore

Search the logs and traces behind a widget.

MCP

Let an agent apply definitions with the MCP server.