Dashboards

Dashboards let you save and organize views of your infrastructure for quick access.

Overview

Dashboards provide:

  • Saved queries - Store frequently used SQL queries
  • Custom views - Organize information relevant to your workflow
  • Quick access - One-click access to important metrics

Dashboards are saved in your browser. To share a view with teammates, share the underlying
queries (or export query results from the Query view).

Creating Dashboards

Via UI

  1. Navigate to Dashboards in the Inventory menu
  2. Click Create Dashboard
  3. Enter a name and optional description
  4. Add panels with queries or visualizations

Dashboard Structure

Dashboard: Production Overview
├── Panel: Resource Summary
│   └── Query: SELECT type, COUNT(*) ...
├── Panel: Recent Changes
│   └── Query: SELECT * FROM transactions ...
└── Panel: Untagged Resources
    └── Query: SELECT * FROM instances WHERE attributes->'tags' IS NULL

Panel Types

A panel is a saved SQL query rendered as a table or chart. Available chart types are bar,
pie, and treemap.

Query Panel

Display the results of an SQL query as a table:

SELECT type, count(*) as type_count
FROM resources
GROUP BY type
ORDER BY count(*) DESC
LIMIT 10

Chart Panels

Render a query's results as a bar, pie, or treemap chart — for example, resource counts
by type or by provider.

Example Dashboards

Infrastructure Overview

┌─────────────────────────────────────────────────────────┐
│  Infrastructure Overview                                 │
├─────────────────────────────┬───────────────────────────┤
│  Total Resources: 1,234     │  States: 15               │
│  Workspaces: 3              │  Last Update: 2 min ago   │
├─────────────────────────────┴───────────────────────────┤
│  Resources by Type                                       │
│  ┌────────────────────────────────────────────────────┐ │
│  │ aws_instance        ████████████████████ 234       │ │
│  │ aws_security_group  ██████████████ 156             │ │
│  │ aws_iam_role        ████████████ 123               │ │
│  │ aws_s3_bucket       █████████ 89                   │ │
│  └────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────┤
│  Recent Changes                                          │
│  • 10:30 - user@company.com - networking/prod           │
│  • 10:15 - ci@company.com - kubernetes/staging          │
│  • 09:45 - user@company.com - database/prod             │
└─────────────────────────────────────────────────────────┘

Security Dashboard

Resource type lives on the resources table, so join instances to resources to filter by type.

Security groups

SELECT i.address, i.attributes->>'name' AS name
FROM instances AS i
INNER JOIN resources AS r
  ON i.resource_address = r.address AND i.state_id = r.state_id
WHERE r.type = 'aws_security_group'

IAM roles

SELECT i.address, i.attributes->>'name' AS name
FROM instances AS i
INNER JOIN resources AS r
  ON i.resource_address = r.address AND i.state_id = r.state_id
WHERE r.type = 'aws_iam_role'

Instance Type Distribution

Count instances by EC2 type or RDS class. For actual cost data, see
Cost Analysis.

SELECT i.attributes#>>'{instance_type}' AS instance_type, COUNT(*) AS instance_count
FROM instances AS i
INNER JOIN resources AS r
  ON i.resource_address = r.address AND i.state_id = r.state_id
WHERE r.type = 'aws_instance'
GROUP BY i.attributes#>>'{instance_type}'
ORDER BY COUNT(*) DESC

Useful Queries

Resource Inventory

-- All resources by type
SELECT type, count(*) as type_count
FROM resources
GROUP BY type
ORDER BY type

-- Resources by workspace
SELECT workspace, count(*) as resources
FROM states
GROUP BY workspace
ORDER BY workspace

Compliance

-- Resources without tags
SELECT address, resource_address
FROM instances
WHERE attributes->'tags' IS NULL
   OR attributes->>'tags' = '{}'

-- Resources missing required tag
SELECT address, resource_address
FROM instances
WHERE attributes->'tags'->>'Environment' IS NULL

Security

-- Security groups
SELECT i.address, i.attributes->>'name' AS name
FROM instances AS i
INNER JOIN resources AS r
  ON i.resource_address = r.address AND i.state_id = r.state_id
WHERE r.type = 'aws_security_group'

-- IAM users (should be minimized)
SELECT i.address
FROM instances AS i
INNER JOIN resources AS r
  ON i.resource_address = r.address AND i.state_id = r.state_id
WHERE r.type = 'aws_iam_user'

Change Tracking

-- States changed recently (via transaction data)
SELECT name, workspace, created_at
FROM states
ORDER BY created_at DESC
LIMIT 10

Sharing Dashboards

Dashboards are saved in your browser, so they aren't automatically shared across users. To share a
view with teammates:

  • Share the queries - Copy the SQL behind each panel and have colleagues recreate or save it.
  • Export query results - From the Query view, run a query and export the results (for example, to
    CSV) to share a point-in-time snapshot.

Best Practices

  1. Name clearly - Use descriptive names that indicate purpose
  2. Group related queries - Keep related information together
  3. Add descriptions - Document what each panel shows
  4. Use time filters - Add date ranges where relevant
  5. Review regularly - Update dashboards as infrastructure evolves

Tips

Query Performance

  • Use LIMIT for large result sets
  • Filter early in queries
  • Avoid SELECT * when possible

Organization

  • Create dashboards per team or function
  • Separate operational and security dashboards
  • Archive outdated dashboards

Maintenance

  • Review queries after major changes
  • Update dashboards when adding new resource types
  • Remove obsolete panels

Next Steps