Migrations: Compare backend and frontend outputs to ensure feature parity (#106851)

* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Dashboards: Support schemaVersion v33 migration in backend

* Apply suggestions from code review

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Apply feedback

* Remove unused parameters

* Refactor to follow Go patterns

* Update logic

* Only write final migration result as output

* Compare backend and frontend results

* Improve snapshots to cover all possible use cases

* Linter

* wip make it consistent v33

* apply feedback

* Return default when the ref cannot be found

* Update apps/dashboard/pkg/migration/schemaversion/v33.go

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* apply feedback

* Use same mocks backend/frontend

* restore migrations

* update snapshots

* Adapt migration tests to use min versions

* Ensure v40-v41 works

* Ensure v39-v40 works

* Simplify the naming of the files

* adjust jest to new input convention

* Ensure every migration v36-v41 works

* Improve v38 naming

* Ensure v36 migrates correctly

* Skip v36 refs migrations on rows

* Treat rows as frontend and ensure same results for v36

* Ensure v34 runs with the same logic than the frontend

* Leave empty stadistics as valid option

* ensure v33 is working as the frontend

* Update tests

* Undo frontend changes for legend handling

* Remove filtering by version in the frontend

* linter

* Clean up v33 input JSON

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Ivan Ortega Alba
2025-07-03 12:23:51 +02:00
committed by GitHub
co-authored by Stephanie Hingtgen Todd Treece Haris Rozajac
parent b7153d4d20
commit 93c14c52da
109 changed files with 6762 additions and 21950 deletions
+34 -49
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
@@ -13,6 +12,7 @@ import (
"github.com/grafana/grafana/apps/dashboard/pkg/migration"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/testutil"
)
const INPUT_DIR = "testdata/input"
@@ -22,24 +22,8 @@ func TestMigrate(t *testing.T) {
files, err := os.ReadDir(INPUT_DIR)
require.NoError(t, err)
migration.Initialize(&mockDataSourceInfoProvider{
dataSourceInfo: []schemaversion.DataSourceInfo{
{
Default: true,
UID: "default-ds-uid",
ID: 1,
Type: "prometheus",
Name: "Default Test Datasource",
},
{
UID: "non-default-test-ds-uid",
ID: 2,
Type: "loki",
Name: "Non Default Test Datasource",
APIVersion: "1",
},
},
})
// Use the same datasource provider as the frontend test to ensure consistency
migration.Initialize(testutil.GetTestProvider())
t.Run("minimum version check", func(t *testing.T) {
err := migration.Migrate(map[string]interface{}{
@@ -55,7 +39,13 @@ func TestMigrate(t *testing.T) {
continue
}
inputDash, inputVersion, name := load(t, filepath.Join(INPUT_DIR, f.Name()))
// Validate filename format
if !strings.HasPrefix(f.Name(), "v") || !strings.HasSuffix(f.Name(), ".json") {
t.Fatalf("input filename must use v{N}.{name}.json format, got: %s", f.Name())
}
inputDash := loadDashboard(t, filepath.Join(INPUT_DIR, f.Name()))
inputVersion := getSchemaVersion(t, inputDash)
t.Run("input check "+f.Name(), func(t *testing.T) {
// use input version as the target version to ensure there are no changes
@@ -69,20 +59,18 @@ func TestMigrate(t *testing.T) {
require.JSONEq(t, string(expectedDash), string(outBytes), "%s input check did not match", f.Name())
})
for targetVersion := inputVersion + 1; targetVersion <= schemaversion.LATEST_VERSION; targetVersion++ {
testName := fmt.Sprintf("%s v%d to v%d", name, inputVersion, targetVersion)
t.Run(testName, func(t *testing.T) {
testMigration(t, inputDash, name, inputVersion, targetVersion)
})
}
testName := fmt.Sprintf("%s v%d to v%d", f.Name(), inputVersion, schemaversion.LATEST_VERSION)
t.Run(testName, func(t *testing.T) {
testMigration(t, inputDash, f.Name(), inputVersion, schemaversion.LATEST_VERSION)
})
}
}
func testMigration(t *testing.T, dash map[string]interface{}, name string, inputVersion, targetVersion int) {
func testMigration(t *testing.T, dash map[string]interface{}, inputFileName string, inputVersion, targetVersion int) {
t.Helper()
require.NoError(t, migration.Migrate(dash, targetVersion), "%d migration failed", targetVersion)
outPath := filepath.Join(OUTPUT_DIR, fmt.Sprintf("%d.%s.%d.json", inputVersion, name, targetVersion))
outPath := filepath.Join(OUTPUT_DIR, inputFileName)
outBytes, err := json.MarshalIndent(dash, "", " ")
require.NoError(t, err, "failed to marshal migrated dashboard")
@@ -99,33 +87,30 @@ func testMigration(t *testing.T, dash map[string]interface{}, name string, input
require.JSONEq(t, string(existingBytes), string(outBytes), "%s did not match", outPath)
}
func parseInputName(t *testing.T, name string) (int, string) {
func getSchemaVersion(t *testing.T, dash map[string]interface{}) int {
t.Helper()
parts := strings.SplitN(filepath.Base(name), ".", 3)
if len(parts) < 3 {
t.Fatalf("invalid input filename: %s", name)
version, ok := dash["schemaVersion"]
require.True(t, ok, "dashboard missing schemaVersion")
switch v := version.(type) {
case int:
return v
case float64:
return int(v)
default:
t.Fatalf("invalid schemaVersion type: %T", version)
return 0
}
iv, err := strconv.Atoi(parts[0])
require.NoError(t, err, "failed to parse input version")
return iv, parts[1]
}
func load(t *testing.T, path string) (dash map[string]interface{}, inputVersion int, name string) {
func loadDashboard(t *testing.T, path string) map[string]interface{} {
t.Helper()
// We can ignore gosec G304 here since it's a test
// nolint:gosec
inputBytes, err := os.ReadFile(path)
require.NoError(t, err, "failed to read embedded input file")
require.NoError(t, err, "failed to read input file")
var dash map[string]interface{}
require.NoError(t, json.Unmarshal(inputBytes, &dash), "failed to unmarshal dashboard JSON")
inputVersion, name = parseInputName(t, path)
return dash, inputVersion, name
}
var _ schemaversion.DataSourceInfoProvider = &mockDataSourceInfoProvider{}
type mockDataSourceInfoProvider struct {
dataSourceInfo []schemaversion.DataSourceInfo
}
func (m *mockDataSourceInfoProvider) GetDataSourceInfo() []schemaversion.DataSourceInfo {
return m.dataSourceInfo
return dash
}
@@ -40,9 +40,10 @@ func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *D
return GetDefaultDSInstanceSettings(datasources)
}
// Check if it's a reference object without UID - should return default
// Check if it's a reference object
if ref, ok := nameOrRef.(map[string]interface{}); ok {
if _, hasUID := ref["uid"]; !hasUID {
// Reference object without UID should return default
return GetDefaultDSInstanceSettings(datasources)
}
// It's a reference object with UID, search for matching UID
@@ -56,7 +57,8 @@ func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *D
}
}
}
return GetDefaultDSInstanceSettings(datasources)
// Unknown UID-only reference should return nil (preserve it)
return nil
}
// Check if it's a string
@@ -76,7 +78,7 @@ func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *D
}
}
}
return GetDefaultDSInstanceSettings(datasources)
return nil
}
// MigrateDatasourceNameToRef converts a datasource name/uid string to a reference object
@@ -100,7 +102,13 @@ func MigrateDatasourceNameToRef(nameOrRef interface{}, options map[string]bool,
return GetDataSourceRef(ds)
}
if dsName, ok := nameOrRef.(string); ok && dsName != "" {
// Handle string cases (including empty strings)
if dsName, ok := nameOrRef.(string); ok {
if dsName == "" {
// Empty string should return empty object (frontend behavior)
return map[string]interface{}{}
}
// Unknown datasource name should be preserved as UID-only reference
return map[string]interface{}{
"uid": dsName,
}
@@ -81,35 +81,35 @@ func TestGetDefaultDSInstanceSettings(t *testing.T) {
{
name: "no default datasource",
datasources: []schemaversion.DataSourceInfo{
{UID: "ds1", Type: "prometheus", Name: "DS1", Default: false},
{UID: "ds2", Type: "elasticsearch", Name: "DS2", Default: false},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false},
},
expected: nil,
},
{
name: "single default datasource",
datasources: []schemaversion.DataSourceInfo{
{UID: "ds1", Type: "prometheus", Name: "DS1", Default: false},
{UID: "default-ds", Type: "prometheus", Name: "Default", Default: true, APIVersion: "v1"},
{UID: "ds2", Type: "elasticsearch", Name: "DS2", Default: false},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false},
{UID: "default-ds-uid", Type: "prometheus", Name: "Default Test Datasource Name", Default: true, APIVersion: "v1"},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false},
},
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
{
name: "multiple default datasources returns first",
datasources: []schemaversion.DataSourceInfo{
{UID: "ds1", Type: "prometheus", Name: "Default1", Default: true, APIVersion: "v1"},
{UID: "ds2", Type: "elasticsearch", Name: "Default2", Default: true, APIVersion: "v2"},
{UID: "first-default", Type: "prometheus", Name: "First Default", Default: true, APIVersion: "v1"},
{UID: "second-default", Type: "elasticsearch", Name: "Second Default", Default: true, APIVersion: "v2"},
},
expected: &schemaversion.DataSourceInfo{
UID: "ds1",
UID: "first-default",
Type: "prometheus",
Name: "Default1",
Name: "First Default",
APIVersion: "v1",
},
},
@@ -125,9 +125,9 @@ func TestGetDefaultDSInstanceSettings(t *testing.T) {
func TestGetInstanceSettings(t *testing.T) {
datasources := []schemaversion.DataSourceInfo{
{UID: "default-ds", Type: "prometheus", Name: "Default", Default: true, APIVersion: "v1"},
{UID: "other-ds", Type: "elasticsearch", Name: "Elasticsearch", Default: false, APIVersion: "v2"},
{UID: "test-uid", Type: "influxdb", Name: "InfluxDB", Default: false},
{UID: "default-ds-uid", Type: "prometheus", Name: "Default Test Datasource Name", Default: true, APIVersion: "v1"},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false, APIVersion: "v2"},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false, APIVersion: "v1"},
}
tests := []struct {
@@ -139,9 +139,9 @@ func TestGetInstanceSettings(t *testing.T) {
name: "nil should return default",
nameOrRef: nil,
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
@@ -149,51 +149,51 @@ func TestGetInstanceSettings(t *testing.T) {
name: "default string should return default",
nameOrRef: "default",
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
{
name: "lookup by UID",
nameOrRef: "other-ds",
nameOrRef: "existing-target-uid",
expected: &schemaversion.DataSourceInfo{
UID: "other-ds",
UID: "existing-target-uid",
Type: "elasticsearch",
Name: "Elasticsearch",
Name: "Existing Target Name",
APIVersion: "v2",
},
},
{
name: "lookup by name",
nameOrRef: "Elasticsearch",
nameOrRef: "Existing Target Name",
expected: &schemaversion.DataSourceInfo{
UID: "other-ds",
UID: "existing-target-uid",
Type: "elasticsearch",
Name: "Elasticsearch",
Name: "Existing Target Name",
APIVersion: "v2",
},
},
{
name: "lookup by UID without apiVersion",
nameOrRef: "test-uid",
nameOrRef: "existing-ref-uid",
expected: &schemaversion.DataSourceInfo{
UID: "test-uid",
Type: "influxdb",
Name: "InfluxDB",
APIVersion: "",
UID: "existing-ref-uid",
Type: "prometheus",
Name: "Existing Ref Name",
APIVersion: "v1",
},
},
{
name: "lookup by reference object with UID",
nameOrRef: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
},
expected: &schemaversion.DataSourceInfo{
UID: "other-ds",
UID: "existing-target-uid",
Type: "elasticsearch",
Name: "Elasticsearch",
Name: "Existing Target Name",
APIVersion: "v2",
},
},
@@ -203,39 +203,29 @@ func TestGetInstanceSettings(t *testing.T) {
"type": "prometheus",
},
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
{
name: "unknown datasource should return default",
name: "unknown datasource should return nil",
nameOrRef: "unknown-ds",
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
Type: "prometheus",
Name: "Default",
APIVersion: "v1",
},
expected: nil,
},
{
name: "empty string should return default",
name: "empty string should return nil",
nameOrRef: "",
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
Type: "prometheus",
Name: "Default",
APIVersion: "v1",
},
expected: nil,
},
{
name: "unsupported input type should return default",
nameOrRef: 123,
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
@@ -251,9 +241,9 @@ func TestGetInstanceSettings(t *testing.T) {
func TestMigrateDatasourceNameToRef(t *testing.T) {
datasources := []schemaversion.DataSourceInfo{
{UID: "default-ds", Type: "prometheus", Name: "Default", Default: true, APIVersion: "v1"},
{UID: "other-ds", Type: "elasticsearch", Name: "Elasticsearch", Default: false, APIVersion: "v2"},
{UID: "test-uid", Type: "influxdb", Name: "InfluxDB", Default: false},
{UID: "default-ds-uid", Type: "prometheus", Name: "Default Test Datasource Name", Default: true, APIVersion: "v1"},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false, APIVersion: "v2"},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false, APIVersion: "v1"},
}
t.Run("returnDefaultAsNull: true", func(t *testing.T) {
@@ -287,39 +277,33 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
},
{
name: "lookup by UID",
nameOrRef: "other-ds",
nameOrRef: "existing-target-uid",
expected: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2",
},
},
{
name: "lookup by name",
nameOrRef: "Elasticsearch",
nameOrRef: "Existing Target Name",
expected: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2",
},
},
{
name: "unknown datasource should return default reference",
name: "unknown datasource should preserve as UID",
nameOrRef: "unknown-ds",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
},
{
name: "empty string should return default reference",
name: "empty string should return empty object",
nameOrRef: "",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
},
expected: map[string]interface{}{},
},
}
@@ -343,7 +327,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
name: "nil should return default reference",
nameOrRef: nil,
expected: map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
},
@@ -352,7 +336,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
name: "default should return default reference",
nameOrRef: "default",
expected: map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
},
@@ -370,30 +354,24 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
},
{
name: "lookup by UID",
nameOrRef: "other-ds",
nameOrRef: "existing-target-uid",
expected: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2",
},
},
{
name: "unknown datasource should return default reference",
name: "unknown datasource should preserve as UID",
nameOrRef: "unknown-ds",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
},
{
name: "empty string should return default reference",
name: "empty string should return empty object",
nameOrRef: "",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
},
expected: map[string]interface{}{},
},
}
@@ -414,7 +392,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
}
result := schemaversion.MigrateDatasourceNameToRef(nameOrRef, options, datasources)
expected := map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
}
@@ -424,7 +402,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
t.Run("integer input should return default reference", func(t *testing.T) {
result := schemaversion.MigrateDatasourceNameToRef(123, options, datasources)
expected := map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
}
@@ -126,10 +126,10 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"targets": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
},
},
},
@@ -141,14 +141,14 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -163,10 +163,10 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
"targets": []interface{}{
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
},
},
},
@@ -178,14 +178,14 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -195,7 +195,7 @@ func TestV33(t *testing.T) {
},
},
{
name: "panel with unknown datasource should return default reference",
name: "panel with unknown datasource should preserve as UID",
input: map[string]interface{}{
"schemaVersion": 32,
"panels": []interface{}{
@@ -214,16 +214,12 @@ func TestV33(t *testing.T) {
"panels": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-datasource",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-datasource",
},
},
},
@@ -237,13 +233,13 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"targets": []interface{}{
map[string]interface{}{
"datasource": "default",
},
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
},
map[string]interface{}{
"datasource": "unknown-ds",
@@ -258,7 +254,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
@@ -268,15 +264,13 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
},
},
@@ -290,7 +284,7 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
},
},
},
@@ -300,7 +294,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -315,13 +309,13 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"type": "row",
"collapsed": true,
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"panels": []interface{}{
map[string]interface{}{
"datasource": "default",
"targets": []interface{}{
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
},
},
},
@@ -329,7 +323,7 @@ func TestV33(t *testing.T) {
"datasource": "unknown-ds",
"targets": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
},
},
},
@@ -345,7 +339,7 @@ func TestV33(t *testing.T) {
"collapsed": true,
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"panels": []interface{}{
@@ -355,7 +349,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -363,15 +357,13 @@ func TestV33(t *testing.T) {
},
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -389,7 +381,7 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"targets": []interface{}{
map[string]interface{}{
"datasource": "default",
@@ -407,7 +399,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
+141 -121
View File
@@ -71,6 +71,7 @@ func V34(dashboard map[string]interface{}) error {
if !hasNested {
continue
}
for _, nestedPanel := range nestedPanels {
np, ok := nestedPanel.(map[string]interface{})
if !ok {
@@ -108,63 +109,60 @@ func migrateCloudWatchQueriesInPanel(panel map[string]interface{}) {
continue
}
// Check if this query has multiple statistics
statistics, hasStatistics := t["statistics"].([]interface{})
if !hasStatistics || len(statistics) <= 1 {
// Convert single statistic or no statistics to proper format
if hasStatistics && len(statistics) == 1 {
if stat, ok := statistics[0].(string); ok {
t["statistic"] = stat
}
}
delete(t, "statistics")
// Add CloudWatch fields if missing
if _, exists := t["metricEditorMode"]; !exists {
t["metricEditorMode"] = 0
}
if _, exists := t["metricQueryType"]; !exists {
t["metricQueryType"] = 0
}
// Get valid statistics (including null and empty strings)
validStats, isEmpty := getValidStatistics(t["statistics"])
// Handle empty array case (preserve it)
if isEmpty {
// Keep empty array as-is
newTargets = append(newTargets, t)
continue
}
// Split query with multiple statistics into separate queries
// First, collect all valid statistics
var validStatistics []string
for _, stat := range statistics {
statString, ok := stat.(string)
if !ok {
continue
}
validStatistics = append(validStatistics, statString)
}
// Remove statistics field for processing
delete(t, "statistics")
// If no valid statistics found, remove statistics field and keep original query
if len(validStatistics) == 0 {
delete(t, "statistics")
// Handle based on number of valid statistics
switch len(validStats) {
case 0:
// No valid statistics - keep query as-is
newTargets = append(newTargets, t)
continue
}
// Create separate queries for each valid statistic
for i, statString := range validStatistics {
// Create a copy of the original query
newQuery := make(map[string]interface{})
for k, v := range t {
if k != "statistics" {
newQuery[k] = v
case 1:
// Single statistic - set statistic field if not null
if validStats[0] != nil {
if statString, ok := validStats[0].(string); ok {
t["statistic"] = statString
}
}
newTargets = append(newTargets, t)
default:
// Multiple statistics - create separate queries
for i, stat := range validStats {
newQuery := copyMap(t)
if stat != nil {
if statString, ok := stat.(string); ok {
newQuery["statistic"] = statString
}
}
// Set the single statistic
newQuery["statistic"] = statString
if i == 0 {
// First query replaces the original
newTargets = append(newTargets, newQuery)
} else {
// Additional queries get new refIds and are added at the end
newQuery["refId"] = generateNextRefId(append(targets, additionalTargets...), len(additionalTargets))
additionalTargets = append(additionalTargets, newQuery)
if i == 0 {
newTargets = append(newTargets, newQuery)
} else {
newQuery["refId"] = generateNextRefId(append(targets, additionalTargets...), len(additionalTargets))
additionalTargets = append(additionalTargets, newQuery)
}
}
}
}
// Append additional queries at the end
panel["targets"] = append(newTargets, additionalTargets...)
}
@@ -192,95 +190,117 @@ func migrateCloudWatchAnnotationQueries(dashboard map[string]interface{}) {
continue
}
// Check if this annotation has multiple statistics
statistics, hasStatistics := a["statistics"].([]interface{})
if !hasStatistics || len(statistics) <= 1 {
// Convert single statistic to proper format
if hasStatistics && len(statistics) == 1 {
if stat, ok := statistics[0].(string); ok {
// Create new annotation with single statistic
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
// Get original name for suffix generation
originalName, _ := a["name"].(string)
// Get valid statistics (including null and empty strings)
validStats, isEmpty := getValidStatistics(a["statistics"])
// Handle empty array case (preserve it)
if isEmpty {
// Keep empty array as-is
annotationsList[i] = a
continue
}
// Handle based on number of valid statistics
switch len(validStats) {
case 0:
// No valid statistics - remove statistics field
delete(a, "statistics")
annotationsList[i] = a
case 1:
// Single statistic - set statistic field if not null
delete(a, "statistics")
if validStats[0] != nil {
if statString, ok := validStats[0].(string); ok {
a["statistic"] = statString
}
}
annotationsList[i] = a
default:
// Multiple statistics - create separate annotations
delete(a, "statistics")
for j, stat := range validStats {
newAnnotation := copyMap(a)
if stat != nil {
if statString, ok := stat.(string); ok {
newAnnotation["statistic"] = statString
}
newAnnotation["statistic"] = stat
}
// Add suffix to name
if originalName != "" {
suffix := getSuffixForStat(stat)
newAnnotation["name"] = originalName + " - " + suffix
}
if j == 0 {
annotationsList[i] = newAnnotation
} else {
additionalAnnotations = append(additionalAnnotations, newAnnotation)
}
} else {
// Always remove statistics field, even if empty or no statistics
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
}
annotationsList[i] = newAnnotation
}
continue
}
// Split annotation with multiple statistics into separate annotations
// First, collect all valid statistics
var validStatistics []string
for _, stat := range statistics {
statString, ok := stat.(string)
if !ok {
continue
}
validStatistics = append(validStatistics, statString)
}
// If no valid statistics found, remove statistics field and keep original annotation
if len(validStatistics) == 0 {
// Create new annotation without statistics field
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
}
annotationsList[i] = newAnnotation
continue
}
// Create new annotations for each valid statistic, replace original with first one
originalName, hasName := a["name"].(string)
for j, statString := range validStatistics {
// Create new annotation for this statistic
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
}
// Set the single statistic
newAnnotation["statistic"] = statString
// Set the name with statistic suffix if multiple valid statistics
if len(validStatistics) > 1 && hasName {
newAnnotation["name"] = originalName + " - " + statString
}
if j == 0 {
// Replace the original annotation with the first new one
annotationsList[i] = newAnnotation
} else {
// Add additional annotations to be appended later
additionalAnnotations = append(additionalAnnotations, newAnnotation)
}
}
}
// Add additional annotations to the end of the list
if len(additionalAnnotations) > 0 {
annotations["list"] = append(annotationsList, additionalAnnotations...)
}
}
// getValidStatistics extracts valid statistics from the statistics field
func getValidStatistics(statisticsField interface{}) ([]interface{}, bool) {
statistics, ok := statisticsField.([]interface{})
if !ok {
return nil, false
}
// Special case: empty arrays should be preserved
if len(statistics) == 0 {
return nil, true // Return nil with true flag to indicate "empty array"
}
var valid []interface{}
for _, stat := range statistics {
// Include null and strings (including empty strings)
if stat == nil || isString(stat) {
valid = append(valid, stat)
}
}
return valid, false
}
// getSuffixForStat returns the appropriate suffix for annotation names
func getSuffixForStat(stat interface{}) string {
if stat == nil {
return "null"
}
if statString, ok := stat.(string); ok {
if statString == "" {
return ""
}
return statString
}
return ""
}
// copyMap creates a shallow copy of a map
func copyMap(original map[string]interface{}) map[string]interface{} {
copy := make(map[string]interface{})
for k, v := range original {
copy[k] = v
}
return copy
}
// isString checks if value is a string
func isString(value interface{}) bool {
_, ok := value.(string)
return ok
}
// isCloudWatchQuery checks if a query target is a CloudWatch query.
func isCloudWatchQuery(target map[string]interface{}) bool {
// Check for required CloudWatch query fields
@@ -36,28 +36,34 @@ func TestV34(t *testing.T) {
"type": "timeseries",
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -90,12 +96,14 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -197,13 +205,20 @@ func TestV34(t *testing.T) {
"annotations": map[string]interface{}{
"list": []interface{}{
map[string]interface{}{
"name": "CloudWatch Annotation",
"name": "CloudWatch Annotation - Sum",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistic": "Sum",
},
map[string]interface{}{
"name": "CloudWatch Annotation - null",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
},
},
},
},
@@ -236,6 +251,13 @@ func TestV34(t *testing.T) {
"prefixMatching": false,
"statistic": "Sum",
},
map[string]interface{}{
"name": "CloudWatch Annotation - null",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
},
map[string]interface{}{
"name": "CloudWatch Annotation - Average",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
@@ -310,12 +332,14 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
@@ -323,12 +347,14 @@ func TestV34(t *testing.T) {
"datasource": "prometheus",
},
map[string]interface{}{
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -360,11 +386,13 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -427,11 +455,14 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": []interface{}{},
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -464,12 +495,23 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -502,11 +544,13 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -541,24 +585,28 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"period": "300",
"alias": "CPU Usage",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"period": "300",
"alias": "CPU Usage",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -650,36 +698,44 @@ func TestV34(t *testing.T) {
"id": 4,
"targets": []interface{}{
map[string]interface{}{
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-2",
"metricName": "CPUUtilization",
"statistic": "Sum",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-2",
"metricName": "CPUUtilization",
"statistic": "Sum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "D",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "p12.21",
"refId": "D",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "p12.21",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -687,20 +743,24 @@ func TestV34(t *testing.T) {
"id": 5,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Sum",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Sum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Min",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Min",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -709,6 +769,64 @@ func TestV34(t *testing.T) {
},
},
},
{
name: "preserves existing metricEditorMode and metricQueryType values",
input: map[string]interface{}{
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": []interface{}{"Average", "Maximum"},
"metricEditorMode": 1,
"metricQueryType": 1,
"period": "300",
"alias": "CPU Usage",
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": int(34),
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 1,
"metricQueryType": 1,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 1,
"metricQueryType": 1,
},
},
},
},
},
},
}
runMigrationTests(t, tests, schemaversion.V34)
}
+153 -52
View File
@@ -1,8 +1,77 @@
package schemaversion
// V36 migrates dashboard datasource references from string names to UIDs.
// This migration converts datasource references in annotations, template variables, and panels
// from the old format (string name or UID) to the new format (object with uid, type, apiVersion).
// V36 migrates dashboard datasource references from legacy string format to structured UID-based objects.
//
// This migration addresses a critical evolution in Grafana's datasource architecture where datasource
// identification shifted from potentially ambiguous display names to reliable UIDs. The original format
// used string references that could break when datasources were renamed, moved between organizations,
// or when multiple datasources shared similar names. This created reliability and portability issues
// for dashboard sharing and automation workflows.
//
// The migration works by:
// 1. Processing annotations, template variables, and panels (including nested panels in rows)
// 2. Converting string datasource references to structured objects containing uid, type, and apiVersion
// 3. Handling null/missing datasource references by setting appropriate defaults
// 4. Maintaining consistency between panel and target datasource configurations
// 5. Preserving special datasource types like Mixed datasources and expression queries
//
// This transformation provides several critical benefits:
// - Eliminates datasource reference breakage when datasources are renamed
// - Enables reliable dashboard export/import across different Grafana instances
// - Supports advanced datasource features that require type and version information
// - Prepares the schema for future datasource management enhancements
// - Maintains backward compatibility while establishing a robust foundation
//
// The migration handles complex scenarios including:
// - Panels with missing datasource configuration (set to default)
// - Mixed datasource panels with heterogeneous targets
// - Expression queries that reference other queries
// - Template variables that depend on datasource queries
// - Annotation queries from various datasource types
//
// Example transformations:
//
// Before migration (string reference):
//
// datasource: "prometheus-prod"
// // or
// datasource: null
//
// After migration (structured object):
//
// datasource: {
// uid: "prometheus-uid-123",
// type: "prometheus",
// apiVersion: "v1"
// }
//
// Before migration (panel with targets):
//
// panel: {
// datasource: "CloudWatch",
// targets: [{
// datasource: null,
// refId: "A"
// }]
// }
//
// After migration (consistent references):
//
// panel: {
// datasource: {
// uid: "cloudwatch-uid-456",
// type: "cloudwatch",
// apiVersion: "v1"
// },
// targets: [{
// datasource: {
// uid: "cloudwatch-uid-456",
// type: "cloudwatch",
// apiVersion: "v1"
// },
// refId: "A"
// }]
// }
func V36(dsInfo DataSourceInfoProvider) SchemaVersionMigrationFunc {
datasources := dsInfo.GetDataSourceInfo()
return func(dashboard map[string]interface{}) error {
@@ -34,11 +103,8 @@ func migrateAnnotations(dashboard map[string]interface{}, datasources []DataSour
continue
}
ds, exists := queryMap["datasource"]
if !exists {
continue
}
// Always migrate datasource, even if it doesn't exist (will be set to default)
ds := queryMap["datasource"]
queryMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
}
@@ -55,6 +121,7 @@ func migrateTemplateVariables(dashboard map[string]interface{}, datasources []Da
return
}
defaultDS := GetDefaultDSInstanceSettings(datasources)
for _, variable := range list {
varMap, ok := variable.(map[string]interface{})
if !ok {
@@ -67,11 +134,12 @@ func migrateTemplateVariables(dashboard map[string]interface{}, datasources []Da
}
ds, exists := varMap["datasource"]
if !exists {
continue
// Handle null datasource variables by setting to default
if !exists || ds == nil {
varMap["datasource"] = GetDataSourceRef(defaultDS)
} else {
varMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
varMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
}
@@ -88,30 +156,68 @@ func migratePanels(dashboard map[string]interface{}, datasources []DataSourceInf
continue
}
migratePanelDatasources(panelMap, datasources)
// Handle nested panels in collapsed rows
nestedPanels, hasNested := panelMap["panels"].([]interface{})
if !hasNested {
continue
}
for _, nestedPanel := range nestedPanels {
np, ok := nestedPanel.(map[string]interface{})
if !ok {
continue
}
migratePanelDatasources(np, datasources)
}
}
}
// migratePanelDatasources updates datasource references in a single panel and its targets
func migratePanelDatasources(panelMap map[string]interface{}, datasources []DataSourceInfo) {
targets, hasTargets := panelMap["targets"].([]interface{})
if !hasTargets || len(targets) == 0 {
return
}
// NOTE: Even though row panels don't technically need datasource or targets fields,
// we process them anyway to exactly match frontend behavior and avoid inconsistencies
// between frontend and backend migrations. The frontend DashboardMigrator processes
// all panels uniformly without special row panel handling.
defaultDS := GetDefaultDSInstanceSettings(datasources)
panelDataSourceWasDefault := false
// Handle targets - treat empty arrays same as missing targets (matches frontend behavior)
targets, hasTargets := panelMap["targets"].([]interface{})
if !hasTargets || len(targets) == 0 {
targets = []interface{}{
map[string]interface{}{
"refId": "A",
},
}
panelMap["targets"] = targets
hasTargets = true
}
// Handle panel datasource
if ds, exists := panelMap["datasource"]; exists {
if ds == nil {
defaultDS := GetDefaultDSInstanceSettings(datasources)
ds, exists := panelMap["datasource"]
if !exists || ds == nil {
// Set to default if panel has targets (matches frontend logic)
panelMap["datasource"] = GetDataSourceRef(defaultDS)
panelDataSourceWasDefault = true
} else {
// Migrate existing non-null datasource (should be null after V33)
migrated := MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources)
if migrated == nil {
// If migration returned nil, set to default
panelMap["datasource"] = GetDataSourceRef(defaultDS)
panelDataSourceWasDefault = true
} else {
panelMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources)
panelMap["datasource"] = migrated
}
}
// Handle target datasources
if !hasTargets {
return
}
for _, target := range targets {
targetMap, ok := target.(map[string]interface{})
if !ok {
@@ -120,48 +226,43 @@ func migratePanelDatasources(panelMap map[string]interface{}, datasources []Data
ds, exists := targetMap["datasource"]
// Check if target datasource is null or has no uid
isNullOrNoUID := !exists || ds == nil
if !isNullOrNoUID {
dsMap, ok := ds.(map[string]interface{})
if ok {
uid, hasUID := dsMap["uid"]
if !hasUID || uid == nil {
isNullOrNoUID = true
}
// Check if target datasource is null, missing, or has no uid
needsDefault := false
if !exists || ds == nil {
needsDefault = true
} else if dsMap, ok := ds.(map[string]interface{}); ok {
uid, hasUID := dsMap["uid"]
if !hasUID || uid == nil {
needsDefault = true
}
}
if isNullOrNoUID {
// If panel doesn't have mixed datasource, use panel's datasource
if needsDefault {
// Use panel's datasource if it's not mixed
panelDS, ok := panelMap["datasource"].(map[string]interface{})
if !ok {
continue
}
uid, hasUID := panelDS["uid"].(string)
if hasUID && uid != "-- Mixed --" {
targetMap["datasource"] = panelDS
if ok {
uid, hasUID := panelDS["uid"].(string)
if hasUID && uid != "-- Mixed --" {
targetMap["datasource"] = panelDS
} else {
// If panel is mixed, migrate target datasource independently
targetMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
}
} else {
// Migrate existing target datasource
targetDS := MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
targetMap["datasource"] = targetDS
targetMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
// Update panel datasource if it was default and target is not an expression
if !panelDataSourceWasDefault {
continue
}
targetDS, ok := targetMap["datasource"].(map[string]interface{})
if !ok {
continue
}
uid, ok := targetDS["uid"].(string)
if ok && uid != "__expr__" {
panelMap["datasource"] = targetDS
if panelDataSourceWasDefault {
targetDS, ok := targetMap["datasource"].(map[string]interface{})
if ok {
uid, ok := targetDS["uid"].(string)
if ok && uid != "__expr__" {
panelMap["datasource"] = targetDS
}
}
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,9 +1,76 @@
package schemaversion
// V37 normalizes legend configuration in panels to use a consistent format:
// - Converts boolean legend values to object format
// - Standardizes hidden legends to use showLegend: false with displayMode: list
// - Ensures visible legends have showLegend: true
// V37 normalizes legend configuration to use `showLegend` property consistently.
//
// This migration addresses inconsistencies in how legend visibility was handled.
// There were two ways to hide the legend:
// 1. Using displayMode: "hidden"
// 2. Using showLegend: false
//
// The migration normalizes both approaches to use showLegend consistently:
// - If displayMode is "hidden" OR showLegend is false, set displayMode to "list" and showLegend to false
// - For all other existing legend objects, ensure showLegend is true
//
// Note: This migration only processes legend configurations that already exist as objects.
// Boolean legend values are not processed by this migration.
//
// Example transformations:
//
// Before migration (hidden displayMode):
//
// options: {
// legend: {
// displayMode: "hidden",
// placement: "bottom"
// }
// }
//
// After migration:
//
// options: {
// legend: {
// displayMode: "list",
// showLegend: false,
// placement: "bottom"
// }
// }
//
// Before migration (showLegend false):
//
// options: {
// legend: {
// displayMode: "table",
// showLegend: false
// }
// }
//
// After migration:
//
// options: {
// legend: {
// displayMode: "list",
// showLegend: false
// }
// }
//
// Before migration (visible legend):
//
// options: {
// legend: {
// displayMode: "table",
// placement: "bottom"
// }
// }
//
// After migration:
//
// options: {
// legend: {
// displayMode: "table",
// placement: "bottom",
// showLegend: true
// }
// }
func V37(dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = int(37)
@@ -12,51 +79,50 @@ func V37(dashboard map[string]interface{}) error {
return nil
}
// Process all panels, including nested ones
processPanelsV37(panels)
return nil
}
// processPanelsV37 recursively processes panels, including nested panels within rows
func processPanelsV37(panels []interface{}) {
for _, panel := range panels {
p, ok := panel.(map[string]interface{})
if !ok {
continue
}
// Process nested panels if this is a row panel
if p["type"] == "row" {
if nestedPanels, ok := p["panels"].([]interface{}); ok {
processPanelsV37(nestedPanels)
}
continue
}
options, ok := p["options"].(map[string]interface{})
if !ok {
continue
}
// Skip if no legend config exists
// Only process legend if it exists and is an object (not boolean)
legendValue := options["legend"]
if legendValue == nil {
continue
}
// Convert boolean legend to object format
if legendBool, ok := legendValue.(bool); ok {
options["legend"] = map[string]interface{}{
"displayMode": "list",
"showLegend": legendBool,
}
continue
}
// Handle object format legend
legend, ok := legendValue.(map[string]interface{})
if !ok {
if !ok || legend == nil {
continue
}
displayMode, hasDisplayMode := legend["displayMode"].(string)
displayMode, _ := legend["displayMode"].(string)
showLegend, hasShowLegend := legend["showLegend"].(bool)
// Normalize hidden legends
if (hasDisplayMode && displayMode == "hidden") || (hasShowLegend && !showLegend) {
// If displayMode is "hidden" OR showLegend is false, normalize to hidden legend
if displayMode == "hidden" || (hasShowLegend && !showLegend) {
legend["displayMode"] = "list"
legend["showLegend"] = false
continue
} else {
// For all other cases, ensure showLegend is true
legend["showLegend"] = true
}
// Ensure visible legends have showLegend true
legend["showLegend"] = true
}
return nil
}
@@ -9,96 +9,186 @@ import (
func TestV37(t *testing.T) {
tests := []migrationTestCase{
{
name: "no legend config",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"options": map[string]interface{}{},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"options": map[string]interface{}{},
},
},
},
},
{
name: "boolean legend true",
name: "legend normalization with nested panels",
input: map[string]interface{}{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 36,
"panels": []interface{}{
// Boolean legend true (should remain unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": map[string]interface{}{
"legend": true,
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": true,
},
},
},
},
},
},
{
name: "boolean legend false",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
// Boolean legend false (should remain unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": map[string]interface{}{
"legend": false,
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
},
},
},
{
name: "hidden displayMode",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
// Hidden displayMode (should be normalized)
map[string]interface{}{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "hidden",
"placement": "bottom",
},
},
},
// ShowLegend false (should be normalized)
map[string]interface{}{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"showLegend": false,
},
},
},
// Valid legend with table displayMode (should get showLegend: true)
map[string]interface{}{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"placement": "bottom",
},
},
},
// Valid legend with list displayMode (should get showLegend: true)
map[string]interface{}{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"placement": "right",
},
},
},
// Panel with no options (should remain unchanged)
map[string]interface{}{
"type": "text",
"title": "Panel with No Options",
"id": 7,
},
// Panel with no legend config (should remain unchanged)
map[string]interface{}{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": map[string]interface{}{
"reduceOptions": map[string]interface{}{
"fields": "/.*temperature.*/",
},
},
},
// Panel with nil legend (should remain unchanged)
map[string]interface{}{
"type": "piechart",
"title": "Panel with Nil Legend",
"id": 9,
"options": map[string]interface{}{
"legend": nil,
},
},
// Row with nested panels
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": []interface{}{
// Nested panel with boolean legend (should remain unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": map[string]interface{}{
"legend": true,
},
},
// Nested panel with hidden displayMode (should be normalized)
map[string]interface{}{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "hidden",
},
},
},
// Nested panel with showLegend false (should be normalized)
map[string]interface{}{
"type": "stat",
"title": "Nested Panel with ShowLegend False",
"id": 13,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"showLegend": false,
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 37,
"panels": []interface{}{
// Boolean legend true (unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": map[string]interface{}{
"legend": true,
},
},
// Boolean legend false (unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": map[string]interface{}{
"legend": false,
},
},
// Hidden displayMode (normalized)
map[string]interface{}{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
"placement": "bottom",
},
},
},
// ShowLegend false (normalized)
map[string]interface{}{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
@@ -106,62 +196,100 @@ func TestV37(t *testing.T) {
},
},
},
},
},
},
{
name: "showLegend false",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"showLegend": false,
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
},
},
},
{
name: "visible legend",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Valid legend with table displayMode (showLegend added)
map[string]interface{}{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
},
},
// Valid legend with list displayMode (showLegend added)
map[string]interface{}{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"placement": "right",
"showLegend": true,
},
},
},
// Panel with no options (unchanged)
map[string]interface{}{
"type": "text",
"title": "Panel with No Options",
"id": 7,
},
// Panel with no legend config (unchanged)
map[string]interface{}{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": map[string]interface{}{
"reduceOptions": map[string]interface{}{
"fields": "/.*temperature.*/",
},
},
},
// Panel with nil legend (unchanged)
map[string]interface{}{
"type": "piechart",
"title": "Panel with Nil Legend",
"id": 9,
"options": map[string]interface{}{
"legend": nil,
},
},
// Row with nested panels (nested panels processed)
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": []interface{}{
// Nested panel with boolean legend (unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": map[string]interface{}{
"legend": true,
},
},
// Nested panel with hidden displayMode (normalized)
map[string]interface{}{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
// Nested panel with showLegend false (normalized)
map[string]interface{}{
"type": "stat",
"title": "Nested Panel with ShowLegend False",
"id": 13,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
},
},
},
},
},
@@ -1,7 +1,75 @@
package schemaversion
// V38 updates the configuration of the table panel to use the new cellOptions format
// and updates the overrides to use the new cellOptions format
// V38 migrates table panel configuration from displayMode to the structured cellOptions format.
//
// This migration addresses limitations in the original table panel cell display configuration where
// the flat displayMode string property could not accommodate the growing complexity of cell rendering
// options. The original design forced all display settings into a single string value, making it
// difficult to add new customization parameters or provide mode-specific configuration options.
//
// The migration works by:
// 1. Locating table panels in the dashboard (including nested panels within rows)
// 2. Examining field configuration defaults and any field overrides for displayMode properties
// 3. Converting string displayMode values to structured cellOptions objects with type and mode
// 4. Updating both field defaults and field override references to use the new property path
// 5. Preserving all existing visual behavior while enabling future cell customization features
//
// This restructuring provides several key benefits:
// - Enables mode-specific configuration options (e.g., gauge thresholds, color schemes)
// - Supports future cell rendering types without breaking existing configurations
// - Provides clearer separation between cell type and rendering mode
// - Maintains backward compatibility while preparing for enhanced table functionality
//
// The migration handles special cases for legacy gauge modes and color background variants,
// ensuring all existing display behaviors are preserved exactly.
//
// Example transformations:
//
// Before migration (field defaults):
//
// fieldConfig: {
// defaults: {
// custom: {
// displayMode: "gradient-gauge"
// }
// }
// }
//
// After migration (field defaults):
//
// fieldConfig: {
// defaults: {
// custom: {
// cellOptions: {
// type: "gauge",
// mode: "gradient"
// }
// }
// }
// }
//
// Before migration (field override):
//
// overrides: [{
// matcher: { id: "byName", options: "CPU" },
// properties: [{
// id: "custom.displayMode",
// value: "color-background-solid"
// }]
// }]
//
// After migration (field override):
//
// overrides: [{
// matcher: { id: "byName", options: "CPU" },
// properties: [{
// id: "custom.cellOptions",
// value: {
// type: "color-background",
// mode: "basic"
// }
// }]
// }]
func V38(dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = int(38)
@@ -10,12 +78,28 @@ func V38(dashboard map[string]interface{}) error {
return nil
}
// Process all panels, including nested ones
processPanelsV38(panels)
return nil
}
// processPanelsV38 recursively processes panels, including nested panels within rows
func processPanelsV38(panels []interface{}) {
for _, panel := range panels {
p, ok := panel.(map[string]interface{})
if !ok {
continue
}
// Process nested panels if this is a row panel
if p["type"] == "row" {
if nestedPanels, ok := p["panels"].([]interface{}); ok {
processPanelsV38(nestedPanels)
}
continue
}
// Only process table panels
if p["type"] != "table" {
continue
@@ -48,8 +132,6 @@ func V38(dashboard map[string]interface{}) error {
// Update any overrides referencing the cell display mode
migrateOverrides(fieldConfig)
}
return nil
}
// migrateOverrides updates the overrides configuration to use the new cellOptions format
@@ -9,50 +9,213 @@ import (
func TestV38(t *testing.T) {
tests := []migrationTestCase{
{
name: "no table panels",
input: map[string]interface{}{
"schemaVersion": 37,
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"title": "Panel 1",
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"title": "Panel 1",
},
},
},
},
{
name: "table panel with basic gauge displayMode",
name: "table migration with nested panels",
input: map[string]interface{}{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 37,
"panels": []interface{}{
// Basic gauge table
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "basic",
},
},
"overrides": []interface{}{},
},
},
// Gradient gauge table
map[string]interface{}{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "gradient-gauge",
},
},
"overrides": []interface{}{},
},
},
// LCD gauge table
map[string]interface{}{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "lcd-gauge",
},
},
"overrides": []interface{}{},
},
},
// Color background table
map[string]interface{}{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background",
},
},
"overrides": []interface{}{},
},
},
// Color background solid table
map[string]interface{}{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background-solid",
},
},
"overrides": []interface{}{},
},
},
// Unknown mode table
map[string]interface{}{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "some-other-mode",
},
},
"overrides": []interface{}{},
},
},
// Table with no display mode
map[string]interface{}{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"width": 100,
},
},
"overrides": []interface{}{},
},
},
// Table with overrides
map[string]interface{}{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "basic",
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field1",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.displayMode",
"value": "gradient-gauge",
},
},
},
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field2",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.displayMode",
"value": "color-background",
},
},
},
},
},
},
// Non-table panel (should remain unchanged)
map[string]interface{}{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9,
},
// Row with nested table panels
map[string]interface{}{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "basic",
},
},
"overrides": []interface{}{},
},
},
map[string]interface{}{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "gradient-gauge",
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "NestedField",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.displayMode",
"value": "lcd-gauge",
},
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 38,
"panels": []interface{}{
// Basic gauge table (migrated)
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -62,33 +225,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with gradient-gauge displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Gradient gauge table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "gradient-gauge",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -98,33 +242,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with lcd-gauge displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// LCD gauge table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "lcd-gauge",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -134,33 +259,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with color-background displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Color background table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -170,33 +276,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with color-background-solid displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Color background solid table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background-solid",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -206,33 +293,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with default displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Unknown mode table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "some-other-mode",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -241,6 +309,132 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
// Table with no display mode (unchanged)
map[string]interface{}{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"width": 100,
},
},
"overrides": []interface{}{},
},
},
// Table with overrides (migrated)
map[string]interface{}{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"cellOptions": map[string]interface{}{
"type": "gauge",
"mode": "basic",
},
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field1",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.cellOptions",
"value": map[string]interface{}{
"type": "gauge",
"mode": "gradient",
},
},
},
},
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field2",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.cellOptions",
"value": map[string]interface{}{
"type": "color-background",
"mode": "gradient",
},
},
},
},
},
},
},
// Non-table panel (unchanged)
map[string]interface{}{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9,
},
// Row with nested table panels (nested tables migrated)
map[string]interface{}{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"cellOptions": map[string]interface{}{
"type": "gauge",
"mode": "basic",
},
},
},
"overrides": []interface{}{},
},
},
map[string]interface{}{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"cellOptions": map[string]interface{}{
"type": "gauge",
"mode": "gradient",
},
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "NestedField",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.cellOptions",
"value": map[string]interface{}{
"type": "gauge",
"mode": "lcd",
},
},
},
},
},
},
},
},
},
},
@@ -1,7 +1,50 @@
package schemaversion
// V39 updates the configuration of the Timeseries to table transformation
// to support multiple options per query
// V39 migrates timeSeriesTable transformation configuration to support extensible per-query options.
//
// This migration addresses limitations in the original timeSeriesTable transformation design where
// each query could only be configured with a single statistic function. The original refIdToStat
// format was too restrictive for evolving use cases that require multiple configuration parameters
// per query, such as custom formatting, aggregation methods, or display preferences.
//
// The migration works by:
// 1. Locating panels with timeSeriesTable transformations (including nested panels in rows)
// 2. Extracting the existing refIdToStat mapping from transformation options
// 3. Converting each refId-statistic pair to the new nested object structure
// 4. Preserving the statistic function while enabling future option expansion
// 5. Skipping transformations that lack valid refIdToStat configuration
//
// This restructuring enables future enhancements while maintaining backward compatibility:
// - Additional per-query options can be added without breaking existing configurations
// - The stat property preserves current functionality exactly as before
// - New features like custom labels, formats, or calculations can be added seamlessly
// - The structure scales better for complex multi-query transformations
//
// Example transformation:
//
// Before migration:
//
// transformations: [{
// id: "timeSeriesTable",
// options: {
// refIdToStat: {
// "A": "mean",
// "B": "max",
// "C": "last"
// }
// }
// }]
//
// After migration:
//
// transformations: [{
// id: "timeSeriesTable",
// options: {
// "A": { stat: "mean" },
// "B": { stat: "max" },
// "C": { stat: "last" }
// }
// }]
func V39(dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = int(39)
@@ -10,12 +53,28 @@ func V39(dashboard map[string]interface{}) error {
return nil
}
// Process all panels, including nested ones
processPanelsV39(panels)
return nil
}
// processPanelsV39 recursively processes panels, including nested panels within rows
func processPanelsV39(panels []interface{}) {
for _, panel := range panels {
p, ok := panel.(map[string]interface{})
if !ok {
continue
}
// Process nested panels if this is a row panel
if p["type"] == "row" {
if nestedPanels, ok := p["panels"].([]interface{}); ok {
processPanelsV39(nestedPanels)
}
continue
}
transformations, ok := p["transformations"].([]interface{})
if !ok {
continue
@@ -55,6 +114,4 @@ func V39(dashboard map[string]interface{}) error {
t["options"] = transformationOptions
}
}
return nil
}
@@ -9,32 +9,32 @@ import (
func TestV39(t *testing.T) {
tests := []migrationTestCase{
{
name: "no transformations",
input: map[string]interface{}{
"schemaVersion": 38,
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"title": "Panel 1",
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"panels": []interface{}{
map[string]interface{}{
"title": "Panel 1",
},
},
},
},
{
name: "timeSeriesTable transformation with refIdToStat",
name: "comprehensive timeSeriesTable transformation migration with nested panels",
input: map[string]interface{}{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 38,
"panels": []interface{}{
// Single stat timeSeriesTable
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "mean",
},
},
},
},
},
// Multiple stats timeSeriesTable
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
@@ -42,6 +42,121 @@ func TestV39(t *testing.T) {
"refIdToStat": map[string]interface{}{
"A": "mean",
"B": "max",
"C": "min",
"D": "sum",
},
},
},
},
},
// Mixed transformations
map[string]interface{}{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": []interface{}{
map[string]interface{}{
"id": "reduce",
"options": map[string]interface{}{
"reducers": []interface{}{"mean"},
},
},
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "last",
"B": "first",
},
},
},
map[string]interface{}{
"id": "organize",
"options": map[string]interface{}{
"excludeByName": map[string]interface{}{},
},
},
},
},
// Non-timeSeriesTable transformation
map[string]interface{}{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": []interface{}{
map[string]interface{}{
"id": "reduce",
"options": map[string]interface{}{
"reducers": []interface{}{"mean", "max"},
},
},
},
},
// Empty refIdToStat
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{},
},
},
},
},
// No options (should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
},
},
},
// Invalid options (should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"someOtherOption": "value",
},
},
},
},
// No transformations
map[string]interface{}{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8,
},
// Row with nested panels
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"NestedA": "median",
"NestedB": "stdDev",
},
},
},
},
},
@@ -50,9 +165,30 @@ func TestV39(t *testing.T) {
},
},
expected: map[string]interface{}{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 39,
"panels": []interface{}{
// Single stat timeSeriesTable (migrated)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"A": map[string]interface{}{
"stat": "mean",
},
},
},
},
},
// Multiple stats timeSeriesTable (migrated)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
@@ -63,41 +199,126 @@ func TestV39(t *testing.T) {
"B": map[string]interface{}{
"stat": "max",
},
},
},
},
},
},
},
},
{
name: "non-timeSeriesTable transformation is not modified",
input: map[string]interface{}{
"panels": []interface{}{
map[string]interface{}{
"transformations": []interface{}{
map[string]interface{}{
"id": "otherTransform",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "mean",
"C": map[string]interface{}{
"stat": "min",
},
"D": map[string]interface{}{
"stat": "sum",
},
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 39,
"panels": []interface{}{
// Mixed transformations (timeSeriesTable migrated, others unchanged)
map[string]interface{}{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": []interface{}{
map[string]interface{}{
"id": "otherTransform",
"id": "reduce",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "mean",
"reducers": []interface{}{"mean"},
},
},
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"A": map[string]interface{}{
"stat": "last",
},
"B": map[string]interface{}{
"stat": "first",
},
},
},
map[string]interface{}{
"id": "organize",
"options": map[string]interface{}{
"excludeByName": map[string]interface{}{},
},
},
},
},
// Non-timeSeriesTable transformation (unchanged)
map[string]interface{}{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": []interface{}{
map[string]interface{}{
"id": "reduce",
"options": map[string]interface{}{
"reducers": []interface{}{"mean", "max"},
},
},
},
},
// Empty refIdToStat (migrated to empty options)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{},
},
},
},
// No options (unchanged - should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
},
},
},
// Invalid options (unchanged - should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"someOtherOption": "value",
},
},
},
},
// No transformations (unchanged)
map[string]interface{}{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8,
},
// Row with nested panels (nested panel migrated)
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"NestedA": map[string]interface{}{
"stat": "median",
},
"NestedB": map[string]interface{}{
"stat": "stdDev",
},
},
},
},
},
@@ -1,5 +1,38 @@
package schemaversion
// V40 normalizes the dashboard refresh property to ensure consistent string typing.
//
// This migration addresses type inconsistencies in dashboard refresh configuration that could
// cause runtime errors or unexpected behavior. Over time, the refresh property has accumulated
// various data types (boolean, numeric, null, undefined) due to different dashboard creation
// methods, API usage patterns, and legacy imports.
//
// The migration works by:
// 1. Checking if the refresh property exists and is already a string type
// 2. Converting any non-string values (boolean true/false, numbers, null) to an empty string
// 3. Ensuring all dashboards have a consistent string-typed refresh property
//
// This normalization is critical because:
// - The frontend refresh logic expects string values for parsing time intervals
// - Non-string values can cause dashboard loading failures
// - Empty string is the standard representation for "no auto-refresh"
// - Consistent typing enables proper validation and UI behavior
//
// Example transformations:
//
// Before migration:
//
// refresh: true // boolean
// refresh: 30 // number (seconds)
// refresh: null // null value
// refresh: undefined // missing property
//
// After migration:
//
// refresh: "" // normalized to empty string
// refresh: "" // normalized to empty string
// refresh: "" // normalized to empty string
// refresh: "" // property added with empty string
func V40(dash map[string]interface{}) error {
dash["schemaVersion"] = int(40)
if _, ok := dash["refresh"].(string); !ok {
@@ -20,7 +20,7 @@ func TestV40(t *testing.T) {
},
},
{
name: "boolean refresh value is converted to an empty string",
name: "boolean refresh value (true) is converted to an empty string",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
@@ -32,6 +32,19 @@ func TestV40(t *testing.T) {
"refresh": "",
},
},
{
name: "boolean refresh value (false) is converted to an empty string",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"refresh": false,
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 40,
"refresh": "",
},
},
{
name: "string refresh value is not converted",
input: map[string]interface{}{
@@ -45,6 +58,32 @@ func TestV40(t *testing.T) {
"refresh": "1m",
},
},
{
name: "empty string refresh value is preserved",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"refresh": "",
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 40,
"refresh": "",
},
},
{
name: "numeric refresh value is converted to empty string",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"refresh": 60,
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 40,
"refresh": "",
},
},
}
runMigrationTests(t, tests, schemaversion.V40)
@@ -1,5 +1,35 @@
package schemaversion
// V41 removes the deprecated time_options property from dashboard timepicker configuration.
//
// This migration addresses technical debt by cleaning up legacy timepicker settings that have
// been obsolete since Grafana version 5. The time_options property was originally designed to
// allow customization of predefined time range options in the time picker dropdown, but this
// functionality was superseded by more flexible time selection mechanisms.
//
// The migration works by:
// 1. Locating dashboard timepicker configuration objects
// 2. Removing the deprecated time_options property if present
// 3. Preserving all other timepicker settings (refresh_intervals, etc.)
//
// This cleanup prevents potential confusion for developers and ensures the dashboard schema
// remains focused on actively used configuration options. The removal is safe because the
// time_options property has had no functional impact for several major Grafana versions.
//
// Example transformation:
//
// Before migration:
//
// timepicker: {
// refresh_intervals: ["5s", "10s", "30s", "1m"],
// time_options: ["5m", "15m", "1h", "6h", "12h", "24h"]
// }
//
// After migration:
//
// timepicker: {
// refresh_intervals: ["5s", "10s", "30s", "1m"]
// }
func V41(dash map[string]interface{}) error {
dash["schemaVersion"] = int(41)
if timepicker, ok := dash["timepicker"].(map[string]interface{}); ok {
@@ -22,6 +22,22 @@ func TestV41(t *testing.T) {
"timepicker": map[string]interface{}{},
},
},
{
name: "timepicker without time_options is unchanged",
input: map[string]interface{}{
"title": "Test Dashboard",
"timepicker": map[string]interface{}{
"refresh_intervals": []string{"5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 41,
"timepicker": map[string]interface{}{
"refresh_intervals": []string{"5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"},
},
},
},
{
name: "timepicker is not set",
input: map[string]interface{}{
@@ -1,561 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"name": "CloudWatch Annotation Single Stat",
"enable": true,
"iconColor": "red",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Stats",
"enable": true,
"iconColor": "blue",
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Stats",
"id": 11,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"targets": [
{
"refId": "A",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300",
"alias": "CPU Usage"
}
]
},
{
"type": "timeseries",
"title": "Mixed CloudWatch and Prometheus Queries",
"id": 12,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"targets": [
{
"refId": "A",
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum", "Average"]
},
{
"refId": "B",
"expr": "up",
"datasource": "prometheus"
},
{
"refId": "C",
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistics": ["Maximum"]
}
]
},
{
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"id": 13,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"panels": [
{
"type": "timeseries",
"title": "Nested CloudWatch Panel",
"id": 14,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"refId": "A",
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum", "Sum"]
}
]
}
]
},
{
"type": "stat",
"title": "V33: Panel with Null Datasource",
"id": 15,
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"targets": [
{
"refId": "A",
"datasource": "non-default-test-ds-uid"
}
]
},
{
"type": "stat",
"title": "V33: Panel with Existing Datasource Reference",
"id": 16,
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
}
}
]
},
{
"type": "table",
"title": "V33: Panel without Targets",
"id": 17,
"datasource": "Non Default Test Datasource",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
}
},
{
"type": "table",
"title": "V33: Panel with Empty Targets Array",
"id": 18,
"datasource": "default",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"targets": []
},
{
"type": "graph",
"title": "V33: Target Datasource Edge Cases",
"id": 19,
"datasource": "non-default-test-ds-uid",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"targets": [
{
"refId": "A",
"datasource": null
},
{
"refId": "B",
"datasource": "default"
},
{
"refId": "C",
"datasource": "non-existing-ds"
},
{
"refId": "D"
}
]
},
{
"type": "timeseries",
"title": "V33: Mixed Target References",
"id": 20,
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-ref",
"type": "prometheus"
}
},
{
"refId": "B",
"datasource": "Non Default Test Datasource"
},
{
"refId": "C",
"datasource": "default"
}
]
},
{
"type": "stat",
"title": "V33: Panel with Empty String Datasource",
"id": 21,
"datasource": "",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"targets": [
{
"refId": "A",
"datasource": ""
}
]
},
{
"type": "table",
"title": "V33: Panel with Another Non-existing Datasource",
"id": 22,
"datasource": "completely-missing-ds",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"targets": [
{
"refId": "A",
"datasource": "also-missing-ds"
},
{
"refId": "B",
"datasource": ""
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 32,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
},
{
"type": "query",
"datasource": "",
"name": "empty_string_var"
},
{
"type": "query",
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,375 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"name": "CloudWatch Annotation Single Stat",
"enable": true,
"iconColor": "red",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Stats",
"enable": true,
"iconColor": "blue",
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Stats",
"id": 11,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"targets": [
{
"refId": "A",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300",
"alias": "CPU Usage"
}
]
},
{
"type": "timeseries",
"title": "Mixed CloudWatch and Prometheus Queries",
"id": 12,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"targets": [
{
"refId": "A",
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum", "Average"]
},
{
"refId": "B",
"expr": "up",
"datasource": "prometheus"
},
{
"refId": "C",
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistics": ["Maximum"]
}
]
},
{
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"id": 13,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"panels": [
{
"type": "timeseries",
"title": "Nested CloudWatch Panel",
"id": 14,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"refId": "A",
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum", "Sum"]
}
]
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 33,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,251 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,231 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,125 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,362 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "basic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "gradient-gauge"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "lcd-gauge"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "color-background"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "color-background-solid"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "some-other-mode"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,155 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean",
"B": "max"
}
}
}
],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,136 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": "",
"refresh": true,
"schemaVersion": 39
}
@@ -1,136 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": "",
"refresh": "",
"schemaVersion": 40
}
@@ -0,0 +1,166 @@
{
"schemaVersion": 32,
"title": "V33 Panel Datasource Name to Ref Test",
"panels": [
{
"type": "stat",
"title": "Panel Datasource: null → should stay null",
"description": "Tests v33 migration behavior when panel datasource is explicitly null. Should remain null after migration (returnDefaultAsNull: true).",
"id": 1,
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": "non-default-test-ds-uid",
"description": "Target with UID reference should migrate to full object"
}
]
},
{
"type": "stat",
"title": "Panel Datasource: existing object → should stay unchanged",
"description": "Tests v33 migration behavior when panel datasource is already a proper object reference. Should remain unchanged.",
"id": 2,
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
},
"description": "Target with existing object should remain unchanged"
}
]
},
{
"type": "table",
"title": "Panel Datasource: string name → should migrate to object",
"description": "Tests v33 migration when panel datasource is a string name. Should convert to proper object with uid, type, apiVersion.",
"id": 3,
"datasource": "Non Default Test Datasource Name"
},
{
"type": "table",
"title": "Panel Datasource: string name with empty targets → should migrate",
"description": "Tests v33 migration when panel has datasource string but empty targets array. Panel datasource should still migrate.",
"id": 4,
"datasource": "Default Test Datasource Name",
"targets": []
},
{
"type": "graph",
"title": "Target Datasources: mixed null/string/non-existing scenarios",
"description": "Tests v33 target migration with various edge cases: null target (unchanged), valid string (migrated), non-existing string (preserved), missing datasource field (unchanged).",
"id": 5,
"datasource": "non-default-test-ds-uid",
"targets": [
{
"refId": "A",
"datasource": null,
"description": "Null target datasource should remain null"
},
{
"refId": "B",
"datasource": "Default Test Datasource Name",
"description": "Valid string should migrate to object"
},
{
"refId": "C",
"datasource": "non-existing-ds",
"description": "Non-existing datasource should be preserved as-is (migration returns nil)"
},
{
"refId": "D",
"description": "Target without datasource field should remain unchanged"
}
]
},
{
"type": "timeseries",
"title": "Panel: null datasource with mixed target types",
"description": "Tests v33 migration when panel datasource is null but targets have mixed reference types (object, string). Panel should stay null, targets should migrate appropriately.",
"id": 6,
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-ref",
"type": "prometheus"
},
"description": "Existing object target should remain unchanged"
},
{
"refId": "B",
"datasource": "Non Default Test Datasource Name",
"description": "String target should migrate to object"
},
{
"refId": "C",
"datasource": "Default Test Datasource Name",
"description": "Default datasource string should migrate to object"
}
]
},
{
"type": "stat",
"title": "Empty string datasource → should return empty object {}",
"description": "Tests v33 migration behavior with empty string datasource. Should migrate to empty object {} based on MigrateDatasourceNameToRef logic.",
"id": 7,
"datasource": "",
"targets": [
{
"refId": "A",
"datasource": "",
"description": "Empty string target should also migrate to empty object {}"
}
]
},
{
"type": "table",
"title": "Non-existing datasources → should be preserved as-is",
"description": "Tests v33 migration with completely unknown datasource names. Since migration returns nil for unknown datasources, they should be preserved unchanged.",
"id": 8,
"datasource": "completely-missing-ds",
"targets": [
{
"refId": "A",
"datasource": "also-missing-ds",
"description": "Unknown target datasource should remain unchanged (migration returns nil)"
},
{
"refId": "B",
"datasource": "",
"description": "Empty string target should migrate to {}"
}
]
},
{
"type": "row",
"title": "Row Panel: nested panels should also migrate",
"description": "Tests v33 migration handles nested panels within collapsed rows. Nested panel datasources should migrate same as top-level panels.",
"id": 9,
"collapsed": true,
"panels": [
{
"type": "timeseries",
"title": "Nested Panel: string datasource → should migrate to object",
"description": "Nested panel with string datasource should migrate to proper object reference, proving row panel recursion works.",
"id": 10,
"datasource": "Non Default Test Datasource Name",
"targets": [
{
"refId": "A",
"datasource": "Default Test Datasource Name",
"description": "Nested target should also migrate from string to object"
}
]
}
]
}
]
}
@@ -0,0 +1,366 @@
{
"title": "CloudWatch Multiple Statistics Test Dashboard",
"schemaVersion": 33,
"annotations": {
"list": [
{
"name": "CloudWatch Annotation Single Statistic",
"enable": true,
"iconColor": "red",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Statistics",
"enable": true,
"iconColor": "blue",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
},
{
"name": "CloudWatch Annotation Empty Statistics",
"enable": true,
"iconColor": "green",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"LoadBalancer": "my-lb"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-1",
"prefixMatching": false,
"statistics": []
},
{
"name": "CloudWatch Annotation Invalid Statistics",
"enable": true,
"iconColor": "yellow",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"TableName": "my-table"
},
"namespace": "AWS/DynamoDB",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["InvalidStat", "Sum", null, "Average"]
},
{
"name": "Non-CloudWatch Annotation",
"enable": true,
"iconColor": "purple",
"datasource": {
"uid": "prometheus"
}
}
]
},
"panels": [
{
"id": 1,
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300"
}
]
},
{
"id": 2,
"type": "timeseries",
"title": "CloudWatch Single Query Single Statistic",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum"]
}
]
},
{
"id": 3,
"type": "timeseries",
"title": "CloudWatch Query No Statistics Array",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistic": "Maximum"
}
]
},
{
"id": 4,
"type": "timeseries",
"title": "Mixed CloudWatch and Non-CloudWatch Queries",
"datasource": {
"uid": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum"]
},
{
"refId": "B",
"expr": "up",
"datasource": {
"uid": "prometheus"
}
},
{
"refId": "C",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"TopicName": "my-topic"
},
"namespace": "AWS/SNS",
"region": "us-west-1",
"metricName": "NumberOfMessagesPublished",
"statistics": ["Sum"]
}
]
},
{
"id": 5,
"type": "timeseries",
"title": "CloudWatch Query Empty Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"BucketName": "my-bucket"
},
"namespace": "AWS/S3",
"region": "us-east-1",
"metricName": "BucketSizeBytes",
"statistics": []
}
]
},
{
"id": 6,
"type": "timeseries",
"title": "CloudWatch Query Invalid Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"FunctionName": "my-function"
},
"namespace": "AWS/Lambda",
"region": "us-west-2",
"metricName": "Duration",
"statistics": ["InvalidStat", "Average", null, "Maximum", ""]
}
]
},
{
"id": 7,
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
}
}
],
"panels": [
{
"id": 8,
"type": "timeseries",
"title": "Nested CloudWatch Query Multiple Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"StreamName": "my-stream"
},
"namespace": "AWS/Kinesis",
"region": "us-east-1",
"metricName": "IncomingRecords",
"statistics": ["Sum", "Average", "Maximum"]
}
]
}
]
},
{
"id": 9,
"type": "timeseries",
"title": "CloudWatch Query with Existing Editor Mode",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"ClusterName": "my-cluster"
},
"namespace": "AWS/ECS",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum"],
"metricEditorMode": 1,
"metricQueryType": 1,
"period": "300"
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Non-CloudWatch Panel",
"datasource": {
"uid": "prometheus"
},
"targets": [
{
"refId": "A",
"expr": "cpu_usage",
"datasource": {
"uid": "prometheus"
}
}
]
}
]
}
@@ -0,0 +1,100 @@
{
"title": "X-Axis Visibility Test Dashboard",
"schemaVersion": 34,
"panels": [
{
"title": "Timeseries with Hidden Axis",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"title": "Timeseries with Hidden Axis and Existing Overrides",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Series A"
},
"properties": [
{
"id": "color.mode",
"value": "palette-classic"
}
]
}
]
}
},
{
"title": "Timeseries with Auto Axis (No Change Expected)",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto"
}
},
"overrides": []
}
},
{
"title": "Stat Panel with Hidden Axis (No Change Expected)",
"type": "stat",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"title": "Timeseries with Missing FieldConfig",
"type": "timeseries",
"id": 5
},
{
"title": "Timeseries with Missing Defaults",
"type": "timeseries",
"fieldConfig": {
"overrides": []
}
},
{
"title": "Timeseries with Missing Custom Config",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"unit": "bytes"
},
"overrides": []
}
},
{
"title": "Timeseries with Missing Overrides Array",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
}
}
}
]
}
@@ -0,0 +1,286 @@
{
"title": "Datasource Reference Migration Test Dashboard",
"schemaVersion": 35,
"annotations": {
"list": [
{
"name": "Default Annotation - Tests default datasource migration",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
}
},
{
"name": "Named Datasource Annotation - Tests migration by datasource name",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "UID Datasource Annotation - Tests migration by datasource UID",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "Null Datasource Annotation - Tests null datasource fallback to default",
"datasource": null
},
{
"name": "Unknown Datasource Annotation - Tests unknown datasource preserved as UID",
"datasource": {
"uid": "unknown-datasource-name"
}
}
]
},
"templating": {
"list": [
{
"name": "query_var_null",
"type": "query",
"datasource": null
},
{
"name": "query_var_named",
"type": "query",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "query_var_uid",
"type": "query",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "query_var_unknown",
"type": "query",
"datasource": {
"uid": "unknown-datasource"
}
},
{
"name": "non_query_var",
"type": "constant",
"datasource": null
}
]
},
"panels": [
{
"id": 1,
"title": "Panel with Null Datasource and Targets",
"description": "Tests null panel datasource migration with targets - should fallback to default",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": null
}
]
},
{
"id": 2,
"title": "Panel with Null Datasource and Empty Targets",
"description": "Tests null panel datasource with empty targets array - should create default target",
"datasource": null,
"targets": []
},
{
"id": 3,
"title": "Panel with No Targets Array",
"description": "Tests null panel datasource with missing targets - should create default target array",
"datasource": null
},
{
"id": 4,
"title": "Panel with Mixed Datasources",
"description": "Tests mixed datasource panel - targets should migrate independently",
"datasource": {
"uid": "-- Mixed --"
},
"targets": [
{
"refId": "A",
"datasource": null
},
{
"refId": "B",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 5,
"title": "Panel with Existing Object Datasource",
"description": "Tests panel with already migrated datasource object - should preserve existing refs",
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
}
}
]
},
{
"id": 6,
"title": "Panel with Unknown Datasource Name",
"description": "Tests panel with unknown datasource - should preserve as UID-only reference",
"datasource": {
"uid": "unknown-panel-datasource"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "unknown-target-datasource"
}
}
]
},
{
"id": 7,
"title": "Panel with Expression Query",
"description": "Tests panel with expression query - should not inherit expression as panel datasource",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
},
{
"refId": "B",
"datasource": {
"uid": "__expr__",
"type": "__expr__"
}
}
]
},
{
"id": 8,
"title": "Panel Inheriting from Target",
"description": "Tests panel inheriting datasource from target when panel datasource was default",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 9,
"title": "Panel with Named Datasource",
"description": "Tests panel with datasource referenced by name - should migrate to full object",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
},
{
"id": 10,
"title": "Panel with UID Datasource",
"description": "Tests panel with datasource referenced by UID - should migrate to full object",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
},
{
"id": 11,
"type": "row",
"title": "Simple Row Panel",
"description": "Tests row panel - it gets datasource or targets fields added even it is not needed, but this is how it works in frontend",
"collapsed": false,
"panels": []
},
{
"id": 12,
"type": "row",
"title": "Collapsed Row with Nested Panels",
"description": "Tests collapsed row with nested panels - nested panels should migrate",
"collapsed": true,
"panels": [
{
"id": 13,
"title": "Nested Panel with Default Datasource",
"description": "Nested panel in collapsed row with default datasource",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 14,
"title": "Nested Panel with Unknown Datasource",
"description": "Nested panel in collapsed row with unknown datasource",
"datasource": {
"uid": "unknown-nested-datasource"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
}
]
}
]
}
@@ -0,0 +1,126 @@
{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 36,
"panels": [
{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": {
"legend": true
}
},
{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": {
"legend": false
}
},
{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": {
"legend": {
"displayMode": "hidden",
"showLegend": true
}
}
},
{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": {
"legend": {
"displayMode": "table",
"showLegend": false
}
}
},
{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom"
}
}
},
{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": {
"legend": {
"displayMode": "list",
"placement": "right"
}
}
},
{
"type": "text",
"title": "Panel with No Options",
"id": 7
},
{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": {
"reduceOptions": {
"fields": "/.*temperature.*/"
}
}
},
{
"type": "piechart",
"title": "Panel with Null Legend",
"id": 9,
"options": {
"legend": null
}
},
{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": {
"legend": true
}
},
{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": {
"legend": {
"displayMode": "hidden"
}
}
},
{
"type": "stat",
"title": "Nested Panel with Conflicting Properties",
"id": 13,
"options": {
"legend": {
"displayMode": "table",
"showLegend": false
}
}
}
]
}
]
}
@@ -0,0 +1,187 @@
{
"title": "V38 Table Migration Comprehensive Test Dashboard",
"schemaVersion": 37,
"panels": [
{
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "lcd-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background-solid"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "some-other-mode"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
}
]
}
]
}
},
{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9
},
{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
}
]
}
]
}
}
]
}
]
}
@@ -0,0 +1,187 @@
{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 37,
"panels": [
{
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "lcd-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background-solid"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "some-other-mode"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
}
]
}
]
}
},
{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9
},
{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
}
]
}
]
}
}
]
}
]
}
@@ -0,0 +1,145 @@
{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 38,
"panels": [
{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean"
}
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean",
"B": "max",
"C": "min",
"D": "sum"
}
}
}
]
},
{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["mean"]
}
},
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "last",
"B": "first"
}
}
},
{
"id": "organize",
"options": {
"excludeByName": {}
}
}
]
},
{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["mean", "max"]
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {}
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": [
{
"id": "timeSeriesTable"
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"someOtherOption": "value"
}
}
]
},
{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8
},
{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"NestedA": "median",
"NestedB": "stdDev"
}
}
}
]
}
]
}
]
}
@@ -0,0 +1,10 @@
{
"title": "Empty String Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": ""
}
@@ -0,0 +1,10 @@
{
"title": "Boolean False Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": false
}
@@ -0,0 +1,9 @@
{
"title": "Refresh Not Set Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
}
}
@@ -0,0 +1,10 @@
{
"title": "Numeric Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": 60
}
@@ -0,0 +1,10 @@
{
"title": "String Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": "1m"
}
@@ -0,0 +1,10 @@
{
"title": "Boolean Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": true
}
@@ -0,0 +1,10 @@
{
"title": "No Time Picker Test Dashboard",
"schemaVersion": 40,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": ""
}
@@ -0,0 +1,7 @@
{
"title": "Time Picker No Time Options Test Dashboard",
"schemaVersion": 40,
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
}
}
@@ -0,0 +1,14 @@
{
"title": "Time Picker Time Options Test Dashboard",
"schemaVersion": 40,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"refresh": ""
}
@@ -1,660 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistics": [
"Average"
]
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistics": [
"Maximum",
"Minimum",
"Sum"
]
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistics": [
"Average",
"Maximum",
"Minimum"
]
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistics": [
"Sum",
"Average"
]
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistics": [
"Maximum"
]
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistics": [
"Average",
"Maximum",
"Sum"
]
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": [],
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": null,
"refId": "A"
},
{
"datasource": "default",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": "default",
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 33,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
},
{
"datasource": "",
"name": "empty_string_var",
"type": "query"
},
{
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,719 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": null,
"refId": "A"
},
{
"datasource": "default",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": "default",
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
},
{
"datasource": "",
"name": "empty_string_var",
"type": "query"
},
{
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,732 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": null,
"refId": "A"
},
{
"datasource": "default",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": "default",
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
},
{
"datasource": "",
"name": "empty_string_var",
"type": "query"
},
{
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,831 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,828 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,462 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": "default",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": "non-existing-ds",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": "non-existing-ds"
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": "prometheus",
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,475 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": "default",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": "non-existing-ds",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": "non-existing-ds"
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": "prometheus",
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,531 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,528 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,273 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": "default",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": "non-existing-ds",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": "non-existing-ds"
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,326 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,323 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,294 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,291 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,132 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,387 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,387 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,387 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,375 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,167 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "mean"
},
"B": {
"stat": "max"
}
}
}
],
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,167 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "mean"
},
"B": {
"stat": "max"
}
}
}
],
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,155 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "mean"
},
"B": {
"stat": "max"
}
}
}
],
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,146 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,134 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,134 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -0,0 +1,270 @@
{
"panels": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Tests v33 migration behavior when panel datasource is explicitly null. Should remain null after migration (returnDefaultAsNull: true).",
"id": 1,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Target with UID reference should migrate to full object",
"refId": "A"
}
],
"title": "Panel Datasource: null → should stay null",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"description": "Tests v33 migration behavior when panel datasource is already a proper object reference. Should remain unchanged.",
"id": 2,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"description": "Target with existing object should remain unchanged",
"refId": "A"
}
],
"title": "Panel Datasource: existing object → should stay unchanged",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Tests v33 migration when panel datasource is a string name. Should convert to proper object with uid, type, apiVersion.",
"id": 3,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "Panel Datasource: string name → should migrate to object",
"type": "table"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests v33 migration when panel has datasource string but empty targets array. Panel datasource should still migrate.",
"id": 4,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel Datasource: string name with empty targets → should migrate",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Tests v33 target migration with various edge cases: null target (unchanged), valid string (migrated), non-existing string (preserved), missing datasource field (unchanged).",
"id": 5,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Null target datasource should remain null",
"refId": "A"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Valid string should migrate to object",
"refId": "B"
},
{
"datasource": {
"uid": "non-existing-ds"
},
"description": "Non-existing datasource should be preserved as-is (migration returns nil)",
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Target without datasource field should remain unchanged",
"refId": "D"
}
],
"title": "Target Datasources: mixed null/string/non-existing scenarios",
"type": "graph"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests v33 migration when panel datasource is null but targets have mixed reference types (object, string). Panel should stay null, targets should migrate appropriately.",
"id": 6,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"description": "Existing object target should remain unchanged",
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "String target should migrate to object",
"refId": "B"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Default datasource string should migrate to object",
"refId": "C"
}
],
"title": "Panel: null datasource with mixed target types",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests v33 migration behavior with empty string datasource. Should migrate to empty object {} based on MigrateDatasourceNameToRef logic.",
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Empty string target should also migrate to empty object {}",
"refId": "A"
}
],
"title": "Empty string datasource → should return empty object {}",
"type": "stat"
},
{
"datasource": {
"uid": "completely-missing-ds"
},
"description": "Tests v33 migration with completely unknown datasource names. Since migration returns nil for unknown datasources, they should be preserved unchanged.",
"id": 8,
"targets": [
{
"datasource": {
"uid": "also-missing-ds"
},
"description": "Unknown target datasource should remain unchanged (migration returns nil)",
"refId": "A"
},
{
"datasource": {
"uid": "completely-missing-ds"
},
"description": "Empty string target should migrate to {}",
"refId": "B"
}
],
"title": "Non-existing datasources → should be preserved as-is",
"type": "table"
},
{
"collapsed": true,
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests v33 migration handles nested panels within collapsed rows. Nested panel datasources should migrate same as top-level panels.",
"id": 9,
"panels": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"description": "Nested panel with string datasource should migrate to proper object reference, proving row panel recursion works.",
"id": 10,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Nested target should also migrate from string to object",
"refId": "A"
}
],
"title": "Nested Panel: string datasource → should migrate to object",
"type": "timeseries"
}
],
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Row Panel: nested panels should also migrate",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V33 Panel Datasource Name to Ref Test"
}
@@ -0,0 +1,639 @@
{
"annotations": {
"list": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Statistic",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Statistics - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-lb"
},
"enable": true,
"iconColor": "green",
"name": "CloudWatch Annotation Empty Statistics",
"namespace": "AWS/ApplicationELB",
"prefixMatching": false,
"region": "us-west-1",
"statistics": []
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"TableName": "my-table"
},
"enable": true,
"iconColor": "yellow",
"name": "CloudWatch Annotation Invalid Statistics - InvalidStat",
"namespace": "AWS/DynamoDB",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "InvalidStat"
},
{
"datasource": {
"uid": "prometheus"
},
"enable": true,
"iconColor": "purple",
"name": "Non-CloudWatch Annotation"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Statistics - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Statistics - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"TableName": "my-table"
},
"enable": true,
"iconColor": "yellow",
"name": "CloudWatch Annotation Invalid Statistics - Sum",
"namespace": "AWS/DynamoDB",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Sum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"TableName": "my-table"
},
"enable": true,
"iconColor": "yellow",
"name": "CloudWatch Annotation Invalid Statistics - null",
"namespace": "AWS/DynamoDB",
"prefixMatching": false,
"region": "us-east-1"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"TableName": "my-table"
},
"enable": true,
"iconColor": "yellow",
"name": "CloudWatch Annotation Invalid Statistics - Average",
"namespace": "AWS/DynamoDB",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
}
]
},
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 1,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricEditorMode": 0,
"metricName": "CPUUtilization",
"metricQueryType": 0,
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricEditorMode": 0,
"metricName": "CPUUtilization",
"metricQueryType": 0,
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricEditorMode": 0,
"metricName": "CPUUtilization",
"metricQueryType": 0,
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Statistics",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 2,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricEditorMode": 0,
"metricName": "RequestCount",
"metricQueryType": 0,
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
}
],
"title": "CloudWatch Single Query Single Statistic",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 3,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricEditorMode": 0,
"metricName": "DatabaseConnections",
"metricQueryType": 0,
"namespace": "AWS/RDS",
"refId": "A",
"region": "us-east-1",
"statistic": "Maximum"
}
],
"title": "CloudWatch Query No Statistics Array",
"type": "timeseries"
},
{
"datasource": {
"uid": "prometheus"
},
"id": 4,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"QueueName": "my-queue"
},
"metricEditorMode": 0,
"metricName": "ApproximateNumberOfMessages",
"metricQueryType": 0,
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"datasource": {
"uid": "prometheus"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"TopicName": "my-topic"
},
"metricEditorMode": 0,
"metricName": "NumberOfMessagesPublished",
"metricQueryType": 0,
"namespace": "AWS/SNS",
"refId": "C",
"region": "us-west-1",
"statistic": "Sum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"QueueName": "my-queue"
},
"metricEditorMode": 0,
"metricName": "ApproximateNumberOfMessages",
"metricQueryType": 0,
"namespace": "AWS/SQS",
"refId": "D",
"region": "us-east-1",
"statistic": "Maximum"
}
],
"title": "Mixed CloudWatch and Non-CloudWatch Queries",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 5,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"BucketName": "my-bucket"
},
"metricEditorMode": 0,
"metricName": "BucketSizeBytes",
"metricQueryType": 0,
"namespace": "AWS/S3",
"refId": "A",
"region": "us-east-1",
"statistics": []
}
],
"title": "CloudWatch Query Empty Statistics",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 6,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"FunctionName": "my-function"
},
"metricEditorMode": 0,
"metricName": "Duration",
"metricQueryType": 0,
"namespace": "AWS/Lambda",
"refId": "A",
"region": "us-west-2",
"statistic": "InvalidStat"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"FunctionName": "my-function"
},
"metricEditorMode": 0,
"metricName": "Duration",
"metricQueryType": 0,
"namespace": "AWS/Lambda",
"refId": "B",
"region": "us-west-2",
"statistic": "Average"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"FunctionName": "my-function"
},
"metricEditorMode": 0,
"metricName": "Duration",
"metricQueryType": 0,
"namespace": "AWS/Lambda",
"refId": "C",
"region": "us-west-2"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"FunctionName": "my-function"
},
"metricEditorMode": 0,
"metricName": "Duration",
"metricQueryType": 0,
"namespace": "AWS/Lambda",
"refId": "D",
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"FunctionName": "my-function"
},
"metricEditorMode": 0,
"metricName": "Duration",
"metricQueryType": 0,
"namespace": "AWS/Lambda",
"refId": "E",
"region": "us-west-2",
"statistic": ""
}
],
"title": "CloudWatch Query Invalid Statistics",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 7,
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"StreamName": "my-stream"
},
"metricEditorMode": 0,
"metricName": "IncomingRecords",
"metricQueryType": 0,
"namespace": "AWS/Kinesis",
"refId": "A",
"region": "us-east-1",
"statistic": "Sum"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"StreamName": "my-stream"
},
"metricEditorMode": 0,
"metricName": "IncomingRecords",
"metricQueryType": 0,
"namespace": "AWS/Kinesis",
"refId": "B",
"region": "us-east-1",
"statistic": "Average"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"StreamName": "my-stream"
},
"metricEditorMode": 0,
"metricName": "IncomingRecords",
"metricQueryType": 0,
"namespace": "AWS/Kinesis",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
}
],
"title": "Nested CloudWatch Query Multiple Statistics",
"type": "timeseries"
}
],
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 9,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"ClusterName": "my-cluster"
},
"metricEditorMode": 1,
"metricName": "CPUUtilization",
"metricQueryType": 1,
"namespace": "AWS/ECS",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"ClusterName": "my-cluster"
},
"metricEditorMode": 1,
"metricName": "CPUUtilization",
"metricQueryType": 1,
"namespace": "AWS/ECS",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
}
],
"title": "CloudWatch Query with Existing Editor Mode",
"type": "timeseries"
},
{
"datasource": {
"uid": "prometheus"
},
"id": 10,
"targets": [
{
"datasource": {
"uid": "prometheus"
},
"expr": "cpu_usage",
"refId": "A"
}
],
"title": "Non-CloudWatch Panel",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "CloudWatch Multiple Statistics Test Dashboard"
}
@@ -0,0 +1,260 @@
{
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Hidden Axis",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Series A"
},
"properties": [
{
"id": "color.mode",
"value": "palette-classic"
}
]
},
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Hidden Axis and Existing Overrides",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto"
}
},
"overrides": []
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Auto Axis (No Change Expected)",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Stat Panel with Hidden Axis (No Change Expected)",
"type": "stat"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 5,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Missing FieldConfig",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"overrides": []
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Missing Defaults",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"unit": "bytes"
},
"overrides": []
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Missing Custom Config",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Timeseries with Missing Overrides Array",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "X-Axis Visibility Test Dashboard"
}
@@ -0,0 +1,370 @@
{
"annotations": {
"list": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "Default Annotation - Tests default datasource migration"
},
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"name": "Named Datasource Annotation - Tests migration by datasource name"
},
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"name": "UID Datasource Annotation - Tests migration by datasource UID"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "Null Datasource Annotation - Tests null datasource fallback to default"
},
{
"datasource": {
"uid": "unknown-datasource-name"
},
"name": "Unknown Datasource Annotation - Tests unknown datasource preserved as UID"
}
]
},
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests null panel datasource migration with targets - should fallback to default",
"id": 1,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel with Null Datasource and Targets"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests null panel datasource with empty targets array - should create default target",
"id": 2,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel with Null Datasource and Empty Targets"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests null panel datasource with missing targets - should create default target array",
"id": 3,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel with No Targets Array"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"description": "Tests mixed datasource panel - targets should migrate independently",
"id": 4,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"uid": "existing-target-uid"
},
"refId": "B"
}
],
"title": "Panel with Mixed Datasources"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"description": "Tests panel with already migrated datasource object - should preserve existing refs",
"id": 5,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "Panel with Existing Object Datasource"
},
{
"datasource": {
"uid": "unknown-panel-datasource"
},
"description": "Tests panel with unknown datasource - should preserve as UID-only reference",
"id": 6,
"targets": [
{
"datasource": {
"uid": "unknown-target-datasource"
},
"refId": "A"
}
],
"title": "Panel with Unknown Datasource Name"
},
{
"datasource": {
"uid": "existing-target-uid"
},
"description": "Tests panel with expression query - should not inherit expression as panel datasource",
"id": 7,
"targets": [
{
"datasource": {
"uid": "existing-target-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "__expr__",
"uid": "__expr__"
},
"refId": "B"
}
],
"title": "Panel with Expression Query"
},
{
"datasource": {
"uid": "existing-target-uid"
},
"description": "Tests panel inheriting datasource from target when panel datasource was default",
"id": 8,
"targets": [
{
"datasource": {
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "Panel Inheriting from Target"
},
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"description": "Tests panel with datasource referenced by name - should migrate to full object",
"id": 9,
"targets": [
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "Panel with Named Datasource"
},
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"description": "Tests panel with datasource referenced by UID - should migrate to full object",
"id": 10,
"targets": [
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "Panel with UID Datasource"
},
{
"collapsed": false,
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests row panel - it gets datasource or targets fields added even it is not needed, but this is how it works in frontend",
"id": 11,
"panels": [],
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Simple Row Panel",
"type": "row"
},
{
"collapsed": true,
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"description": "Tests collapsed row with nested panels - nested panels should migrate",
"id": 12,
"panels": [
{
"datasource": {
"uid": "existing-target-uid"
},
"description": "Nested panel in collapsed row with default datasource",
"id": 13,
"targets": [
{
"datasource": {
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "Nested Panel with Default Datasource"
},
{
"datasource": {
"uid": "unknown-nested-datasource"
},
"description": "Nested panel in collapsed row with unknown datasource",
"id": 14,
"targets": [
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "Nested Panel with Unknown Datasource"
}
],
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Collapsed Row with Nested Panels",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"templating": {
"list": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "query_var_null",
"type": "query"
},
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"name": "query_var_named",
"type": "query"
},
{
"datasource": {
"apiVersion": "v2",
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"name": "query_var_uid",
"type": "query"
},
{
"datasource": {
"uid": "unknown-datasource"
},
"name": "query_var_unknown",
"type": "query"
},
{
"datasource": null,
"name": "non_query_var",
"type": "constant"
}
]
},
"title": "Datasource Reference Migration Test Dashboard"
}
@@ -0,0 +1,130 @@
{
"panels": [
{
"id": 1,
"options": {
"legend": true
},
"title": "Panel with Boolean Legend True",
"type": "timeseries"
},
{
"id": 2,
"options": {
"legend": false
},
"title": "Panel with Boolean Legend False",
"type": "timeseries"
},
{
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Panel with Hidden DisplayMode",
"type": "graph"
},
{
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Panel with ShowLegend False",
"type": "stat"
},
{
"id": 5,
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"showLegend": true
}
},
"title": "Panel with Table Legend",
"type": "barchart"
},
{
"id": 6,
"options": {
"legend": {
"displayMode": "list",
"placement": "right",
"showLegend": true
}
},
"title": "Panel with List Legend",
"type": "histogram"
},
{
"id": 7,
"title": "Panel with No Options",
"type": "text"
},
{
"id": 8,
"options": {
"reduceOptions": {
"fields": "/.*temperature.*/"
}
},
"title": "Panel with No Legend Config",
"type": "gauge"
},
{
"id": 9,
"options": {
"legend": null
},
"title": "Panel with Null Legend",
"type": "piechart"
},
{
"collapsed": false,
"id": 10,
"panels": [
{
"id": 11,
"options": {
"legend": true
},
"title": "Nested Panel with Boolean Legend",
"type": "timeseries"
},
{
"id": 12,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Nested Panel with Hidden DisplayMode",
"type": "graph"
},
{
"id": 13,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Nested Panel with Conflicting Properties",
"type": "stat"
}
],
"title": "Row with Nested Panels Having Various Legend Configs",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V37 Legend Normalization Test Dashboard"
}
@@ -0,0 +1,223 @@
{
"panels": [
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 1,
"title": "Table with Basic Gauge",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 2,
"title": "Table with Gradient Gauge",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 3,
"title": "Table with LCD Gauge",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
}
},
"overrides": []
},
"id": 4,
"title": "Table with Color Background",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
}
},
"overrides": []
},
"id": 5,
"title": "Table with Color Background Solid",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
}
},
"overrides": []
},
"id": 6,
"title": "Table with Unknown Mode",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
},
"id": 7,
"title": "Table with No Display Mode",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "gauge"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "color-background"
}
}
]
}
]
},
"id": 8,
"title": "Table with Overrides",
"type": "table"
},
{
"id": 9,
"title": "Non-table Panel (Should Remain Unchanged)",
"type": "graph"
},
{
"collapsed": false,
"id": 10,
"panels": [
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 11,
"title": "Nested Table with Basic Mode",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "lcd",
"type": "gauge"
}
}
]
}
]
},
"id": 12,
"title": "Nested Table with Gradient Gauge",
"type": "table"
}
],
"title": "Row with Nested Table Panels",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V38 Table Migration Comprehensive Test Dashboard"
}
@@ -0,0 +1,223 @@
{
"panels": [
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 1,
"title": "Table with Basic Gauge",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 2,
"title": "Table with Gradient Gauge",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 3,
"title": "Table with LCD Gauge",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
}
},
"overrides": []
},
"id": 4,
"title": "Table with Color Background",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
}
},
"overrides": []
},
"id": 5,
"title": "Table with Color Background Solid",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
}
},
"overrides": []
},
"id": 6,
"title": "Table with Unknown Mode",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
},
"id": 7,
"title": "Table with No Display Mode",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "gauge"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "color-background"
}
}
]
}
]
},
"id": 8,
"title": "Table with Overrides",
"type": "table"
},
{
"id": 9,
"title": "Non-table Panel (Should Remain Unchanged)",
"type": "graph"
},
{
"collapsed": false,
"id": 10,
"panels": [
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
}
},
"overrides": []
},
"id": 11,
"title": "Nested Table with Basic Mode",
"type": "table"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "lcd",
"type": "gauge"
}
}
]
}
]
},
"id": 12,
"title": "Nested Table with Gradient Gauge",
"type": "table"
}
],
"title": "Row with Nested Table Panels",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V38 Table Migration Test Dashboard"
}
@@ -0,0 +1,159 @@
{
"panels": [
{
"id": 1,
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "mean"
}
}
}
],
"type": "table"
},
{
"id": 2,
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "mean"
},
"B": {
"stat": "max"
},
"C": {
"stat": "min"
},
"D": {
"stat": "sum"
}
}
}
],
"type": "table"
},
{
"id": 3,
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"transformations": [
{
"id": "reduce",
"options": {
"reducers": [
"mean"
]
}
},
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "last"
},
"B": {
"stat": "first"
}
}
},
{
"id": "organize",
"options": {
"excludeByName": {}
}
}
],
"type": "graph"
},
{
"id": 4,
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"transformations": [
{
"id": "reduce",
"options": {
"reducers": [
"mean",
"max"
]
}
}
],
"type": "stat"
},
{
"id": 5,
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"transformations": [
{
"id": "timeSeriesTable",
"options": {}
}
],
"type": "table"
},
{
"id": 6,
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"transformations": [
{
"id": "timeSeriesTable"
}
],
"type": "table"
},
{
"id": 7,
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"someOtherOption": "value"
}
}
],
"type": "table"
},
{
"id": 8,
"title": "Panel with No Transformations (Should Remain Unchanged)",
"type": "graph"
},
{
"collapsed": false,
"id": 9,
"panels": [
{
"id": 10,
"title": "Nested Panel with TimeSeriesTable",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"NestedA": {
"stat": "median"
},
"NestedB": {
"stat": "stdDev"
}
}
}
],
"type": "table"
}
],
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard"
}
@@ -0,0 +1,10 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"time": {
"from": "now-6h",
"to": "now"
},
"title": "Empty String Refresh Test Dashboard"
}
@@ -0,0 +1,10 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"time": {
"from": "now-6h",
"to": "now"
},
"title": "Boolean False Refresh Test Dashboard"
}
@@ -0,0 +1,10 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"time": {
"from": "now-6h",
"to": "now"
},
"title": "Refresh Not Set Test Dashboard"
}

Some files were not shown because too many files have changed in this diff Show More