Skip to main content

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.

Views Concept

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

FieldDescriptionScheme
queries*

Named queries that populate the view data sources

map[string]Query

cache.maxAge

Maximum age of cache before it's deemed stale (default: 15m)

Duration

cache.minAge

Minimum age of cache a user can request (default: 10s)

Duration

cache.refreshTimeout

Duration to wait for a view to process before returning stale data (default: 5s)

Duration

columns

Define the structure and data types of the view table

[]ViewColumnDef

display.icon

Icon identifier for navigation and visual identification

Icon

display.ordinal

Sort order for navigation, lower numbers appear first (default: 0)

integer

display.sidebar

Whether the view appears in sidebar navigation (default: false)

boolean

display.title

Human-readable title displayed in the UI (defaults to view name)

string

mapping

CEL expressions to map query results to view columns. If not specified, columns are automatically populated from query results.

map[string]CELExpression

merge

SQL query to merge/join data from multiple named queries. Required when using multiple queries with table output (columns only).

string

panels

Interactive visualizations for aggregated data

[]PanelDef

Validation Requirements
  • At least one query: Views must define at least one named query
  • Output definition: Views must have either panels or columns (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.

FieldDescriptionScheme
changes

Query configuration changes and audit data

ResourceSelector

configs

Query config items from the catalog

ResourceSelector

prometheus

Query time-series data from Prometheus

Prometheus Query

Prometheus Query

Query configuration for Prometheus metrics.

FieldDescriptionScheme
query*

PromQL query string

string

bearer

Bearer token for authentication

EnvVar

connection

Reference to a connection for authentication

string

password

Basic auth password

EnvVar

url

Prometheus server URL

string

username

Basic auth username

EnvVar

View Column Definition

Column definition for view tables with data types and visualization properties.

FieldDescriptionScheme
name*

Column name (must be a valid SQL identifier)

string

type*

Data type that determines formatting and visualization

string, number, boolean, datetime, duration, health, status, gauge, bytes, decimal, millicore, url

description

Human-readable description of the column

string

for

Reference to another column this column provides data for (helper columns). Only applicable for type=url.

string

gauge

Configuration for gauge visualization (required when type=gauge)

GaugeConfig

hidden

Whether to hide the column from the UI (default: false)

boolean

primaryKey

Whether this column is part of the primary key (default: false). At least one column must be marked as primary key.

boolean

Primary Key Requirement

If columns are defined, at least one must be marked as primaryKey: true.

Panel Definition

Panel definition for interactive visualizations.

FieldDescriptionScheme
name*

Name of the panel

string

query*

SQL query to aggregate data from the view's named queries

string

type*

Type of panel visualization

piechart, table, number, gauge

description

Description of the panel

string

gauge

Configuration for gauge panels

Gauge Configuration

number

Configuration for number panels

Panel Number Configuration

piechart

Configuration for pie chart panels

Pie Chart Configuration

Pie Chart Configuration

Configuration for pie chart panels.

FieldDescriptionScheme
colors

Custom color mapping for categories

[map[string]string]

showLabels

Display labels on pie slices

boolean

Gauge Configuration

Configuration for gauge visualizations with thresholds and color coding.

FieldDescriptionScheme
max*

Maximum value for the gauge

integer

min*

Minimum value for the gauge

integer

thresholds[].color

Color for this threshold

string

thresholds[].value

Threshold value

integer

Panel Number Configuration

Configuration for number panels.

FieldDescriptionScheme
precision

Number of decimal places

integer

unit

Display unit (e.g., 'seconds', 'MB', '%')

string