Dashboard Migrations: V33 Replace string-based datasource by datasource ref (#106848)
--------- Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
co-authored by
Stephanie Hingtgen
parent
37be24899c
commit
07f5a72842
@@ -0,0 +1,110 @@
|
||||
package schemaversion
|
||||
|
||||
// Shared utility functions for datasource migrations across different schema versions.
|
||||
// These functions handle the common logic for migrating datasource references from
|
||||
// string names/UIDs to structured reference objects with uid, type, and apiVersion.
|
||||
|
||||
// GetDataSourceRef creates a datasource reference object with uid, type and optional apiVersion
|
||||
func GetDataSourceRef(ds *DataSourceInfo) map[string]interface{} {
|
||||
if ds == nil {
|
||||
return nil
|
||||
}
|
||||
ref := map[string]interface{}{
|
||||
"uid": ds.UID,
|
||||
"type": ds.Type,
|
||||
}
|
||||
if ds.APIVersion != "" {
|
||||
ref["apiVersion"] = ds.APIVersion
|
||||
}
|
||||
return ref
|
||||
}
|
||||
|
||||
// GetDefaultDSInstanceSettings returns the default datasource if one exists
|
||||
func GetDefaultDSInstanceSettings(datasources []DataSourceInfo) *DataSourceInfo {
|
||||
for _, ds := range datasources {
|
||||
if ds.Default {
|
||||
return &DataSourceInfo{
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetInstanceSettings looks up a datasource by name or uid reference
|
||||
func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *DataSourceInfo {
|
||||
if nameOrRef == nil || nameOrRef == "default" {
|
||||
return GetDefaultDSInstanceSettings(datasources)
|
||||
}
|
||||
|
||||
// Check if it's a reference object without UID - should return default
|
||||
if ref, ok := nameOrRef.(map[string]interface{}); ok {
|
||||
if _, hasUID := ref["uid"]; !hasUID {
|
||||
return GetDefaultDSInstanceSettings(datasources)
|
||||
}
|
||||
// It's a reference object with UID, search for matching UID
|
||||
for _, ds := range datasources {
|
||||
if uid, hasUID := ref["uid"]; hasUID && uid == ds.UID {
|
||||
return &DataSourceInfo{
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
}
|
||||
}
|
||||
return GetDefaultDSInstanceSettings(datasources)
|
||||
}
|
||||
|
||||
// Check if it's a string
|
||||
str, ok := nameOrRef.(string)
|
||||
if !ok {
|
||||
return GetDefaultDSInstanceSettings(datasources)
|
||||
}
|
||||
|
||||
// Search for matching name or UID
|
||||
for _, ds := range datasources {
|
||||
if str == ds.Name || str == ds.UID {
|
||||
return &DataSourceInfo{
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
}
|
||||
}
|
||||
return GetDefaultDSInstanceSettings(datasources)
|
||||
}
|
||||
|
||||
// MigrateDatasourceNameToRef converts a datasource name/uid string to a reference object
|
||||
// Matches the frontend migrateDatasourceNameToRef function in DashboardMigrator.ts
|
||||
// Options:
|
||||
// - returnDefaultAsNull: if true, returns nil for "default" datasources (used in V33)
|
||||
// - returnDefaultAsNull: if false, returns reference for "default" datasources (used in V36)
|
||||
func MigrateDatasourceNameToRef(nameOrRef interface{}, options map[string]bool, datasources []DataSourceInfo) map[string]interface{} {
|
||||
if options["returnDefaultAsNull"] && (nameOrRef == nil || nameOrRef == "default") {
|
||||
return nil
|
||||
}
|
||||
|
||||
if dsRef, ok := nameOrRef.(map[string]interface{}); ok {
|
||||
if _, hasUID := dsRef["uid"]; hasUID {
|
||||
return dsRef
|
||||
}
|
||||
}
|
||||
|
||||
ds := GetInstanceSettings(nameOrRef, datasources)
|
||||
if ds != nil {
|
||||
return GetDataSourceRef(ds)
|
||||
}
|
||||
|
||||
if dsName, ok := nameOrRef.(string); ok && dsName != "" {
|
||||
return map[string]interface{}{
|
||||
"uid": dsName,
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,442 @@
|
||||
package schemaversion_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetDataSourceRef(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
input *schemaversion.DataSourceInfo
|
||||
expected map[string]interface{}
|
||||
}{
|
||||
{
|
||||
name: "nil datasource should return nil",
|
||||
input: nil,
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
name: "datasource without apiVersion",
|
||||
input: &schemaversion.DataSourceInfo{
|
||||
UID: "test-uid",
|
||||
Type: "prometheus",
|
||||
Name: "Test DS",
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"uid": "test-uid",
|
||||
"type": "prometheus",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "datasource with apiVersion",
|
||||
input: &schemaversion.DataSourceInfo{
|
||||
UID: "test-uid",
|
||||
Type: "elasticsearch",
|
||||
Name: "Test ES",
|
||||
APIVersion: "v2",
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"uid": "test-uid",
|
||||
"type": "elasticsearch",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "datasource with empty apiVersion",
|
||||
input: &schemaversion.DataSourceInfo{
|
||||
UID: "test-uid",
|
||||
Type: "prometheus",
|
||||
Name: "Test",
|
||||
APIVersion: "",
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"uid": "test-uid",
|
||||
"type": "prometheus",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := schemaversion.GetDataSourceRef(tt.input)
|
||||
assert.Equal(t, tt.expected, result)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetDefaultDSInstanceSettings(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
datasources []schemaversion.DataSourceInfo
|
||||
expected *schemaversion.DataSourceInfo
|
||||
}{
|
||||
{
|
||||
name: "empty datasources list",
|
||||
datasources: []schemaversion.DataSourceInfo{},
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
name: "no default datasource",
|
||||
datasources: []schemaversion.DataSourceInfo{
|
||||
{UID: "ds1", Type: "prometheus", Name: "DS1", Default: false},
|
||||
{UID: "ds2", Type: "elasticsearch", Name: "DS2", 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},
|
||||
},
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
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"},
|
||||
},
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "ds1",
|
||||
Type: "prometheus",
|
||||
Name: "Default1",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := schemaversion.GetDefaultDSInstanceSettings(tt.datasources)
|
||||
assert.Equal(t, tt.expected, result)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
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},
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
nameOrRef interface{}
|
||||
expected *schemaversion.DataSourceInfo
|
||||
}{
|
||||
{
|
||||
name: "nil should return default",
|
||||
nameOrRef: nil,
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "default string should return default",
|
||||
nameOrRef: "default",
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by UID",
|
||||
nameOrRef: "other-ds",
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "other-ds",
|
||||
Type: "elasticsearch",
|
||||
Name: "Elasticsearch",
|
||||
APIVersion: "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by name",
|
||||
nameOrRef: "Elasticsearch",
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "other-ds",
|
||||
Type: "elasticsearch",
|
||||
Name: "Elasticsearch",
|
||||
APIVersion: "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by UID without apiVersion",
|
||||
nameOrRef: "test-uid",
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "test-uid",
|
||||
Type: "influxdb",
|
||||
Name: "InfluxDB",
|
||||
APIVersion: "",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by reference object with UID",
|
||||
nameOrRef: map[string]interface{}{
|
||||
"uid": "other-ds",
|
||||
},
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "other-ds",
|
||||
Type: "elasticsearch",
|
||||
Name: "Elasticsearch",
|
||||
APIVersion: "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by reference object without UID",
|
||||
nameOrRef: map[string]interface{}{
|
||||
"type": "prometheus",
|
||||
},
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "unknown datasource should return default",
|
||||
nameOrRef: "unknown-ds",
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "empty string should return default",
|
||||
nameOrRef: "",
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "unsupported input type should return default",
|
||||
nameOrRef: 123,
|
||||
expected: &schemaversion.DataSourceInfo{
|
||||
UID: "default-ds",
|
||||
Type: "prometheus",
|
||||
Name: "Default",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := schemaversion.GetInstanceSettings(tt.nameOrRef, datasources)
|
||||
assert.Equal(t, tt.expected, result)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
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},
|
||||
}
|
||||
|
||||
t.Run("returnDefaultAsNull: true", func(t *testing.T) {
|
||||
options := map[string]bool{"returnDefaultAsNull": true}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
nameOrRef interface{}
|
||||
expected map[string]interface{}
|
||||
}{
|
||||
{
|
||||
name: "nil should return nil",
|
||||
nameOrRef: nil,
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
name: "default should return nil",
|
||||
nameOrRef: "default",
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
name: "existing reference should be preserved",
|
||||
nameOrRef: map[string]interface{}{
|
||||
"uid": "existing-uid",
|
||||
"type": "existing-type",
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"uid": "existing-uid",
|
||||
"type": "existing-type",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by UID",
|
||||
nameOrRef: "other-ds",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "other-ds",
|
||||
"type": "elasticsearch",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by name",
|
||||
nameOrRef: "Elasticsearch",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "other-ds",
|
||||
"type": "elasticsearch",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "unknown datasource should return default reference",
|
||||
nameOrRef: "unknown-ds",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "empty string should return default reference",
|
||||
nameOrRef: "",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := schemaversion.MigrateDatasourceNameToRef(tt.nameOrRef, options, datasources)
|
||||
assert.Equal(t, tt.expected, result)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("returnDefaultAsNull: false", func(t *testing.T) {
|
||||
options := map[string]bool{"returnDefaultAsNull": false}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
nameOrRef interface{}
|
||||
expected map[string]interface{}
|
||||
}{
|
||||
{
|
||||
name: "nil should return default reference",
|
||||
nameOrRef: nil,
|
||||
expected: map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "default should return default reference",
|
||||
nameOrRef: "default",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "existing reference should be preserved",
|
||||
nameOrRef: map[string]interface{}{
|
||||
"uid": "existing-uid",
|
||||
"type": "existing-type",
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"uid": "existing-uid",
|
||||
"type": "existing-type",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "lookup by UID",
|
||||
nameOrRef: "other-ds",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "other-ds",
|
||||
"type": "elasticsearch",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "unknown datasource should return default reference",
|
||||
nameOrRef: "unknown-ds",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "empty string should return default reference",
|
||||
nameOrRef: "",
|
||||
expected: map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := schemaversion.MigrateDatasourceNameToRef(tt.nameOrRef, options, datasources)
|
||||
assert.Equal(t, tt.expected, result)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("edge cases", func(t *testing.T) {
|
||||
options := map[string]bool{"returnDefaultAsNull": false}
|
||||
|
||||
t.Run("reference without uid should lookup default", func(t *testing.T) {
|
||||
nameOrRef := map[string]interface{}{
|
||||
"type": "prometheus",
|
||||
}
|
||||
result := schemaversion.MigrateDatasourceNameToRef(nameOrRef, options, datasources)
|
||||
expected := map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
}
|
||||
assert.Equal(t, expected, result)
|
||||
})
|
||||
|
||||
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",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
}
|
||||
assert.Equal(t, expected, result)
|
||||
})
|
||||
|
||||
t.Run("empty datasources list", func(t *testing.T) {
|
||||
result := schemaversion.MigrateDatasourceNameToRef("any-ds", options, []schemaversion.DataSourceInfo{})
|
||||
expected := map[string]interface{}{
|
||||
"uid": "any-ds",
|
||||
}
|
||||
assert.Equal(t, expected, result)
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
MIN_VERSION = 33
|
||||
MIN_VERSION = 32
|
||||
LATEST_VERSION = 41
|
||||
)
|
||||
|
||||
@@ -26,6 +26,7 @@ type DataSourceInfoProvider interface {
|
||||
|
||||
func GetMigrations(dsInfoProvider DataSourceInfoProvider) map[int]SchemaVersionMigrationFunc {
|
||||
return map[int]SchemaVersionMigrationFunc{
|
||||
33: V33(dsInfoProvider),
|
||||
34: V34,
|
||||
35: V35,
|
||||
36: V36(dsInfoProvider),
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
package schemaversion
|
||||
|
||||
// V33 migrates panel datasource references from string names to UIDs.
|
||||
//
|
||||
// This migration addresses datasource references in dashboard panels and their targets
|
||||
// that use the legacy string format. The migration converts these references to the new
|
||||
// structured format with uid, type, and apiVersion fields.
|
||||
//
|
||||
// The migration works by:
|
||||
// 1. Identifying datasource references in panel-level datasource fields
|
||||
// 2. Converting string datasource references to structured reference objects
|
||||
// 3. Migrating target-level datasource references within each panel
|
||||
// 4. Handling nested panels in collapsed rows
|
||||
// 5. Always setting panel datasource (even if migration returns nil)
|
||||
// 6. Only setting target datasource if migration returns non-nil (preserves originals when nil)
|
||||
// 7. Using returnDefaultAsNull: true (so "default" and nil become nil for panels, preserved for targets)
|
||||
//
|
||||
// Panel Datasource Example - String to Object:
|
||||
//
|
||||
// Before migration:
|
||||
//
|
||||
// panel: {
|
||||
// "datasource": "prometheus-uid",
|
||||
// "targets": [
|
||||
// { "refId": "A", "datasource": "elasticsearch-name" },
|
||||
// { "refId": "B", "datasource": null }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// After migration:
|
||||
//
|
||||
// panel: {
|
||||
// "datasource": { "uid": "prometheus-uid", "type": "prometheus", "apiVersion": "v1" },
|
||||
// "targets": [
|
||||
// { "refId": "A", "datasource": { "uid": "elasticsearch-uid", "type": "elasticsearch", "apiVersion": "v2" } },
|
||||
// { "refId": "B", "datasource": null }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// Default Datasource Example - Null Conversion:
|
||||
//
|
||||
// Before migration:
|
||||
//
|
||||
// panel: {
|
||||
// "datasource": "default",
|
||||
// "targets": [
|
||||
// { "refId": "A", "datasource": "default" }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// After migration:
|
||||
//
|
||||
// panel: {
|
||||
// "datasource": null,
|
||||
// "targets": [
|
||||
// { "refId": "A", "datasource": "default" }
|
||||
// ]
|
||||
// }
|
||||
func V33(dsInfo DataSourceInfoProvider) SchemaVersionMigrationFunc {
|
||||
datasources := dsInfo.GetDataSourceInfo()
|
||||
return func(dashboard map[string]interface{}) error {
|
||||
if dashboard == nil {
|
||||
dashboard = map[string]interface{}{}
|
||||
}
|
||||
dashboard["schemaVersion"] = int(33)
|
||||
|
||||
migratePanelsV33(dashboard, datasources)
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// migratePanelsV33 updates datasource references in dashboard panels for V33 migration
|
||||
func migratePanelsV33(dashboard map[string]interface{}, datasources []DataSourceInfo) {
|
||||
if dashboard == nil {
|
||||
return
|
||||
}
|
||||
panels, ok := dashboard["panels"].([]interface{})
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
for _, panel := range panels {
|
||||
panelMap, ok := panel.(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
migratePanelDatasourcesV33(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
|
||||
}
|
||||
migratePanelDatasourcesV33(np, datasources)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// migratePanelDatasourcesV33 updates datasource references in a single panel and its targets for V33 migration
|
||||
func migratePanelDatasourcesV33(panelMap map[string]interface{}, datasources []DataSourceInfo) {
|
||||
// Handle panel datasource - always set result (even if nil)
|
||||
if result := MigrateDatasourceNameToRef(panelMap["datasource"], map[string]bool{"returnDefaultAsNull": true}, datasources); result != nil {
|
||||
panelMap["datasource"] = result
|
||||
} else {
|
||||
panelMap["datasource"] = nil
|
||||
}
|
||||
|
||||
// Handle target datasources
|
||||
targets, hasTargets := panelMap["targets"].([]interface{})
|
||||
if !hasTargets {
|
||||
return
|
||||
}
|
||||
|
||||
for _, target := range targets {
|
||||
targetMap, ok := target.(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
ds, exists := targetMap["datasource"]
|
||||
if !exists {
|
||||
continue
|
||||
}
|
||||
|
||||
// Only set target datasource if migration result is not nil
|
||||
if targetRef := MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources); targetRef != nil {
|
||||
targetMap["datasource"] = targetRef
|
||||
}
|
||||
// If targetRef is nil, leave target.datasource unchanged (preserves "default" strings, etc.)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,428 @@
|
||||
package schemaversion_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration/testutil"
|
||||
)
|
||||
|
||||
func TestV33(t *testing.T) {
|
||||
// Pass the mock provider to V33
|
||||
migration := schemaversion.V33(testutil.GetTestProvider())
|
||||
|
||||
tests := []migrationTestCase{
|
||||
{
|
||||
name: "dashboard with no panels",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with default datasource should return null",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with null datasource should return null",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with existing datasource reference should be preserved",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "existing-uid",
|
||||
"type": "existing-type",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "target-uid",
|
||||
"type": "target-type",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "existing-uid",
|
||||
"type": "existing-type",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "target-uid",
|
||||
"type": "target-type",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with datasource by name should be migrated",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "Elasticsearch",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "Elasticsearch",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with datasource by UID should be migrated",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "other-ds",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "other-ds",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with unknown datasource should return default reference",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "unknown-datasource",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "unknown-datasource",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel with mixed datasources",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "Elasticsearch",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": "other-ds",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": "unknown-ds",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "panel without targets should not fail",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "Elasticsearch",
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "nested panels in collapsed rows should be migrated",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"type": "row",
|
||||
"collapsed": true,
|
||||
"datasource": "Elasticsearch",
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "other-ds",
|
||||
},
|
||||
},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": "unknown-ds",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "Elasticsearch",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"type": "row",
|
||||
"collapsed": true,
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"uid": "default-ds",
|
||||
"type": "prometheus",
|
||||
"apiVersion": "v1",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "targets with lowercase default keyword should not be updated",
|
||||
input: map[string]interface{}{
|
||||
"schemaVersion": 32,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "Elasticsearch",
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"schemaVersion": 33,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": map[string]interface{}{
|
||||
"type": "elasticsearch",
|
||||
"uid": "other-ds",
|
||||
"apiVersion": "v2",
|
||||
},
|
||||
"targets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"datasource": "default",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"datasource": nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
runMigrationTests(t, tests, migration)
|
||||
}
|
||||
@@ -3,7 +3,6 @@ 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).
|
||||
// This matches the frontend migration in DashboardMigrator.ts.
|
||||
func V36(dsInfo DataSourceInfoProvider) SchemaVersionMigrationFunc {
|
||||
datasources := dsInfo.GetDataSourceInfo()
|
||||
return func(dashboard map[string]interface{}) error {
|
||||
@@ -17,114 +16,30 @@ func V36(dsInfo DataSourceInfoProvider) SchemaVersionMigrationFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// getDataSourceRef creates a datasource reference object with uid, type and optional apiVersion
|
||||
func getDataSourceRef(ds *DataSourceInfo) map[string]interface{} {
|
||||
if ds == nil {
|
||||
return nil
|
||||
}
|
||||
ref := map[string]interface{}{
|
||||
"uid": ds.UID,
|
||||
"type": ds.Type,
|
||||
}
|
||||
if ds.APIVersion != "" {
|
||||
ref["apiVersion"] = ds.APIVersion
|
||||
}
|
||||
return ref
|
||||
}
|
||||
|
||||
// getDefaultDSInstanceSettings returns the default datasource if one exists
|
||||
func getDefaultDSInstanceSettings(datasources []DataSourceInfo) *DataSourceInfo {
|
||||
for _, ds := range datasources {
|
||||
if ds.Default {
|
||||
return &DataSourceInfo{
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// getInstanceSettings looks up a datasource by name or uid reference
|
||||
func getInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *DataSourceInfo {
|
||||
if nameOrRef == nil || nameOrRef == "default" {
|
||||
return getDefaultDSInstanceSettings(datasources)
|
||||
}
|
||||
|
||||
for _, ds := range datasources {
|
||||
if str, ok := nameOrRef.(string); ok {
|
||||
if str == ds.Name || str == ds.UID {
|
||||
return &DataSourceInfo{
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
}
|
||||
}
|
||||
if ref, ok := nameOrRef.(map[string]interface{}); ok {
|
||||
if uid, hasUID := ref["uid"]; hasUID {
|
||||
if uid == ds.UID {
|
||||
return &DataSourceInfo{
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
APIVersion: ds.APIVersion,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// migrateDatasourceNameToRef converts a datasource name/uid string to a reference object
|
||||
// Matches the frontend migrateDatasourceNameToRef function in DashboardMigrator.ts
|
||||
func migrateDatasourceNameToRef(nameOrRef interface{}, options map[string]bool, datasources []DataSourceInfo) map[string]interface{} {
|
||||
if options["returnDefaultAsNull"] && (nameOrRef == nil || nameOrRef == "default") {
|
||||
return nil
|
||||
}
|
||||
|
||||
if dsRef, ok := nameOrRef.(map[string]interface{}); ok {
|
||||
if _, hasUID := dsRef["uid"]; hasUID {
|
||||
return dsRef
|
||||
}
|
||||
}
|
||||
|
||||
ds := getInstanceSettings(nameOrRef, datasources)
|
||||
if ds != nil {
|
||||
return getDataSourceRef(ds)
|
||||
}
|
||||
|
||||
if dsName, ok := nameOrRef.(string); ok && dsName != "" {
|
||||
return map[string]interface{}{
|
||||
"uid": dsName,
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// migrateAnnotations updates datasource references in dashboard annotations
|
||||
func migrateAnnotations(dashboard map[string]interface{}, datasources []DataSourceInfo) {
|
||||
annotations, ok := dashboard["annotations"].(map[string]interface{})
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
list, ok := annotations["list"].([]interface{})
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
for _, query := range list {
|
||||
queryMap, ok := query.(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if ds, exists := queryMap["datasource"]; exists {
|
||||
queryMap["datasource"] = migrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
|
||||
|
||||
ds, exists := queryMap["datasource"]
|
||||
if !exists {
|
||||
continue
|
||||
}
|
||||
|
||||
queryMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,87 +49,119 @@ func migrateTemplateVariables(dashboard map[string]interface{}, datasources []Da
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
list, ok := templating["list"].([]interface{})
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
for _, variable := range list {
|
||||
varMap, ok := variable.(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if varType, ok := varMap["type"].(string); ok && varType == "query" {
|
||||
if ds, exists := varMap["datasource"]; exists {
|
||||
varMap["datasource"] = migrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
|
||||
}
|
||||
|
||||
varType, ok := varMap["type"].(string)
|
||||
if !ok || varType != "query" {
|
||||
continue
|
||||
}
|
||||
|
||||
ds, exists := varMap["datasource"]
|
||||
if !exists {
|
||||
continue
|
||||
}
|
||||
|
||||
varMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
|
||||
}
|
||||
}
|
||||
|
||||
// migratePanels updates datasource references in dashboard panels
|
||||
func migratePanels(dashboard map[string]interface{}, datasources []DataSourceInfo) {
|
||||
if panels, ok := dashboard["panels"].([]interface{}); ok {
|
||||
for _, panel := range panels {
|
||||
if panelMap, ok := panel.(map[string]interface{}); ok {
|
||||
migratePanelDatasources(panelMap, datasources)
|
||||
}
|
||||
panels, ok := dashboard["panels"].([]interface{})
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
for _, panel := range panels {
|
||||
panelMap, ok := panel.(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
migratePanelDatasources(panelMap, datasources)
|
||||
}
|
||||
}
|
||||
|
||||
// migratePanelDatasources updates datasource references in a single panel and its targets
|
||||
func migratePanelDatasources(panelMap map[string]interface{}, datasources []DataSourceInfo) {
|
||||
if targets, hasTargets := panelMap["targets"].([]interface{}); hasTargets && len(targets) > 0 {
|
||||
panelDataSourceWasDefault := false
|
||||
targets, hasTargets := panelMap["targets"].([]interface{})
|
||||
if !hasTargets || len(targets) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// Handle panel datasource
|
||||
if ds, exists := panelMap["datasource"]; exists {
|
||||
if ds == nil {
|
||||
defaultDS := getDefaultDSInstanceSettings(datasources)
|
||||
panelMap["datasource"] = getDataSourceRef(defaultDS)
|
||||
panelDataSourceWasDefault = true
|
||||
} else {
|
||||
panelMap["datasource"] = migrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources)
|
||||
panelDataSourceWasDefault := false
|
||||
|
||||
// Handle panel datasource
|
||||
if ds, exists := panelMap["datasource"]; exists {
|
||||
if ds == nil {
|
||||
defaultDS := GetDefaultDSInstanceSettings(datasources)
|
||||
panelMap["datasource"] = GetDataSourceRef(defaultDS)
|
||||
panelDataSourceWasDefault = true
|
||||
} else {
|
||||
panelMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources)
|
||||
}
|
||||
}
|
||||
|
||||
// Handle target datasources
|
||||
for _, target := range targets {
|
||||
targetMap, ok := target.(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle target datasources
|
||||
for _, target := range targets {
|
||||
if targetMap, ok := target.(map[string]interface{}); ok {
|
||||
ds, exists := targetMap["datasource"]
|
||||
|
||||
// Check if target datasource is null or has no uid
|
||||
isNullOrNoUID := !exists || ds == nil
|
||||
if !isNullOrNoUID {
|
||||
if dsMap, ok := ds.(map[string]interface{}); ok {
|
||||
if uid, hasUID := dsMap["uid"]; !hasUID || uid == nil {
|
||||
isNullOrNoUID = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if isNullOrNoUID {
|
||||
// If panel doesn't have mixed datasource, use panel's datasource
|
||||
if panelDS, ok := panelMap["datasource"].(map[string]interface{}); ok {
|
||||
if uid, hasUID := panelDS["uid"].(string); hasUID && uid != "-- Mixed --" {
|
||||
targetMap["datasource"] = panelDS
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Migrate existing target datasource
|
||||
targetDS := migrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
|
||||
targetMap["datasource"] = targetDS
|
||||
}
|
||||
|
||||
// Update panel datasource if it was default and target is not an expression
|
||||
if panelDataSourceWasDefault {
|
||||
if targetDS, ok := targetMap["datasource"].(map[string]interface{}); ok {
|
||||
if uid, ok := targetDS["uid"].(string); ok && uid != "__expr__" {
|
||||
panelMap["datasource"] = targetDS
|
||||
}
|
||||
}
|
||||
}
|
||||
if isNullOrNoUID {
|
||||
// If panel doesn't have mixed datasource, use panel's datasource
|
||||
panelDS, ok := panelMap["datasource"].(map[string]interface{})
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
uid, hasUID := panelDS["uid"].(string)
|
||||
if hasUID && uid != "-- Mixed --" {
|
||||
targetMap["datasource"] = panelDS
|
||||
}
|
||||
} else {
|
||||
// Migrate existing target datasource
|
||||
targetDS := MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
|
||||
targetMap["datasource"] = targetDS
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,561 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+660
@@ -0,0 +1,660 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+719
@@ -0,0 +1,719 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+732
@@ -0,0 +1,732 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+831
@@ -0,0 +1,831 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+840
@@ -0,0 +1,840 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+840
@@ -0,0 +1,840 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+840
@@ -0,0 +1,840 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+840
@@ -0,0 +1,840 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+828
@@ -0,0 +1,828 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
+10
-5
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -246,7 +247,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -258,7 +260,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -366,7 +369,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "prometheus"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"expr": "up",
|
||||
"refId": "B"
|
||||
@@ -495,7 +499,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+10
-5
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -255,7 +256,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -267,7 +269,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -375,7 +378,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "prometheus"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"expr": "up",
|
||||
"refId": "B"
|
||||
@@ -504,7 +508,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+10
-5
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -255,7 +256,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -267,7 +269,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -375,7 +378,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "prometheus"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"expr": "up",
|
||||
"refId": "B"
|
||||
@@ -504,7 +508,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+10
-5
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -255,7 +256,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -267,7 +269,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -375,7 +378,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "prometheus"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"expr": "up",
|
||||
"refId": "B"
|
||||
@@ -504,7 +508,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+10
-5
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -255,7 +256,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -267,7 +269,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -375,7 +378,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "prometheus"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"expr": "up",
|
||||
"refId": "B"
|
||||
@@ -504,7 +508,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+10
-5
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -255,7 +256,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -267,7 +269,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -375,7 +378,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "prometheus"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"expr": "up",
|
||||
"refId": "B"
|
||||
@@ -504,7 +508,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+8
-4
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -198,7 +199,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -210,7 +212,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -291,7 +294,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+8
-4
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -300,7 +303,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+8
-4
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -300,7 +303,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+8
-4
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -300,7 +303,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+8
-4
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -300,7 +303,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
+8
-4
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -300,7 +303,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -198,7 +199,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -210,7 +212,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -259,7 +262,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -268,7 +271,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -268,7 +271,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -268,7 +271,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -268,7 +271,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
@@ -207,7 +208,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -219,7 +221,8 @@
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -268,7 +271,8 @@
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "non-existing-ds"
|
||||
"type": "prometheus",
|
||||
"uid": "default-ds-uid"
|
||||
},
|
||||
"name": "non_existing_var",
|
||||
"type": "query"
|
||||
|
||||
Reference in New Issue
Block a user