Views
Views are a SQL-powered feature that allows you to create custom, dynamic dashboards from your Mission Control data. They collect data from multiple sources into an in-memory SQLite database, enabling you to run any SQL query for filtering, joining, and aggregating your observability data.
This view creates a dashboard showing Helm releases with their current status, health, and deployment information.
Overview
Views solve the challenge of creating custom dashboards and reports by providing:
- Dynamic Data Aggregation: Combine data from multiple sources using SQL
- Rich Visualizations: Display data with gauges, charts, status indicators, and more
- Structured Schema: Define column types and constraints for consistent data presentation
- Cached Results: Views work like materialized views, caching query results in dedicated database tables for fast retrieval
Key Features
Data Sources
Views can query data from multiple sources:
- Config Items: Infrastructure components and configurations via the
configs
selector - Changes: Configuration change tracking and audit data via the
changes
selector - Metrics: Time-series data from Prometheus using PromQL queries
Output Types
Views can generate:
- One Table: Structured data with typed columns for detailed data presentation
- Multiple Panels: Interactive visualizations including pie charts, gauges, numbers, and summary tables
How Views Work
Views transform your data into an in-memory SQL database, giving you the full power of SQL to slice, dice, and analyze your infrastructure:
1. Named Queries (Required)
Every view must define queries with unique names:
queries:
deployments: # Table name in SQL
configs:
types: ['Kubernetes::Deployment']
pipelines: # Another table name
changes:
search: change_type=GitHubActionRun
2. In-Memory SQL Database
Views execute your named queries and create an SQLite database in memory:
- Each query becomes a table with the query's name
- Table schema gets generated dynamically from the query results
- Example: queries named
deployments
,pipelines
,metrics
create 3 SQL tables
3. SQL-Powered Data Processing
Once you load data, you can run any SQL query against it to combine data from multiple sources:
# View table data (optional)
merge: |
SELECT d.name, d.status, p.duration
FROM deployments d
LEFT JOIN pipelines p ON d.name = p.app
# Panel queries (required for panels)
panels:
- name: 'Status Distribution'
type: piechart
query: 'SELECT COUNT(*) AS count, status FROM deployments GROUP BY status'
This SQL-first approach gives you unlimited flexibility to slice, filter, and aggregate your data.
API Reference
Field | Description | Scheme |
---|---|---|
queries* | Named queries that populate the view data sources | |
cache.maxAge | Maximum age of cache before it's deemed stale (default: 15m) | |
cache.minAge | Minimum age of cache a user can request (default: 10s) | |
cache.refreshTimeout | Duration to wait for a view to process before returning stale data (default: 5s) | |
columns | Define the structure and data types of the view table | |
display.icon | Icon identifier for navigation and visual identification | |
display.ordinal | Sort order for navigation, lower numbers appear first (default: 0) |
|
display.sidebar | Whether the view appears in sidebar navigation (default: false) |
|
display.title | Human-readable title displayed in the UI (defaults to view name) |
|
mapping | CEL expressions to map query results to view columns. If not specified, columns are automatically populated from query results. | |
merge | SQL query to merge/join data from multiple named queries. Required when using multiple queries with table output (columns only). |
|
panels | Interactive visualizations for aggregated data |
- At least one query: Views must define at least one named query
- Output definition: Views must have either
panels
orcolumns
(or both) - Merge requirement: When using multiple queries with table output (columns only), you must provide a
merge
SQL query
Query
Query definition for data sources.
Field | Description | Scheme |
---|---|---|
changes | Query configuration changes and audit data | |
configs | Query config items from the catalog | |
prometheus | Query time-series data from Prometheus |
Prometheus Query
Query configuration for Prometheus metrics.
Field | Description | Scheme |
---|---|---|
query* | PromQL query string |
|
bearer | Bearer token for authentication | |
connection | Reference to a connection for authentication |
|
password | Basic auth password | |
url | Prometheus server URL |
|
username | Basic auth username |
View Column Definition
Column definition for view tables with data types and visualization properties.
Field | Description | Scheme |
---|---|---|
name* | Column name (must be a valid SQL identifier) |
|
type* | Data type that determines formatting and visualization |
|
description | Human-readable description of the column |
|
for | Reference to another column this column provides data for (helper columns). Only applicable for type=url. |
|
gauge | Configuration for gauge visualization (required when type=gauge) | |
hidden | Whether to hide the column from the UI (default: false) |
|
primaryKey | Whether this column is part of the primary key (default: false). At least one column must be marked as primary key. |
|
If columns
are defined, at least one must be marked as primaryKey: true
.
Panel Definition
Panel definition for interactive visualizations.
Field | Description | Scheme |
---|---|---|
name* | Name of the panel |
|
query* | SQL query to aggregate data from the view's named queries |
|
type* | Type of panel visualization |
|
description | Description of the panel |
|
gauge | Configuration for gauge panels | |
number | Configuration for number panels | |
piechart | Configuration for pie chart panels |
Pie Chart Configuration
Configuration for pie chart panels.
Field | Description | Scheme |
---|---|---|
colors | Custom color mapping for categories |
|
showLabels | Display labels on pie slices |
|
Gauge Configuration
Configuration for gauge visualizations with thresholds and color coding.
Field | Description | Scheme |
---|---|---|
max* | Maximum value for the gauge |
|
min* | Minimum value for the gauge |
|
thresholds[].color | Color for this threshold |
|
thresholds[].value | Threshold value |
|
Panel Number Configuration
Configuration for number panels.
Field | Description | Scheme |
---|---|---|
precision | Number of decimal places |
|
unit | Display unit (e.g., 'seconds', 'MB', '%') |
|