Compare commits

...

84 Commits

Author SHA1 Message Date
yesoreyeram 97b8e98a2e updated backend 2025-07-16 10:38:26 +01:00
yesoreyeram 6518ae1398 Merge remote-tracking branch 'origin' into sriram/postgres-config-page-tls-regrouping 2025-07-07 16:27:12 +01:00
renovate[bot] 14e98d740b Update dependency swagger-ui-react to v5.26.2 (#107699)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 14:28:17 +00:00
renovate[bot] df2e1d7ef2 Update dependency diff to v8 (#107684)
* Update dependency diff to v8

* remove @types/diff

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-07 14:02:03 +00:00
Matheus Macabu cc069d301e Secrets: Skip allowlist check when decrypting if the list is empty (#107693) 2025-07-07 15:32:39 +02:00
Ivan Ortega Alba 075770070e Future-proofing query and data source model in Dashboard Schema v2 (#104194)
---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
2025-07-07 15:31:25 +02:00
Levente Balogh cfa05a63c5 Plugin Loader: Don't load an app plugin multiple times (#107579)
* fix(plugin_loader): don't import an app plugin twice

* review: extract IIFE to a separate function (async part of plugin loading)

* fix: remove code for testing
2025-07-07 15:05:13 +02:00
Georges Chaudy 7787ff6b2e unistore: add more kvstore tests (#107692)
add more kvstore tests
2025-07-07 15:00:40 +02:00
Gilles De Mey ddbba7b460 Alerting: Add support for "alerting.notifications.routes.conflictingMatchers" (#107687)
add support for "alerting.notifications.routes.conflictingMatchers"
2025-07-07 14:56:31 +02:00
Andres Martinez Gotor 28ef5672c4 Update Advisor docs (#107683)
* Update advisor docs

* Update _index.md

---------

Co-authored-by: Anna Urbiztondo <anna.urbiztondo@grafana.com>
2025-07-07 14:53:09 +02:00
Levente Balogh 77f84e494d Plugin Extensions: Add error boundaries (#107515)
* feat(grafana-data): expose PluginContext

This is aimed to be used in the `PluginErrorBoundary` (which is a class component, and cannot use the hook.)

* feat(PluginErrorBoundary): add an error boundary for plugins

* feat(ExtensionsErrorBoundary): add an error boundary for extensions)

* feat(Extensions/Utils): wrap components with error boundaries

* feat(Plugins): wrap root plugin page with an error boundary

* fix: Fallback component should always be visible for onClick() modals

* review: use object arguments instead of positional ones for `renderWithPluginContext()`

* review: update `wrapWithPluginContext()` to receive args as an object

* refactor(AppChromeExtensionPoint): remove the error boundary

We have an error boundary on the extensions-framework level now

* refactor(ExtensionSidebar): remove the ErrorBoundary from the extensions

This is handled on the extensions-framework level now.

* test(ExtensionSidebar): add tests

* chore: translation extraction

* chore: prettier formatting

* fix(PluginErrorBoundary): remove unnecessary type casting
2025-07-07 14:51:04 +02:00
Andres Torres c2b7acae35 chore(datasources): Adding debug logging to datasource provisioning when resource is not found in SqlStore (#107652) 2025-07-07 12:23:51 +00:00
Yash Suresh Chandra b9fba95849 Dashboard: Fix cache validation to prevent stale cache (#105918)
* compare dashboard updated at while fetching

* test added

* added created field in dashboard dto meta object for k8s api. fixed cache updation check

* code refactor

* code formatting with prettier

* added created at field in DashboardPageProxy.test.tsx
2025-07-07 14:06:01 +02:00
Gareth 5a39f29c74 Prometheus: display a warning when subquery is used (#106199)
* display warning when subquery used

* lint fix

* update tests to work with new return value

* prettier

* use object shorthand

* only warn agains x:x, ignore 2x:x

* update error message

* prettier

* fix tests

* add tests

* prettier

* Update packages/grafana-prometheus/src/components/monaco-query-field/monaco-completion-provider/validation.ts

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* prettier

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2025-07-07 13:04:07 +01:00
Sriram 3b6784cfcf Postgres: Regroup config page for TLS related settings (#107686) 2025-07-07 12:30:19 +01:00
yesoreyeram 8cf48c7180 Postgres: Regroup config page for TLS related settings 2025-07-07 11:40:43 +01:00
Ashley Harrison 6ce2fac2bb Internationalisation: Mark up geomap panel edit options (#107140)
mark up geomap panel edit options
2025-07-07 11:30:11 +01:00
Georges Chaudy 9b7e2aa5f3 unistore: add custom kv grpc (#107464)
add StorageTypeUnifiedKVGrpc
2025-07-07 09:57:08 +00:00
renovate[bot] 3387971cf2 Update dependency swagger-ui-react to v5.26.1 (#107681)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 09:42:38 +00:00
renovate[bot] 344658fd48 Update dependency react-i18next to v15.6.0 (#107680)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 10:18:40 +01:00
renovate[bot] 4698e194d3 Update dependency react-hook-form to v7.60.0 (#107677)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 08:53:49 +00:00
renovate[bot] 6d1d0a2167 Update dependency react-draggable to v4.5.0 (#107647)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 09:30:02 +01:00
xavi 2d8f751e6d Auth: make skipTokenRotationIfRecent feature flag enabled by default (#107676) 2025-07-07 10:24:36 +02:00
Bogdan Matei 524d6055c0 Dashboards: Fix persisting repeated panels resize after edit (#107386) 2025-07-07 10:30:33 +03:00
Hugo Häggmark 68cbd23916 Chore: reduces barrel files (#107512)
* Chore: reduce barrel files

* chore: fixes unit test

* chore: fix broken path
2025-07-07 09:23:27 +02:00
Konrad Lalik 3e6d620d2c Alerting: Remove ruler from alert list view2 (#106778)
* wip

* Add working actions for GMA rules based on Prom-only API

* Remove Ruler-loader related code for Grafana rules

Co-authored-by: Sonia Augilar <sonia.aguilar@grafana.com>

* Remove outdated tests

* add some comments

* remove commented code

* remove showLocation property

* Add missing mocks in tests

* Add showLocation to GrafanaRuleListItem, improve useAbilities, address PR feedback

* Enhance GrafanaGroupLoader tests: Add permission checks and More button functionality

- Introduced user permission grants for alerting actions in tests.
- Added tests for rendering the More button with action menu options.
- Verified that each rule has its own action buttons and handles permissions correctly.
- Ensured the edit button is not rendered when user lacks edit permissions.
- Confirmed the correct menu actions are displayed when the More button is clicked.

* Update translations

---------

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Sonia Augilar <sonia.aguilar@grafana.com>
2025-07-07 09:13:09 +02:00
Gábor Farkas acdb0e151c datasources: remove empty if (#105314) 2025-07-07 08:58:48 +02:00
grafana-pr-automation[bot] 214fdc791d I18n: Download translations from Crowdin (#107659)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-05 00:36:53 +00:00
xavi 5b5d5fe675 Auth: fix role_attribute_path when using ID tokens in Gitlab OAuth (#107634) 2025-07-04 23:58:04 +02:00
Tobias Skarhed ab676ce035 Loki: Add scope filters to queries on the frontend (#104638)
* Add scopes to queries in DataSourceWithBackend

* Remove Prometheus-specific solution

* Readd prometheus support

* move scopes reordering ti loki ds

* Add tests and logQLScope feature flag

* Move featureToggles to before/after each

* Remove irrelevant file change
2025-07-04 18:35:52 +02:00
Paulo Dias 5edbdb7c4f Loki: Fix label browser not sorted after selection of a label (#107394)
* Explore(Loki): fix label browser not sorted after selection of a label

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

* fix: use collator instead of localCompares

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

---------

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2025-07-04 18:15:29 +02:00
renovate[bot] fe3d06928f Update dependency msw to v2.10.3 (#107643)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 16:08:03 +00:00
Isabel Matwawana 9112d86c04 Doc: Remove dynamic dashboards section (#107642) 2025-07-04 16:05:30 +00:00
renovate[bot] 835691b46f Update dependency marked-mangle to v1.1.11 (#107640)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 15:29:11 +00:00
Matheus Macabu 59542bb95a Extensions: Undo removal of required enterprise dependencies (#107641) 2025-07-04 15:26:47 +00:00
Jean-Philippe Quéméner 3abe84121f feat(config): add config ensure_default_org_and_user (#107619) 2025-07-04 17:19:53 +02:00
renovate[bot] cc2eac7f84 Update typescript-eslint monorepo to v8.35.1 (#107633)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 14:48:26 +00:00
Josh Hunt 443ea5924c Eslint: Allow 'unset' in no-border-radius-literal lint rule (#106619)
* allow border radius of 0

* Prefer unset or initial over 0

* readme

* add an autofix for 0 -> unset

* replace 0 with unset

* fix fixes tests

* fix snapshot

* Fix lint in SecretFormField

* fix unused cx
2025-07-04 15:43:48 +01:00
renovate[bot] efbcf9d8f7 Update dependency @prometheus-io/lezer-promql to v0.304.2 (#107631)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 14:30:53 +00:00
Yunwen Zheng 107c7fd8df fix empty folder form on root folder level (#107630) 2025-07-04 14:13:15 +00:00
Ashley Harrison 1e3f7bfd67 Internationalisation: Enable automatic scheduling for translations (#107629)
enable schedule for crowdin task creation
2025-07-04 14:08:17 +00:00
renovate[bot] 81a20caf6b Update dependency @floating-ui/react to v0.27.13 (#107628)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 14:06:53 +00:00
renovate[bot] 17ecd4c051 Update dependency typescript to v5.8.3 (#101501)
* Update dependency typescript to v5.8.3

* get correct window type

* fix @grafana/data

* update lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-04 14:43:01 +01:00
Carl Bergquist d0c474019a Go: exclude github.com/RoaringBitmap/real-roaring-datasets since it doesn't contain a LICENSE file. (#107609)
go.mod: exclude package without license file

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2025-07-04 15:32:02 +02:00
Arati R. 650abfd2ff Unified Storage: Remove distributor todo comment (#107623)
Remove todo
2025-07-04 12:59:22 +00:00
Georges Chaudy 6bb74ff56a unistore: add key validation (#107622) 2025-07-04 12:52:24 +00:00
Dana Axinte 46c38fdbb7 SecretsManager: Introduce worker and secret async service (#107614)
SecretsManager: Introduce worker and secret aysnc service

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2025-07-04 13:13:48 +01:00
Josh Hunt 76a21fb2e2 Docs: Clarify that log level critical is just an alias for error (#107454)
Docs: Clarify that level = critical is just an alias for error
2025-07-04 13:09:19 +01:00
Matias Chomicki 3ba2457a70 Query splitting: Interpolate queries at the start of the process (#107534)
* Loki query splitting: interpolate queries before execution

* Update tests

* Prettier

* shardQuerySplitting: remove unnecessary call
2025-07-04 11:45:30 +00:00
Arati R. dcb853d309 Unified Search: Remove resource-server-specific methods from distributor (#107607)
* Remove resource-server-specific methods from distributor
* Remove BlobStoreServer interface implementation from distributor
2025-07-04 12:48:27 +02:00
Josh Hunt 4d93380753 Storybook: Deploy PR previews (#107322)
* Create workflow to build storybook

* rename action, gate to non-forks

* fix my branch name

* add upload to gcs

* fix permissions

* login first

* try prod env

* remove login

* clean up GHA

* try to upload storybook to better path

* better cache node modules

* specify parent: false

* write summary

* fix summary url

* comment

* add comment

* fix commit hash

* add issue number to new comment

* remove comment stuff

* codeowners

* change deploy name preview

* fix
2025-07-04 11:35:52 +01:00
Bogdan Matei 47e5bd2316 TimeSeries/Trend: Fix infinite loop (#107615) 2025-07-04 09:26:43 +00:00
grafana-pr-automation[bot] c02f76d89a I18n: Download translations from Crowdin (#107601)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-04 09:08:21 +00:00
Misi 713f6d1551 IAM: Move resource definitions to apps/iam step 1 (#107389)
* wip

* Use serviceaccount model from /apps/iam

* revert version update

* Add tembinding, userteam, other improvements

* Change serviceaccounttoken spec

* Revert the change of ServiceAccountToken

* Revert the change of UserTeam

* Clean up

* Remove files that are not needed for now

* Lint

* Update sql query's integration tests

* Fix tests

* update openapi spec

* Move LastSeenAt to the annotations

* Updte openapi_snapshots

* Change lastSeenAt annotation name
2025-07-04 11:07:48 +02:00
Hugo Kiyodi Oshiro c7374b6910 Alerting: Add Synthetic and IRM link cards (#107538) 2025-07-04 10:52:43 +02:00
Dana Axinte 15e1aa8855 SecretsManager: Introduce decrypt store (#107586)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
2025-07-04 09:22:10 +01:00
Tobias Skarhed ea4f783ebe Dependencies: Add resolution for outdated transitive deps (#107559)
* Add resolution for jsonlint

* Update get-document and gitconfiglocal
2025-07-04 09:26:16 +02:00
Sven Grossmann a1f1196352 Test Data Source: Allow inputs to render 0 values (#107578) 2025-07-04 08:33:33 +02:00
Leon Sorokin f2ffdd39ca TableNG: Reduce how often we re-measure row height (#107604) 2025-07-04 02:46:03 +00:00
Matias Chomicki 41014f29ed New Log Details: Create initial component for Log Details (#107466)
* Log Details: fork and refactor as functional

* LogDetailsBody: refactor styles

* LogDetails: decouple from old panel

* LogDetails: extract and centralize styles

* LogDetailsRow: refactor as functional

* Fix unused

* Fix wrong label

* LogDetails: create new component

* LogLineDetails: process links and add sample sections

* LogLineDetails: create and use LogLineDetailsFields

* LogLineDetails: group labels by type

* LogLineDetails: render all fields

* Removed unused components

* Fix imports

* LogLineDetails: fix label

* LogLineDetailsFields: fix stats

* LogLinedetailsFields: add base styles

* LogLineDetails: store open state

* getLabelTypeFromRow: internationalize and add plural support

* LogLineDetails: get plural field types

* LogLineDetails: sticky header

* LogLineDetails: introduce log details header

* LogLineDetails: extract into submodules

* LogDetails: add more header options and store collapsed state

* LogDetails: add scroll for log line

* LogLineDetailsHeader: add log line toggle button

* LogLineDetailsFieldS: improve sizes

* LogLineDetails: add search handler

* LogLineDetailsFields: implement search

* LogLineDetailsFields: switch to fixed key width

* LogLineDetailsFields: refactor fields display

* Link: remove tooltip

* Fix translations

* Revert "Link: remove tooltip"

This reverts commit cd927302a7889b9430008ae3b81ace0aed343f5f.

* LogLineDetailsFields: switch to css grid

* Remap new translations

* LogLineDetails: implement disable actions

* LogLineDetailsFields: migrate links to css grid

* LogLineDetailsFields: migrate stats to css grid

* LogLabelStats: make functional

* LogLineDetailsHeader: refactor listener

* LogLineDetailsFields: decrease column minwidth

* Reuse current panel unit tests

* Translations

* Test search

* Update public/app/features/logs/components/panel/LogLineDetails.test.tsx

* LogLineDetailsHeader: fix zIndex

* Create LogLineDetailsDisplayedFields

* Revert "Create LogLineDetailsDisplayedFields"

This reverts commit 57d460d966483c3126738994e2705b6578aac120.

* LogList: recover unwrapped horizontal scroll

* LogLineDetails: apply styles suggestion

* LogLineDetailsComponent: fix group option name

* LogLineDetailsHeader: tweak styles

* LogLineDetailsComponent: remove margin of last collapsable
2025-07-03 22:57:14 +02:00
Paul Marbach de370fb311 Chore: Upgrade scenes to 6.27.0 (#107594)
chore: upgrade scenes to 6.27.0
2025-07-03 15:42:09 -05:00
Carl Bergquist 115b639c54 Parca: upgrades to parca package to version that includes LICENSE file. (#107576)
deps: upgrade parc dep

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2025-07-03 22:41:39 +02:00
Paul Marbach dd6a231aad TableNG: Add option to wrap header text (#107338)
* TableNG: wrapped header text option

* reorganize variable names and code for easier reuse

* refine height math

* move empty string check to after null check

* add tests for useHeaderHeight

* maybe a bit faster

* cleanup to avoid creating fns and objects all the time, some tests

* fix unit test

* cell was using panel height

* add borders between header cells to make resizing more obvious

* fix tests

* changes from mob review

* jk

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-07-03 14:21:58 -05:00
Ryan McKinley 20f30462ad DataSource: Support updating configs using UID (#107486) 2025-07-03 10:18:19 -07:00
Dana Axinte a59ec345c2 SecretsManager: Introduce metrics and logs (#107582)
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2025-07-03 17:32:18 +01:00
Nathan Vērzemnieks 66d9a33cc9 Datasources: Update grafana-aws-sdk for new sigv4 middleware and aws-sdk-go v1 removal (#107522)
Datasources: Update grafana-aws-sdk
2025-07-03 17:48:57 +02:00
Yunwen Zheng 4414b92e93 Git UI Sync Create Dashboard: Fix update dashboard path field when folder selection changes (#107482)
Git UI sync when update folder selection, path field doesnt get update in the edit form
2025-07-03 11:19:09 -04:00
Matheus Macabu 27741d9a0c Air: Send interrupt signal for graceful server shutdown (#107507)
* Air: Dont run make gen-jsonnet

* Air: Send interrupt signal for graceful shutdown and wait 500ms
2025-07-03 16:50:48 +02:00
Dana Axinte cfd3b9f582 SecretsManager: outbox use message id (#107472)
* SecretsManager: outbox use message id

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>

* Remove query timestamp

* Add missing query

---------

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
2025-07-03 15:21:47 +01:00
ismail simsek aa22cf9e1f Prometheus: Don't use empty matcher if there is no match parameter (#107569)
* don't use empty matcher

* nit updates
2025-07-03 14:16:23 +00:00
Andrej Ocenas e76f470b44 NestedFolderPicker: Migrate to app platform API (#106926)
* Add /children endpoint

* Update folder client

* Add comment

* Add feature toggle

* Add new version of useFoldersQuery

* Error handling

* Format

* Rename feature toggle

* Remove options and move root folder constant

* Fix feature toggle merge

* Add feature toggle again

* Rename useFoldersQuery files

* Update API spec

* Fix test

* Add test

* Better typings

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-07-03 16:15:23 +02:00
Gareth 185ce90a4b Jaeger: Enable jaegerBackendMigration feature toggle by default (#107526)
* Jaeger: Enable jaegerBackendMigration feature toggle by default

* fix test

* update old-arch test
2025-07-03 14:45:22 +01:00
Victor Cinaglia 4f66c4a2a1 iam: Refresh live connection when ID tokens expire (#107209)
* iam: refresh live connection when ID tokens expire

* add coverage for the handler functions

* reinstate inadvertently broken unit test
2025-07-03 10:16:24 -03:00
Georges Chaudy 8d8b824f73 unistore: skipping badger test failing atm (#107572)
skipping badger test failing atm
2025-07-03 12:31:07 +00:00
Dana Axinte 4d8678c7f2 SecretsManager: Add base encryption manager (#107562)
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-07-03 11:29:14 +01:00
Ivan Ortega Alba 93c14c52da Migrations: Compare backend and frontend outputs to ensure feature parity (#106851)
* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Dashboards: Support schemaVersion v33 migration in backend

* Apply suggestions from code review

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

* Apply feedback

* Remove unused parameters

* Refactor to follow Go patterns

* Update logic

* Only write final migration result as output

* Compare backend and frontend results

* Improve snapshots to cover all possible use cases

* Linter

* wip make it consistent v33

* apply feedback

* Return default when the ref cannot be found

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

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

* apply feedback

* Use same mocks backend/frontend

* restore migrations

* update snapshots

* Adapt migration tests to use min versions

* Ensure v40-v41 works

* Ensure v39-v40 works

* Simplify the naming of the files

* adjust jest to new input convention

* Ensure every migration v36-v41 works

* Improve v38 naming

* Ensure v36 migrates correctly

* Skip v36 refs migrations on rows

* Treat rows as frontend and ensure same results for v36

* Ensure v34 runs with the same logic than the frontend

* Leave empty stadistics as valid option

* ensure v33 is working as the frontend

* Update tests

* Undo frontend changes for legend handling

* Remove filtering by version in the frontend

* linter

* Clean up v33 input JSON

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-07-03 12:23:51 +02:00
Mustafa Sencer Özcan b7153d4d20 fix: grpc resource delete error when qos enabled (#107560) 2025-07-03 12:02:05 +02:00
Peter Štibraný 041c343a86 Unified storage: Respect GF_DATABASE_URL override (#105331)
* Database for unified storage resources now reuses DB code that respects URL override.

Access instrument_queries via section getter.
2025-07-03 09:57:40 +00:00
Josh Hunt 9652f07e56 Storybook: Serve msw worker from relative path (#107561) 2025-07-03 10:51:11 +01:00
Dana Axinte f51db112d4 SecretsManager: Add decrypt service (#107473)
* SecretsManager: Add decrypt service

Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>

* Missed space to sync files
2025-07-03 10:41:38 +01:00
Misi a7bfd8e351 Auth: Remove ssoSettingsApi feature toggle (#107528)
* Remove ssoSettingsApi feature toggle

* Clean up

* lint

* Fix tests
2025-07-03 10:53:33 +02:00
Peter Štibraný e076c74869 sqltemplate, dbimpl: Remove single-method function types (#107525)
* Remove dbProviderFunc function.

This removes one extra indirection that made the code bit more difficult to navigate.

* Remove indirection function types implementing single-method interfaces.

This streamlines the code and makes it bit easier to navigate.

* Update pkg/storage/unified/sql/sqltemplate/dialect_mysql.go

Co-authored-by: Mustafa Sencer Özcan <32759850+mustafasencer@users.noreply.github.com>

---------

Co-authored-by: Mustafa Sencer Özcan <32759850+mustafasencer@users.noreply.github.com>
2025-07-03 10:38:12 +02:00
Arati R. a68f8107df Unified Storage/Large Object Support: Add test for dashboardv2 support (#107470)
* Add more unit tests to cover dashboardv2 and cross version unmarshalling

Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>

* Change import name of meta v1

* Rename TestLargeDashboardSupport since there are tests for multiple versions

* Simplify TestLargeDashboardSupportV2

* Use v1 in TestLargeDashboardSupportCrossVersion, simplify original dash

* Marshal spec in TestLargeDashboardSupportCrossVersion

* Remove TestLargeDashboardSupportCrossVersion

---------

Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>
Co-authored-by: Bruno Abrantes <bruno@brunoabrantes.com>
2025-07-03 07:13:56 +02:00
Ryan McKinley acabe86153 APIServer: Exclude internal GroupVersionKind from openapi (#107551) 2025-07-02 19:32:01 -07:00
973 changed files with 28975 additions and 37683 deletions
+3 -2
View File
@@ -7,9 +7,10 @@ exclude_unchanged = true
follow_symlink = true
include_dir = ["apps", "conf", "devenv/dev-dashboards", "pkg", "public/views"]
include_ext = ["go", "ini", "toml", "html", "json"]
pre_cmd = ["make gen-go", "make gen-jsonnet"]
rerun_delay = 1000
pre_cmd = ["make gen-go"]
stop_on_error = true
send_interrupt = true
kill_delay = 500
[log]
time = true
-164
View File
@@ -1499,22 +1499,9 @@ exports[`better eslint`] = {
"public/app/features/browse-dashboards/components/NewFolderForm.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
],
"public/app/features/browse-dashboards/state/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/features/connections/components/ConnectionsRedirectNotice/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/pages/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AddNewConnectionPage\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./DataSourceDashboardsPage\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./DataSourceDetailsPage\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./DataSourcesListPage\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./EditDataSourcePage\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./NewDataSourcePage\`)", "5"]
],
"public/app/features/connections/tabs/ConnectData/CardGrid/CardGrid.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Card components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
],
@@ -1568,10 +1555,6 @@ exports[`better eslint`] = {
"public/app/features/correlations/components/EmptyCorrelationsCTA.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Card components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
],
"public/app/features/correlations/components/Wizard/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/correlations/mocks/useCorrelations.mocks.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -1730,10 +1713,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "4"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "5"]
],
"public/app/features/dashboard-scene/settings/annotations/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsEdit\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsList\`)", "1"]
],
"public/app/features/dashboard-scene/settings/links/DashboardLinkForm.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
@@ -1781,13 +1760,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/features/dashboard-scene/settings/version-history/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./HistorySrv\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryButtons\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryComparison\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryHeader\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryTable\`)", "4"]
],
"public/app/features/dashboard-scene/sharing/ShareButton/share-externally/EmailShare/ConfigEmailSharing/ConfigEmailSharing.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
],
@@ -1870,10 +1842,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "5"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "6"]
],
"public/app/features/dashboard/components/AnnotationSettings/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsEdit\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsList\`)", "1"]
],
"public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@@ -1956,10 +1924,6 @@ exports[`better eslint`] = {
"public/app/features/dashboard/components/Inspector/PanelInspector.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/dashboard/components/LinksSettings/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./LinkSettingsEdit\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./LinkSettingsList\`)", "1"]
],
"public/app/features/dashboard/components/PanelEditor/DynamicConfigValueEditor.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"]
@@ -2228,10 +2192,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
],
"public/app/features/dataframe-import/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/datasources/components/DataSourceTypeCard.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Card components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "1"]
@@ -2251,14 +2211,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/features/datasources/state/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"]
],
"public/app/features/datasources/state/navModel.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
@@ -2299,24 +2251,6 @@ exports[`better eslint`] = {
"public/app/features/dimensions/editors/ValueMappingsEditor/ValueMappingsEditor.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/features/dimensions/editors/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"]
],
"public/app/features/dimensions/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "6"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"]
],
"public/app/features/dimensions/scale.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -2362,17 +2296,6 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/demo/trace-generators.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/explore/TraceView/components/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./TracePageHeader\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./TraceTimelineViewer/SpanDetail/DetailState\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./TraceTimelineViewer\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./model/transform-trace-data\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./settings/SpanBarSettings\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./utils/filter-spans\`)", "5"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "6"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "8"]
],
"public/app/features/explore/TraceView/components/model/ddg/types.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./PathElem\`)", "0"]
],
@@ -2393,21 +2316,9 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/model/transform-trace-data.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/explore/TraceView/components/types/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../settings/SpanBarSettings\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./TNil\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./TTraceTimeline\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./links\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./trace\`)", "4"]
],
"public/app/features/explore/TraceView/components/utils/DraggableManager/demo/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DraggableManagerDemo\`)", "0"]
],
"public/app/features/explore/TraceView/components/utils/DraggableManager/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DraggableManager\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./EUpdateTypes\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/features/explore/TraceView/createSpanLink.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
@@ -2602,23 +2513,12 @@ exports[`better eslint`] = {
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "2"]
],
"public/app/features/plugins/admin/components/Badges/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./PluginDeprecatedBadge\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginDisabledBadge\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginEnterpriseBadge\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginInstallBadge\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginUpdateAvailableBadge\`)", "4"]
],
"public/app/features/plugins/admin/components/GetStartedWithPlugin/GetStartedWithDataSource.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/admin/components/GetStartedWithPlugin/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./GetStartedWithPlugin\`)", "0"]
],
"public/app/features/plugins/admin/components/InstallControls/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./InstallControlsButton\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./InstallControlsWarning\`)", "1"]
],
"public/app/features/plugins/admin/components/PluginDetailsPage.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -3142,10 +3042,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/azuremonitor/azureMetadata/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/plugins/datasource/azuremonitor/components/ArgQueryEditor/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./ArgQueryEditor\`)", "0"]
],
@@ -3227,11 +3123,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/azuremonitor/mocks/variables.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/azuremonitor/types/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/plugins/datasource/azuremonitor/types/query.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "1"],
@@ -3263,23 +3154,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloud-monitoring/components/VariableQueryEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloud-monitoring/components/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./Aggregation\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./AliasBy\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./AlignmentFunction\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./Alignment\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationsHelp\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./Fields\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./GroupBy\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./LabelFilter\`)", "7"],
[0, 0, 0, "Do not re-export imported variable (\`./MQLQueryEditor\`)", "8"],
[0, 0, 0, "Do not re-export imported variable (\`./MetricQueryEditor\`)", "9"],
[0, 0, 0, "Do not re-export imported variable (\`./PeriodSelect\`)", "10"],
[0, 0, 0, "Do not re-export imported variable (\`./Preprocessor\`)", "11"],
[0, 0, 0, "Do not re-export imported variable (\`./Project\`)", "12"],
[0, 0, 0, "Do not re-export imported variable (\`./SLOQueryEditor\`)", "13"],
[0, 0, 0, "Do not re-export imported variable (\`./VisualMetricQueryEditor\`)", "14"]
],
"public/app/plugins/datasource/cloud-monitoring/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
@@ -3377,16 +3251,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/filterQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./commentOnlyQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./empty\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./filterQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./newCommandQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./sortQuery\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./whitespaceQuery\`)", "7"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/multiLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -3429,13 +3293,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "16"],
[0, 0, 0, "Do not use any type assertions.", "17"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineIncompleteQueryWithoutNamespace\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineTwoQueries\`)", "4"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/multiLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -3457,24 +3314,12 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloudwatch/mocks/dynamic-label-test-data/afterLabelValue.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/dynamic-label-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterLabelValue\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./insideLabelValue\`)", "1"]
],
"public/app/plugins/datasource/cloudwatch/mocks/dynamic-label-test-data/insideLabelValue.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/afterFunctionQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterFunctionQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgAfterSearchQuery\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./thirdArgAfterSearchQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./withinStringQuery\`)", "5"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/secondArgAfterSearchQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -3582,11 +3427,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/elasticsearch/test-helpers/render.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/elasticsearch/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./dataquery.gen\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`ElasticsearchQuery\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/plugins/datasource/grafana-postgresql-datasource/configuration/ConfigurationEditor.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
@@ -3627,10 +3467,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/grafana-testdata-datasource/components/SimulationSchemaForm.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/grafana-testdata-datasource/components/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./RandomWalkEditor\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./StreamingClientEditor\`)", "1"]
],
"public/app/plugins/datasource/grafana-testdata-datasource/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
+1
View File
@@ -835,6 +835,7 @@ embed.go @grafana/grafana-as-code
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
/.github/workflows/i18n-crowdin-create-tasks.yml @grafana/grafana-frontend-platform
/.github/workflows/i18n-verify.yml @grafana/grafana-frontend-platform
/.github/workflows/deploy-storybook-preview.yml @grafana/grafana-frontend-platform
/.github/workflows/scripts/crowdin/create-tasks.ts @grafana/grafana-frontend-platform
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
/.github/workflows/pr-dependabot-update-go-workspace.yml @grafana/grafana-app-platform-squad
@@ -0,0 +1,93 @@
name: Deploy Storybook preview
on:
pull_request:
paths:
- 'packages/grafana-ui/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
deploy-storybook-preview:
name: Deploy Storybook preview
runs-on: ubuntu-latest
# Don't run from forks for the moment. If we find this useful we can do the workflow_run dance
# to make it work for forks.
if: github.event.pull_request.head.repo.fork == false
permissions:
contents: read
id-token: write
env:
BUCKET_NAME: grafana-storybook-previews
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Cache node_modules
uses: actions/cache@v4
with:
path: |
node_modules
key: node_modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
node_modules-
- name: Install dependencies
env:
# If the PR isn't from a fork then don't use the slower yarn checks
YARN_ENABLE_HARDENED_MODE: ${{ github.event.pull_request.head.repo.fork == false && '1' || '0' }}
run: yarn install --immutable
- name: Build storybook
run: yarn storybook:build
# Create the GCS folder name for the preview. Creates a consistent name for all deploys for the PR.
# Matches format of `pr_<PR_NUMBER>_<SANITIZED_BRANCH>`.
# Where `SANITIZED_BRANCH` is the branch name with only alphanumeric and hyphens, limited to 30 characters.
- name: Create deploy name
id: create-deploy-name
env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# Convert branch name to only contain alphanumeric and hyphens
SANITIZED_BRANCH=$(echo "$BRANCH_NAME" | tr -cs "[:alnum:]-" "-" | sed "s/^-//;s/-$//")
# Check if SANITIZED_BRANCH is empty and fail if it is
if [ -z "$SANITIZED_BRANCH" ]; then
echo "Error: Branch name resulted in empty string after sanitization"
exit 1
fi
echo "deploy-name=pr_${PR_NUMBER}_${SANITIZED_BRANCH:0:30}" >> "$GITHUB_OUTPUT"
- name: Upload Storybook
uses: grafana/shared-workflows/actions/push-to-gcs@main
with:
environment: prod
bucket: ${{ env.BUCKET_NAME }}
bucket_path: ${{ steps.create-deploy-name.outputs.deploy-name }}
path: packages/grafana-ui/dist/storybook
service_account: github-gf-storybook-preview@grafanalabs-workload-identity.iam.gserviceaccount.com
parent: false
- name: Write summary
env:
DEPLOY_NAME: ${{ steps.create-deploy-name.outputs.deploy-name }}
run: |
echo "## Storybook preview deployed! 🚀" >> $GITHUB_STEP_SUMMARY
echo "Check it out at https://storage.googleapis.com/${BUCKET_NAME}/${DEPLOY_NAME}/index.html" >> $GITHUB_STEP_SUMMARY
@@ -2,10 +2,9 @@ name: Crowdin automatic task management
on:
workflow_dispatch:
# once a week on Sunday at midnight
# TODO enable once we're ready to create tasks automatically
# schedule:
# - cron: "0 0 * * 0"
# once a month on the first day of the month at midnight
schedule:
- cron: "0 0 1 * *"
jobs:
create-tasks-in-crowdin:
+1 -4
View File
@@ -19,9 +19,6 @@ update-app-sdk: ## Update the Grafana App SDK dependency in go.mod
go mod tidy
.PHONY: generate
generate: do-generate ## Run Grafana App SDK code generation
.PHONY: do-generate
do-generate: install-app-sdk update-app-sdk
generate: install-app-sdk update-app-sdk
## --defencoding=none and noschemasinmanifest are needed to avoid infinite loop while generating recursive models (see routingtree.cue)
@$(APP_SDK_BIN) generate --grouping=group --gogenpath=./pkg/apis --defencoding=none --postprocess --noschemasinmanifest
+8 -8
View File
@@ -3,10 +3,10 @@ module github.com/grafana/grafana/apps/alerting/notifications
go 1.24.4
require (
github.com/grafana/grafana-app-sdk v0.39.0
github.com/grafana/grafana-app-sdk/logging v0.38.2
k8s.io/apimachinery v0.33.1
k8s.io/apiserver v0.33.1
github.com/grafana/grafana-app-sdk v0.39.2
github.com/grafana/grafana-app-sdk/logging v0.39.1
k8s.io/apimachinery v0.33.2
k8s.io/apiserver v0.33.2
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
)
@@ -97,10 +97,10 @@ require (
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.33.1 // indirect
k8s.io/apiextensions-apiserver v0.33.1 // indirect
k8s.io/client-go v0.33.1 // indirect
k8s.io/component-base v0.33.1 // indirect
k8s.io/api v0.33.2 // indirect
k8s.io/apiextensions-apiserver v0.33.2 // indirect
k8s.io/client-go v0.33.2 // indirect
k8s.io/component-base v0.33.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
+16 -16
View File
@@ -84,10 +84,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/grafana/grafana-app-sdk v0.39.0 h1:WC2E9BKXWDX/e2bajdAFjQEyyWf9BFp7Yzbjm6T1T1w=
github.com/grafana/grafana-app-sdk v0.39.0/go.mod h1:xRyBQOttgWTc3tGe9pI0upnpEPVhzALf7Mh/61O4zyY=
github.com/grafana/grafana-app-sdk/logging v0.38.2 h1:EdQTRxbbH72zdqJ09Z76zcSjfALJXkpPLgvKEPPnloc=
github.com/grafana/grafana-app-sdk/logging v0.38.2/go.mod h1:Y/bvbDhBiV/tkIle9RW49pgfSPIPSON8Q4qjx3pyqDk=
github.com/grafana/grafana-app-sdk v0.39.2 h1:ymfr+1318t+JC9U2OYrzVpGmNG/aJONUmFFu/G98Xh8=
github.com/grafana/grafana-app-sdk v0.39.2/go.mod h1:t0m6q561lpoHQCixS9LUHFUhUzDClzNtm7BH60gHVSY=
github.com/grafana/grafana-app-sdk/logging v0.39.1 h1:lI5rbrheuwVPuyIM6LIuEYOCSpgmXahfKtqeMyhbGPU=
github.com/grafana/grafana-app-sdk/logging v0.39.1/go.mod h1:WhDENSnaGHtyVVwZGVnAR7YLvh2xlLDYR3D7E6h7XVk=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.1-0.20191002090509-6af20e3a5340 h1:uGoIog/wiQHI9GAxXO5TJbT0wWKH3O9HhOJW1F9c3fY=
@@ -352,18 +352,18 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw=
k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw=
k8s.io/apiextensions-apiserver v0.33.1 h1:N7ccbSlRN6I2QBcXevB73PixX2dQNIW0ZRuguEE91zI=
k8s.io/apiextensions-apiserver v0.33.1/go.mod h1:uNQ52z1A1Gu75QSa+pFK5bcXc4hq7lpOXbweZgi4dqA=
k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4=
k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.33.1 h1:yLgLUPDVC6tHbNcw5uE9mo1T6ELhJj7B0geifra3Qdo=
k8s.io/apiserver v0.33.1/go.mod h1:VMbE4ArWYLO01omz+k8hFjAdYfc3GVAYPrhP2tTKccs=
k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4=
k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA=
k8s.io/component-base v0.33.1 h1:EoJ0xA+wr77T+G8p6T3l4efT2oNwbqBVKR71E0tBIaI=
k8s.io/component-base v0.33.1/go.mod h1:guT/w/6piyPfTgq7gfvgetyXMIh10zuXA6cRRm3rDuY=
k8s.io/api v0.33.2 h1:YgwIS5jKfA+BZg//OQhkJNIfie/kmRsO0BmNaVSimvY=
k8s.io/api v0.33.2/go.mod h1:fhrbphQJSM2cXzCWgqU29xLDuks4mu7ti9vveEnpSXs=
k8s.io/apiextensions-apiserver v0.33.2 h1:6gnkIbngnaUflR3XwE1mCefN3YS8yTD631JXQhsU6M8=
k8s.io/apiextensions-apiserver v0.33.2/go.mod h1:IvVanieYsEHJImTKXGP6XCOjTwv2LUMos0YWc9O+QP8=
k8s.io/apimachinery v0.33.2 h1:IHFVhqg59mb8PJWTLi8m1mAoepkUNYmptHsV+Z1m5jY=
k8s.io/apimachinery v0.33.2/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.33.2 h1:KGTRbxn2wJagJowo29kKBp4TchpO1DRO3g+dB/KOJN4=
k8s.io/apiserver v0.33.2/go.mod h1:9qday04wEAMLPWWo9AwqCZSiIn3OYSZacDyu/AcoM/M=
k8s.io/client-go v0.33.2 h1:z8CIcc0P581x/J1ZYf4CNzRKxRvQAwoAolYPbtQes+E=
k8s.io/client-go v0.33.2/go.mod h1:9mCgT4wROvL948w6f6ArJNb7yQd7QsvqavDeZHvNmHo=
k8s.io/component-base v0.33.2 h1:sCCsn9s/dG3ZrQTX/Us0/Sx2R0G5kwa0wbZFYoVp/+0=
k8s.io/component-base v0.33.2/go.mod h1:/41uw9wKzuelhN+u+/C59ixxf4tYQKW7p32ddkYNe2k=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
@@ -14,6 +14,8 @@ import (
v0alpha1 "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/alerting/v0alpha1"
)
var ()
var appManifestData = app.ManifestData{
AppName: "alerting",
Group: "notifications.alerting.grafana.app",
+1 -1
View File
@@ -1,4 +1,4 @@
APP_SDK_VERSION := v0.39.0
APP_SDK_VERSION := v0.39.2
APP_SDK_DIR := $(shell go env GOPATH)/bin/app-sdk-$(APP_SDK_VERSION)
APP_SDK_BIN := $(APP_SDK_DIR)/grafana-app-sdk
+4 -4
View File
@@ -4,11 +4,11 @@ go 1.24.4
require (
cuelang.org/go v0.11.1
github.com/grafana/grafana-app-sdk v0.39.0
github.com/grafana/grafana-app-sdk v0.39.2
github.com/grafana/grafana-plugin-sdk-go v0.278.0
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e
github.com/stretchr/testify v1.10.0
k8s.io/apimachinery v0.33.1
k8s.io/apimachinery v0.33.2
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
)
@@ -44,7 +44,7 @@ require (
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/grafana/grafana-app-sdk/logging v0.38.2 // indirect
github.com/grafana/grafana-app-sdk/logging v0.39.1 // indirect
github.com/grafana/otel-profiling-go v0.5.1 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect
@@ -123,7 +123,7 @@ require (
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/client-go v0.33.1 // indirect
k8s.io/client-go v0.33.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
+10 -10
View File
@@ -94,10 +94,10 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/grafana/grafana-app-sdk v0.39.0 h1:WC2E9BKXWDX/e2bajdAFjQEyyWf9BFp7Yzbjm6T1T1w=
github.com/grafana/grafana-app-sdk v0.39.0/go.mod h1:xRyBQOttgWTc3tGe9pI0upnpEPVhzALf7Mh/61O4zyY=
github.com/grafana/grafana-app-sdk/logging v0.38.2 h1:EdQTRxbbH72zdqJ09Z76zcSjfALJXkpPLgvKEPPnloc=
github.com/grafana/grafana-app-sdk/logging v0.38.2/go.mod h1:Y/bvbDhBiV/tkIle9RW49pgfSPIPSON8Q4qjx3pyqDk=
github.com/grafana/grafana-app-sdk v0.39.2 h1:ymfr+1318t+JC9U2OYrzVpGmNG/aJONUmFFu/G98Xh8=
github.com/grafana/grafana-app-sdk v0.39.2/go.mod h1:t0m6q561lpoHQCixS9LUHFUhUzDClzNtm7BH60gHVSY=
github.com/grafana/grafana-app-sdk/logging v0.39.1 h1:lI5rbrheuwVPuyIM6LIuEYOCSpgmXahfKtqeMyhbGPU=
github.com/grafana/grafana-app-sdk/logging v0.39.1/go.mod h1:WhDENSnaGHtyVVwZGVnAR7YLvh2xlLDYR3D7E6h7XVk=
github.com/grafana/grafana-plugin-sdk-go v0.278.0 h1:5/rIYparLi02pofdaag8wnjspMMVNCi8cZhC4cdC3Ho=
github.com/grafana/grafana-plugin-sdk-go v0.278.0/go.mod h1:+8NXT/XUJ/89GV6FxGQ366NZ3nU+cAXDMd0OUESF9H4=
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e h1:BTKk7LHuG1kmAkucwTA7DuMbKpKvJTKrGdBmUNO4dfQ=
@@ -379,12 +379,12 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw=
k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw=
k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4=
k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4=
k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA=
k8s.io/api v0.33.2 h1:YgwIS5jKfA+BZg//OQhkJNIfie/kmRsO0BmNaVSimvY=
k8s.io/api v0.33.2/go.mod h1:fhrbphQJSM2cXzCWgqU29xLDuks4mu7ti9vveEnpSXs=
k8s.io/apimachinery v0.33.2 h1:IHFVhqg59mb8PJWTLi8m1mAoepkUNYmptHsV+Z1m5jY=
k8s.io/apimachinery v0.33.2/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/client-go v0.33.2 h1:z8CIcc0P581x/J1ZYf4CNzRKxRvQAwoAolYPbtQes+E=
k8s.io/client-go v0.33.2/go.mod h1:9mCgT4wROvL948w6f6ArJNb7yQd7QsvqavDeZHvNmHo=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
@@ -111,6 +111,8 @@ DashboardLink: {
keepTime: bool | *false
}
// Keeping this for backwards compatibility for GroupByVariableSpec and AdhocVariableSpec
// This type is widely used in the codebase and changing it will have a big impact
DataSourceRef: {
// The plugin type-id
type?: string
@@ -385,8 +387,7 @@ VizConfigKind: {
}
AnnotationQuerySpec: {
datasource?: DataSourceRef
query?: DataQueryKind
query: DataQueryKind
enable: bool
hide: bool
iconColor: string
@@ -412,15 +413,19 @@ QueryOptionsSpec: {
}
DataQueryKind: {
// The kind of a DataQueryKind is the datasource type
kind: string
kind: "DataQuery"
group: string
version: string | *"v0"
// New type for datasource reference
// Not creating a new type until we figure out how to handle DS refs for group by, adhoc, and every place that uses DataSourceRef in TS.
datasource?: {
name?: string
}
spec: [string]: _
}
PanelQuerySpec: {
query: DataQueryKind
datasource?: DataSourceRef
refId: string
hidden: bool
}
@@ -723,7 +728,6 @@ QueryVariableSpec: {
refresh: VariableRefresh
skipUrlSync: bool | *false
description?: string
datasource?: DataSourceRef
query: DataQueryKind
regex: string | *""
sort: VariableSort
@@ -115,6 +115,8 @@ DashboardLink: {
keepTime: bool | *false
}
// Keeping this for backwards compatibility for GroupByVariableSpec and AdhocVariableSpec
// This type is widely used in the codebase and changing it will have a big impact
DataSourceRef: {
// The plugin type-id
type?: string
@@ -389,8 +391,7 @@ VizConfigKind: {
}
AnnotationQuerySpec: {
datasource?: DataSourceRef
query?: DataQueryKind
query: DataQueryKind
enable: bool
hide: bool
iconColor: string
@@ -416,15 +417,19 @@ QueryOptionsSpec: {
}
DataQueryKind: {
// The kind of a DataQueryKind is the datasource type
kind: string
kind: "DataQuery"
group: string
version: string | *"v0"
// New type for datasource reference
// Not creating a new type until we figure out how to handle DS refs for group by, adhoc, and every place that uses DataSourceRef in TS.
datasource?: {
name?: string
}
spec: [string]: _
}
PanelQuerySpec: {
query: DataQueryKind
datasource?: DataSourceRef
refId: string
hidden: bool
}
@@ -727,7 +732,6 @@ QueryVariableSpec: {
refresh: VariableRefresh
skipUrlSync: bool | *false
description?: string
datasource?: DataSourceRef
query: DataQueryKind
regex: string | *""
sort: VariableSort
@@ -23,14 +23,13 @@ func NewDashboardAnnotationQueryKind() *DashboardAnnotationQueryKind {
// +k8s:openapi-gen=true
type DashboardAnnotationQuerySpec struct {
Datasource *DashboardDataSourceRef `json:"datasource,omitempty"`
Query *DashboardDataQueryKind `json:"query,omitempty"`
Enable bool `json:"enable"`
Hide bool `json:"hide"`
IconColor string `json:"iconColor"`
Name string `json:"name"`
BuiltIn *bool `json:"builtIn,omitempty"`
Filter *DashboardAnnotationPanelFilter `json:"filter,omitempty"`
Query DashboardDataQueryKind `json:"query"`
Enable bool `json:"enable"`
Hide bool `json:"hide"`
IconColor string `json:"iconColor"`
Name string `json:"name"`
BuiltIn *bool `json:"builtIn,omitempty"`
Filter *DashboardAnnotationPanelFilter `json:"filter,omitempty"`
// Catch-all field for datasource-specific properties
LegacyOptions map[string]interface{} `json:"legacyOptions,omitempty"`
}
@@ -38,34 +37,28 @@ type DashboardAnnotationQuerySpec struct {
// NewDashboardAnnotationQuerySpec creates a new DashboardAnnotationQuerySpec object.
func NewDashboardAnnotationQuerySpec() *DashboardAnnotationQuerySpec {
return &DashboardAnnotationQuerySpec{
Query: *NewDashboardDataQueryKind(),
BuiltIn: (func(input bool) *bool { return &input })(false),
}
}
// +k8s:openapi-gen=true
type DashboardDataSourceRef struct {
// The plugin type-id
Type *string `json:"type,omitempty"`
// Specific datasource instance
Uid *string `json:"uid,omitempty"`
}
// NewDashboardDataSourceRef creates a new DashboardDataSourceRef object.
func NewDashboardDataSourceRef() *DashboardDataSourceRef {
return &DashboardDataSourceRef{}
}
// +k8s:openapi-gen=true
type DashboardDataQueryKind struct {
// The kind of a DataQueryKind is the datasource type
Kind string `json:"kind"`
Spec map[string]interface{} `json:"spec"`
Kind string `json:"kind"`
Group string `json:"group"`
Version string `json:"version"`
// New type for datasource reference
// Not creating a new type until we figure out how to handle DS refs for group by, adhoc, and every place that uses DataSourceRef in TS.
Datasource *DashboardV2alpha1DataQueryKindDatasource `json:"datasource,omitempty"`
Spec map[string]interface{} `json:"spec"`
}
// NewDashboardDataQueryKind creates a new DashboardDataQueryKind object.
func NewDashboardDataQueryKind() *DashboardDataQueryKind {
return &DashboardDataQueryKind{
Spec: map[string]interface{}{},
Kind: "DataQuery",
Version: "v0",
Spec: map[string]interface{}{},
}
}
@@ -199,10 +192,9 @@ func NewDashboardPanelQueryKind() *DashboardPanelQueryKind {
// +k8s:openapi-gen=true
type DashboardPanelQuerySpec struct {
Query DashboardDataQueryKind `json:"query"`
Datasource *DashboardDataSourceRef `json:"datasource,omitempty"`
RefId string `json:"refId"`
Hidden bool `json:"hidden"`
Query DashboardDataQueryKind `json:"query"`
RefId string `json:"refId"`
Hidden bool `json:"hidden"`
}
// NewDashboardPanelQuerySpec creates a new DashboardPanelQuerySpec object.
@@ -763,7 +755,9 @@ type DashboardRepeatOptions struct {
// NewDashboardRepeatOptions creates a new DashboardRepeatOptions object.
func NewDashboardRepeatOptions() *DashboardRepeatOptions {
return &DashboardRepeatOptions{}
return &DashboardRepeatOptions{
Mode: DashboardRepeatMode,
}
}
// other repeat modes will be added in the future: label, frame
@@ -938,7 +932,9 @@ type DashboardRowRepeatOptions struct {
// NewDashboardRowRepeatOptions creates a new DashboardRowRepeatOptions object.
func NewDashboardRowRepeatOptions() *DashboardRowRepeatOptions {
return &DashboardRowRepeatOptions{}
return &DashboardRowRepeatOptions{
Mode: DashboardRepeatMode,
}
}
// +k8s:openapi-gen=true
@@ -1011,7 +1007,9 @@ type DashboardAutoGridRepeatOptions struct {
// NewDashboardAutoGridRepeatOptions creates a new DashboardAutoGridRepeatOptions object.
func NewDashboardAutoGridRepeatOptions() *DashboardAutoGridRepeatOptions {
return &DashboardAutoGridRepeatOptions{}
return &DashboardAutoGridRepeatOptions{
Mode: DashboardRepeatMode,
}
}
// +k8s:openapi-gen=true
@@ -1077,7 +1075,9 @@ type DashboardTabRepeatOptions struct {
// NewDashboardTabRepeatOptions creates a new DashboardTabRepeatOptions object.
func NewDashboardTabRepeatOptions() *DashboardTabRepeatOptions {
return &DashboardTabRepeatOptions{}
return &DashboardTabRepeatOptions{
Mode: DashboardRepeatMode,
}
}
// Links with references to other dashboards or external resources
@@ -1221,7 +1221,6 @@ type DashboardQueryVariableSpec struct {
Refresh DashboardVariableRefresh `json:"refresh"`
SkipUrlSync bool `json:"skipUrlSync"`
Description *string `json:"description,omitempty"`
Datasource *DashboardDataSourceRef `json:"datasource,omitempty"`
Query DashboardDataQueryKind `json:"query"`
Regex string `json:"regex"`
Sort DashboardVariableSort `json:"sort"`
@@ -1627,6 +1626,21 @@ func NewDashboardGroupByVariableSpec() *DashboardGroupByVariableSpec {
}
}
// Keeping this for backwards compatibility for GroupByVariableSpec and AdhocVariableSpec
// This type is widely used in the codebase and changing it will have a big impact
// +k8s:openapi-gen=true
type DashboardDataSourceRef struct {
// The plugin type-id
Type *string `json:"type,omitempty"`
// Specific datasource instance
Uid *string `json:"uid,omitempty"`
}
// NewDashboardDataSourceRef creates a new DashboardDataSourceRef object.
func NewDashboardDataSourceRef() *DashboardDataSourceRef {
return &DashboardDataSourceRef{}
}
// Adhoc variable kind
// +k8s:openapi-gen=true
type DashboardAdhocVariableKind struct {
@@ -1687,7 +1701,9 @@ type DashboardAdHocFilterWithLabels struct {
// NewDashboardAdHocFilterWithLabels creates a new DashboardAdHocFilterWithLabels object.
func NewDashboardAdHocFilterWithLabels() *DashboardAdHocFilterWithLabels {
return &DashboardAdHocFilterWithLabels{}
return &DashboardAdHocFilterWithLabels{
Origin: DashboardFilterOrigin,
}
}
// Determine the origin of the adhoc variable filter
@@ -1758,6 +1774,16 @@ func NewDashboardSpec() *DashboardSpec {
}
}
// +k8s:openapi-gen=true
type DashboardV2alpha1DataQueryKindDatasource struct {
Name *string `json:"name,omitempty"`
}
// NewDashboardV2alpha1DataQueryKindDatasource creates a new DashboardV2alpha1DataQueryKindDatasource object.
func NewDashboardV2alpha1DataQueryKindDatasource() *DashboardV2alpha1DataQueryKindDatasource {
return &DashboardV2alpha1DataQueryKindDatasource{}
}
// +k8s:openapi-gen=true
type DashboardV2alpha1FieldConfigSourceOverrides struct {
Matcher DashboardMatcherConfig `json:"matcher"`
@@ -109,6 +109,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardTimeRangeOption": schema_pkg_apis_dashboard_v2alpha1_DashboardTimeRangeOption(ref),
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardTimeSettingsSpec": schema_pkg_apis_dashboard_v2alpha1_DashboardTimeSettingsSpec(ref),
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardTransformationKind": schema_pkg_apis_dashboard_v2alpha1_DashboardTransformationKind(ref),
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardV2alpha1DataQueryKindDatasource": schema_pkg_apis_dashboard_v2alpha1_DashboardV2alpha1DataQueryKindDatasource(ref),
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardV2alpha1FieldConfigSourceOverrides": schema_pkg_apis_dashboard_v2alpha1_DashboardV2alpha1FieldConfigSourceOverrides(ref),
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardV2alpha1RangeMapOptions": schema_pkg_apis_dashboard_v2alpha1_DashboardV2alpha1RangeMapOptions(ref),
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardV2alpha1RegexMapOptions": schema_pkg_apis_dashboard_v2alpha1_DashboardV2alpha1RegexMapOptions(ref),
@@ -595,14 +596,10 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardAnnotationQuerySpec(ref common.
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"datasource": {
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataSourceRef"),
},
},
"query": {
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind"),
Default: map[string]interface{}{},
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind"),
},
},
"enable": {
@@ -660,11 +657,11 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardAnnotationQuerySpec(ref common.
},
},
},
Required: []string{"enable", "hide", "iconColor", "name"},
Required: []string{"query", "enable", "hide", "iconColor", "name"},
},
},
Dependencies: []string{
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardAnnotationPanelFilter", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataSourceRef"},
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardAnnotationPanelFilter", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind"},
}
}
@@ -1505,10 +1502,29 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardDataQueryKind(ref common.Refere
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Description: "The kind of a DataQueryKind is the datasource type",
Default: "",
Type: []string{"string"},
Format: "",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"group": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"version": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"datasource": {
SchemaProps: spec.SchemaProps{
Description: "New type for datasource reference Not creating a new type until we figure out how to handle DS refs for group by, adhoc, and every place that uses DataSourceRef in TS.",
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardV2alpha1DataQueryKindDatasource"),
},
},
"spec": {
@@ -1526,9 +1542,11 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardDataQueryKind(ref common.Refere
},
},
},
Required: []string{"kind", "spec"},
Required: []string{"kind", "group", "version", "spec"},
},
},
Dependencies: []string{
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardV2alpha1DataQueryKindDatasource"},
}
}
@@ -1536,7 +1554,8 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardDataSourceRef(ref common.Refere
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Description: "Keeping this for backwards compatibility for GroupByVariableSpec and AdhocVariableSpec This type is widely used in the codebase and changing it will have a big impact",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"type": {
SchemaProps: spec.SchemaProps{
@@ -2890,11 +2909,6 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardPanelQuerySpec(ref common.Refer
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind"),
},
},
"datasource": {
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataSourceRef"),
},
},
"refId": {
SchemaProps: spec.SchemaProps{
Default: "",
@@ -2914,7 +2928,7 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardPanelQuerySpec(ref common.Refer
},
},
Dependencies: []string{
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataSourceRef"},
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind"},
}
}
@@ -3250,11 +3264,6 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardQueryVariableSpec(ref common.Re
Format: "",
},
},
"datasource": {
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataSourceRef"),
},
},
"query": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
@@ -3332,7 +3341,7 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardQueryVariableSpec(ref common.Re
},
},
Dependencies: []string{
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataSourceRef", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardVariableOption"},
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardDataQueryKind", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1.DashboardVariableOption"},
}
}
@@ -4320,6 +4329,24 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardTransformationKind(ref common.R
}
}
func schema_pkg_apis_dashboard_v2alpha1_DashboardV2alpha1DataQueryKindDatasource(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"name": {
SchemaProps: spec.SchemaProps{
Type: []string{"string"},
Format: "",
},
},
},
},
},
}
}
func schema_pkg_apis_dashboard_v2alpha1_DashboardV2alpha1FieldConfigSourceOverrides(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
+34 -49
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
@@ -13,6 +12,7 @@ import (
"github.com/grafana/grafana/apps/dashboard/pkg/migration"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/testutil"
)
const INPUT_DIR = "testdata/input"
@@ -22,24 +22,8 @@ func TestMigrate(t *testing.T) {
files, err := os.ReadDir(INPUT_DIR)
require.NoError(t, err)
migration.Initialize(&mockDataSourceInfoProvider{
dataSourceInfo: []schemaversion.DataSourceInfo{
{
Default: true,
UID: "default-ds-uid",
ID: 1,
Type: "prometheus",
Name: "Default Test Datasource",
},
{
UID: "non-default-test-ds-uid",
ID: 2,
Type: "loki",
Name: "Non Default Test Datasource",
APIVersion: "1",
},
},
})
// Use the same datasource provider as the frontend test to ensure consistency
migration.Initialize(testutil.GetTestProvider())
t.Run("minimum version check", func(t *testing.T) {
err := migration.Migrate(map[string]interface{}{
@@ -55,7 +39,13 @@ func TestMigrate(t *testing.T) {
continue
}
inputDash, inputVersion, name := load(t, filepath.Join(INPUT_DIR, f.Name()))
// Validate filename format
if !strings.HasPrefix(f.Name(), "v") || !strings.HasSuffix(f.Name(), ".json") {
t.Fatalf("input filename must use v{N}.{name}.json format, got: %s", f.Name())
}
inputDash := loadDashboard(t, filepath.Join(INPUT_DIR, f.Name()))
inputVersion := getSchemaVersion(t, inputDash)
t.Run("input check "+f.Name(), func(t *testing.T) {
// use input version as the target version to ensure there are no changes
@@ -69,20 +59,18 @@ func TestMigrate(t *testing.T) {
require.JSONEq(t, string(expectedDash), string(outBytes), "%s input check did not match", f.Name())
})
for targetVersion := inputVersion + 1; targetVersion <= schemaversion.LATEST_VERSION; targetVersion++ {
testName := fmt.Sprintf("%s v%d to v%d", name, inputVersion, targetVersion)
t.Run(testName, func(t *testing.T) {
testMigration(t, inputDash, name, inputVersion, targetVersion)
})
}
testName := fmt.Sprintf("%s v%d to v%d", f.Name(), inputVersion, schemaversion.LATEST_VERSION)
t.Run(testName, func(t *testing.T) {
testMigration(t, inputDash, f.Name(), inputVersion, schemaversion.LATEST_VERSION)
})
}
}
func testMigration(t *testing.T, dash map[string]interface{}, name string, inputVersion, targetVersion int) {
func testMigration(t *testing.T, dash map[string]interface{}, inputFileName string, inputVersion, targetVersion int) {
t.Helper()
require.NoError(t, migration.Migrate(dash, targetVersion), "%d migration failed", targetVersion)
outPath := filepath.Join(OUTPUT_DIR, fmt.Sprintf("%d.%s.%d.json", inputVersion, name, targetVersion))
outPath := filepath.Join(OUTPUT_DIR, inputFileName)
outBytes, err := json.MarshalIndent(dash, "", " ")
require.NoError(t, err, "failed to marshal migrated dashboard")
@@ -99,33 +87,30 @@ func testMigration(t *testing.T, dash map[string]interface{}, name string, input
require.JSONEq(t, string(existingBytes), string(outBytes), "%s did not match", outPath)
}
func parseInputName(t *testing.T, name string) (int, string) {
func getSchemaVersion(t *testing.T, dash map[string]interface{}) int {
t.Helper()
parts := strings.SplitN(filepath.Base(name), ".", 3)
if len(parts) < 3 {
t.Fatalf("invalid input filename: %s", name)
version, ok := dash["schemaVersion"]
require.True(t, ok, "dashboard missing schemaVersion")
switch v := version.(type) {
case int:
return v
case float64:
return int(v)
default:
t.Fatalf("invalid schemaVersion type: %T", version)
return 0
}
iv, err := strconv.Atoi(parts[0])
require.NoError(t, err, "failed to parse input version")
return iv, parts[1]
}
func load(t *testing.T, path string) (dash map[string]interface{}, inputVersion int, name string) {
func loadDashboard(t *testing.T, path string) map[string]interface{} {
t.Helper()
// We can ignore gosec G304 here since it's a test
// nolint:gosec
inputBytes, err := os.ReadFile(path)
require.NoError(t, err, "failed to read embedded input file")
require.NoError(t, err, "failed to read input file")
var dash map[string]interface{}
require.NoError(t, json.Unmarshal(inputBytes, &dash), "failed to unmarshal dashboard JSON")
inputVersion, name = parseInputName(t, path)
return dash, inputVersion, name
}
var _ schemaversion.DataSourceInfoProvider = &mockDataSourceInfoProvider{}
type mockDataSourceInfoProvider struct {
dataSourceInfo []schemaversion.DataSourceInfo
}
func (m *mockDataSourceInfoProvider) GetDataSourceInfo() []schemaversion.DataSourceInfo {
return m.dataSourceInfo
return dash
}
@@ -40,9 +40,10 @@ func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *D
return GetDefaultDSInstanceSettings(datasources)
}
// Check if it's a reference object without UID - should return default
// Check if it's a reference object
if ref, ok := nameOrRef.(map[string]interface{}); ok {
if _, hasUID := ref["uid"]; !hasUID {
// Reference object without UID should return default
return GetDefaultDSInstanceSettings(datasources)
}
// It's a reference object with UID, search for matching UID
@@ -56,7 +57,8 @@ func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *D
}
}
}
return GetDefaultDSInstanceSettings(datasources)
// Unknown UID-only reference should return nil (preserve it)
return nil
}
// Check if it's a string
@@ -76,7 +78,7 @@ func GetInstanceSettings(nameOrRef interface{}, datasources []DataSourceInfo) *D
}
}
}
return GetDefaultDSInstanceSettings(datasources)
return nil
}
// MigrateDatasourceNameToRef converts a datasource name/uid string to a reference object
@@ -100,7 +102,13 @@ func MigrateDatasourceNameToRef(nameOrRef interface{}, options map[string]bool,
return GetDataSourceRef(ds)
}
if dsName, ok := nameOrRef.(string); ok && dsName != "" {
// Handle string cases (including empty strings)
if dsName, ok := nameOrRef.(string); ok {
if dsName == "" {
// Empty string should return empty object (frontend behavior)
return map[string]interface{}{}
}
// Unknown datasource name should be preserved as UID-only reference
return map[string]interface{}{
"uid": dsName,
}
@@ -81,35 +81,35 @@ func TestGetDefaultDSInstanceSettings(t *testing.T) {
{
name: "no default datasource",
datasources: []schemaversion.DataSourceInfo{
{UID: "ds1", Type: "prometheus", Name: "DS1", Default: false},
{UID: "ds2", Type: "elasticsearch", Name: "DS2", Default: false},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false},
},
expected: nil,
},
{
name: "single default datasource",
datasources: []schemaversion.DataSourceInfo{
{UID: "ds1", Type: "prometheus", Name: "DS1", Default: false},
{UID: "default-ds", Type: "prometheus", Name: "Default", Default: true, APIVersion: "v1"},
{UID: "ds2", Type: "elasticsearch", Name: "DS2", Default: false},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false},
{UID: "default-ds-uid", Type: "prometheus", Name: "Default Test Datasource Name", Default: true, APIVersion: "v1"},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false},
},
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
{
name: "multiple default datasources returns first",
datasources: []schemaversion.DataSourceInfo{
{UID: "ds1", Type: "prometheus", Name: "Default1", Default: true, APIVersion: "v1"},
{UID: "ds2", Type: "elasticsearch", Name: "Default2", Default: true, APIVersion: "v2"},
{UID: "first-default", Type: "prometheus", Name: "First Default", Default: true, APIVersion: "v1"},
{UID: "second-default", Type: "elasticsearch", Name: "Second Default", Default: true, APIVersion: "v2"},
},
expected: &schemaversion.DataSourceInfo{
UID: "ds1",
UID: "first-default",
Type: "prometheus",
Name: "Default1",
Name: "First Default",
APIVersion: "v1",
},
},
@@ -125,9 +125,9 @@ func TestGetDefaultDSInstanceSettings(t *testing.T) {
func TestGetInstanceSettings(t *testing.T) {
datasources := []schemaversion.DataSourceInfo{
{UID: "default-ds", Type: "prometheus", Name: "Default", Default: true, APIVersion: "v1"},
{UID: "other-ds", Type: "elasticsearch", Name: "Elasticsearch", Default: false, APIVersion: "v2"},
{UID: "test-uid", Type: "influxdb", Name: "InfluxDB", Default: false},
{UID: "default-ds-uid", Type: "prometheus", Name: "Default Test Datasource Name", Default: true, APIVersion: "v1"},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false, APIVersion: "v2"},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false, APIVersion: "v1"},
}
tests := []struct {
@@ -139,9 +139,9 @@ func TestGetInstanceSettings(t *testing.T) {
name: "nil should return default",
nameOrRef: nil,
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
@@ -149,51 +149,51 @@ func TestGetInstanceSettings(t *testing.T) {
name: "default string should return default",
nameOrRef: "default",
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
{
name: "lookup by UID",
nameOrRef: "other-ds",
nameOrRef: "existing-target-uid",
expected: &schemaversion.DataSourceInfo{
UID: "other-ds",
UID: "existing-target-uid",
Type: "elasticsearch",
Name: "Elasticsearch",
Name: "Existing Target Name",
APIVersion: "v2",
},
},
{
name: "lookup by name",
nameOrRef: "Elasticsearch",
nameOrRef: "Existing Target Name",
expected: &schemaversion.DataSourceInfo{
UID: "other-ds",
UID: "existing-target-uid",
Type: "elasticsearch",
Name: "Elasticsearch",
Name: "Existing Target Name",
APIVersion: "v2",
},
},
{
name: "lookup by UID without apiVersion",
nameOrRef: "test-uid",
nameOrRef: "existing-ref-uid",
expected: &schemaversion.DataSourceInfo{
UID: "test-uid",
Type: "influxdb",
Name: "InfluxDB",
APIVersion: "",
UID: "existing-ref-uid",
Type: "prometheus",
Name: "Existing Ref Name",
APIVersion: "v1",
},
},
{
name: "lookup by reference object with UID",
nameOrRef: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
},
expected: &schemaversion.DataSourceInfo{
UID: "other-ds",
UID: "existing-target-uid",
Type: "elasticsearch",
Name: "Elasticsearch",
Name: "Existing Target Name",
APIVersion: "v2",
},
},
@@ -203,39 +203,29 @@ func TestGetInstanceSettings(t *testing.T) {
"type": "prometheus",
},
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
{
name: "unknown datasource should return default",
name: "unknown datasource should return nil",
nameOrRef: "unknown-ds",
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
Type: "prometheus",
Name: "Default",
APIVersion: "v1",
},
expected: nil,
},
{
name: "empty string should return default",
name: "empty string should return nil",
nameOrRef: "",
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
Type: "prometheus",
Name: "Default",
APIVersion: "v1",
},
expected: nil,
},
{
name: "unsupported input type should return default",
nameOrRef: 123,
expected: &schemaversion.DataSourceInfo{
UID: "default-ds",
UID: "default-ds-uid",
Type: "prometheus",
Name: "Default",
Name: "Default Test Datasource Name",
APIVersion: "v1",
},
},
@@ -251,9 +241,9 @@ func TestGetInstanceSettings(t *testing.T) {
func TestMigrateDatasourceNameToRef(t *testing.T) {
datasources := []schemaversion.DataSourceInfo{
{UID: "default-ds", Type: "prometheus", Name: "Default", Default: true, APIVersion: "v1"},
{UID: "other-ds", Type: "elasticsearch", Name: "Elasticsearch", Default: false, APIVersion: "v2"},
{UID: "test-uid", Type: "influxdb", Name: "InfluxDB", Default: false},
{UID: "default-ds-uid", Type: "prometheus", Name: "Default Test Datasource Name", Default: true, APIVersion: "v1"},
{UID: "existing-target-uid", Type: "elasticsearch", Name: "Existing Target Name", Default: false, APIVersion: "v2"},
{UID: "existing-ref-uid", Type: "prometheus", Name: "Existing Ref Name", Default: false, APIVersion: "v1"},
}
t.Run("returnDefaultAsNull: true", func(t *testing.T) {
@@ -287,39 +277,33 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
},
{
name: "lookup by UID",
nameOrRef: "other-ds",
nameOrRef: "existing-target-uid",
expected: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2",
},
},
{
name: "lookup by name",
nameOrRef: "Elasticsearch",
nameOrRef: "Existing Target Name",
expected: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2",
},
},
{
name: "unknown datasource should return default reference",
name: "unknown datasource should preserve as UID",
nameOrRef: "unknown-ds",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
},
{
name: "empty string should return default reference",
name: "empty string should return empty object",
nameOrRef: "",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
},
expected: map[string]interface{}{},
},
}
@@ -343,7 +327,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
name: "nil should return default reference",
nameOrRef: nil,
expected: map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
},
@@ -352,7 +336,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
name: "default should return default reference",
nameOrRef: "default",
expected: map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
},
@@ -370,30 +354,24 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
},
{
name: "lookup by UID",
nameOrRef: "other-ds",
nameOrRef: "existing-target-uid",
expected: map[string]interface{}{
"uid": "other-ds",
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2",
},
},
{
name: "unknown datasource should return default reference",
name: "unknown datasource should preserve as UID",
nameOrRef: "unknown-ds",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
},
{
name: "empty string should return default reference",
name: "empty string should return empty object",
nameOrRef: "",
expected: map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
},
expected: map[string]interface{}{},
},
}
@@ -414,7 +392,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
}
result := schemaversion.MigrateDatasourceNameToRef(nameOrRef, options, datasources)
expected := map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
}
@@ -424,7 +402,7 @@ func TestMigrateDatasourceNameToRef(t *testing.T) {
t.Run("integer input should return default reference", func(t *testing.T) {
result := schemaversion.MigrateDatasourceNameToRef(123, options, datasources)
expected := map[string]interface{}{
"uid": "default-ds",
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1",
}
@@ -126,10 +126,10 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"targets": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
},
},
},
@@ -141,14 +141,14 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -163,10 +163,10 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
"targets": []interface{}{
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
},
},
},
@@ -178,14 +178,14 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -195,7 +195,7 @@ func TestV33(t *testing.T) {
},
},
{
name: "panel with unknown datasource should return default reference",
name: "panel with unknown datasource should preserve as UID",
input: map[string]interface{}{
"schemaVersion": 32,
"panels": []interface{}{
@@ -214,16 +214,12 @@ func TestV33(t *testing.T) {
"panels": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-datasource",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-datasource",
},
},
},
@@ -237,13 +233,13 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"targets": []interface{}{
map[string]interface{}{
"datasource": "default",
},
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
},
map[string]interface{}{
"datasource": "unknown-ds",
@@ -258,7 +254,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
@@ -268,15 +264,13 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
},
},
@@ -290,7 +284,7 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
},
},
},
@@ -300,7 +294,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -315,13 +309,13 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"type": "row",
"collapsed": true,
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"panels": []interface{}{
map[string]interface{}{
"datasource": "default",
"targets": []interface{}{
map[string]interface{}{
"datasource": "other-ds",
"datasource": "existing-target-uid",
},
},
},
@@ -329,7 +323,7 @@ func TestV33(t *testing.T) {
"datasource": "unknown-ds",
"targets": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
},
},
},
@@ -345,7 +339,7 @@ func TestV33(t *testing.T) {
"collapsed": true,
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"panels": []interface{}{
@@ -355,7 +349,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -363,15 +357,13 @@ func TestV33(t *testing.T) {
},
map[string]interface{}{
"datasource": map[string]interface{}{
"uid": "default-ds",
"type": "prometheus",
"apiVersion": "v1",
"uid": "unknown-ds",
},
"targets": []interface{}{
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
},
@@ -389,7 +381,7 @@ func TestV33(t *testing.T) {
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"datasource": "Elasticsearch",
"datasource": "Existing Target Name",
"targets": []interface{}{
map[string]interface{}{
"datasource": "default",
@@ -407,7 +399,7 @@ func TestV33(t *testing.T) {
map[string]interface{}{
"datasource": map[string]interface{}{
"type": "elasticsearch",
"uid": "other-ds",
"uid": "existing-target-uid",
"apiVersion": "v2",
},
"targets": []interface{}{
+141 -121
View File
@@ -71,6 +71,7 @@ func V34(dashboard map[string]interface{}) error {
if !hasNested {
continue
}
for _, nestedPanel := range nestedPanels {
np, ok := nestedPanel.(map[string]interface{})
if !ok {
@@ -108,63 +109,60 @@ func migrateCloudWatchQueriesInPanel(panel map[string]interface{}) {
continue
}
// Check if this query has multiple statistics
statistics, hasStatistics := t["statistics"].([]interface{})
if !hasStatistics || len(statistics) <= 1 {
// Convert single statistic or no statistics to proper format
if hasStatistics && len(statistics) == 1 {
if stat, ok := statistics[0].(string); ok {
t["statistic"] = stat
}
}
delete(t, "statistics")
// Add CloudWatch fields if missing
if _, exists := t["metricEditorMode"]; !exists {
t["metricEditorMode"] = 0
}
if _, exists := t["metricQueryType"]; !exists {
t["metricQueryType"] = 0
}
// Get valid statistics (including null and empty strings)
validStats, isEmpty := getValidStatistics(t["statistics"])
// Handle empty array case (preserve it)
if isEmpty {
// Keep empty array as-is
newTargets = append(newTargets, t)
continue
}
// Split query with multiple statistics into separate queries
// First, collect all valid statistics
var validStatistics []string
for _, stat := range statistics {
statString, ok := stat.(string)
if !ok {
continue
}
validStatistics = append(validStatistics, statString)
}
// Remove statistics field for processing
delete(t, "statistics")
// If no valid statistics found, remove statistics field and keep original query
if len(validStatistics) == 0 {
delete(t, "statistics")
// Handle based on number of valid statistics
switch len(validStats) {
case 0:
// No valid statistics - keep query as-is
newTargets = append(newTargets, t)
continue
}
// Create separate queries for each valid statistic
for i, statString := range validStatistics {
// Create a copy of the original query
newQuery := make(map[string]interface{})
for k, v := range t {
if k != "statistics" {
newQuery[k] = v
case 1:
// Single statistic - set statistic field if not null
if validStats[0] != nil {
if statString, ok := validStats[0].(string); ok {
t["statistic"] = statString
}
}
newTargets = append(newTargets, t)
default:
// Multiple statistics - create separate queries
for i, stat := range validStats {
newQuery := copyMap(t)
if stat != nil {
if statString, ok := stat.(string); ok {
newQuery["statistic"] = statString
}
}
// Set the single statistic
newQuery["statistic"] = statString
if i == 0 {
// First query replaces the original
newTargets = append(newTargets, newQuery)
} else {
// Additional queries get new refIds and are added at the end
newQuery["refId"] = generateNextRefId(append(targets, additionalTargets...), len(additionalTargets))
additionalTargets = append(additionalTargets, newQuery)
if i == 0 {
newTargets = append(newTargets, newQuery)
} else {
newQuery["refId"] = generateNextRefId(append(targets, additionalTargets...), len(additionalTargets))
additionalTargets = append(additionalTargets, newQuery)
}
}
}
}
// Append additional queries at the end
panel["targets"] = append(newTargets, additionalTargets...)
}
@@ -192,95 +190,117 @@ func migrateCloudWatchAnnotationQueries(dashboard map[string]interface{}) {
continue
}
// Check if this annotation has multiple statistics
statistics, hasStatistics := a["statistics"].([]interface{})
if !hasStatistics || len(statistics) <= 1 {
// Convert single statistic to proper format
if hasStatistics && len(statistics) == 1 {
if stat, ok := statistics[0].(string); ok {
// Create new annotation with single statistic
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
// Get original name for suffix generation
originalName, _ := a["name"].(string)
// Get valid statistics (including null and empty strings)
validStats, isEmpty := getValidStatistics(a["statistics"])
// Handle empty array case (preserve it)
if isEmpty {
// Keep empty array as-is
annotationsList[i] = a
continue
}
// Handle based on number of valid statistics
switch len(validStats) {
case 0:
// No valid statistics - remove statistics field
delete(a, "statistics")
annotationsList[i] = a
case 1:
// Single statistic - set statistic field if not null
delete(a, "statistics")
if validStats[0] != nil {
if statString, ok := validStats[0].(string); ok {
a["statistic"] = statString
}
}
annotationsList[i] = a
default:
// Multiple statistics - create separate annotations
delete(a, "statistics")
for j, stat := range validStats {
newAnnotation := copyMap(a)
if stat != nil {
if statString, ok := stat.(string); ok {
newAnnotation["statistic"] = statString
}
newAnnotation["statistic"] = stat
}
// Add suffix to name
if originalName != "" {
suffix := getSuffixForStat(stat)
newAnnotation["name"] = originalName + " - " + suffix
}
if j == 0 {
annotationsList[i] = newAnnotation
} else {
additionalAnnotations = append(additionalAnnotations, newAnnotation)
}
} else {
// Always remove statistics field, even if empty or no statistics
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
}
annotationsList[i] = newAnnotation
}
continue
}
// Split annotation with multiple statistics into separate annotations
// First, collect all valid statistics
var validStatistics []string
for _, stat := range statistics {
statString, ok := stat.(string)
if !ok {
continue
}
validStatistics = append(validStatistics, statString)
}
// If no valid statistics found, remove statistics field and keep original annotation
if len(validStatistics) == 0 {
// Create new annotation without statistics field
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
}
annotationsList[i] = newAnnotation
continue
}
// Create new annotations for each valid statistic, replace original with first one
originalName, hasName := a["name"].(string)
for j, statString := range validStatistics {
// Create new annotation for this statistic
newAnnotation := make(map[string]interface{})
for k, v := range a {
if k != "statistics" {
newAnnotation[k] = v
}
}
// Set the single statistic
newAnnotation["statistic"] = statString
// Set the name with statistic suffix if multiple valid statistics
if len(validStatistics) > 1 && hasName {
newAnnotation["name"] = originalName + " - " + statString
}
if j == 0 {
// Replace the original annotation with the first new one
annotationsList[i] = newAnnotation
} else {
// Add additional annotations to be appended later
additionalAnnotations = append(additionalAnnotations, newAnnotation)
}
}
}
// Add additional annotations to the end of the list
if len(additionalAnnotations) > 0 {
annotations["list"] = append(annotationsList, additionalAnnotations...)
}
}
// getValidStatistics extracts valid statistics from the statistics field
func getValidStatistics(statisticsField interface{}) ([]interface{}, bool) {
statistics, ok := statisticsField.([]interface{})
if !ok {
return nil, false
}
// Special case: empty arrays should be preserved
if len(statistics) == 0 {
return nil, true // Return nil with true flag to indicate "empty array"
}
var valid []interface{}
for _, stat := range statistics {
// Include null and strings (including empty strings)
if stat == nil || isString(stat) {
valid = append(valid, stat)
}
}
return valid, false
}
// getSuffixForStat returns the appropriate suffix for annotation names
func getSuffixForStat(stat interface{}) string {
if stat == nil {
return "null"
}
if statString, ok := stat.(string); ok {
if statString == "" {
return ""
}
return statString
}
return ""
}
// copyMap creates a shallow copy of a map
func copyMap(original map[string]interface{}) map[string]interface{} {
copy := make(map[string]interface{})
for k, v := range original {
copy[k] = v
}
return copy
}
// isString checks if value is a string
func isString(value interface{}) bool {
_, ok := value.(string)
return ok
}
// isCloudWatchQuery checks if a query target is a CloudWatch query.
func isCloudWatchQuery(target map[string]interface{}) bool {
// Check for required CloudWatch query fields
@@ -36,28 +36,34 @@ func TestV34(t *testing.T) {
"type": "timeseries",
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -90,12 +96,14 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -197,13 +205,20 @@ func TestV34(t *testing.T) {
"annotations": map[string]interface{}{
"list": []interface{}{
map[string]interface{}{
"name": "CloudWatch Annotation",
"name": "CloudWatch Annotation - Sum",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistic": "Sum",
},
map[string]interface{}{
"name": "CloudWatch Annotation - null",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
},
},
},
},
@@ -236,6 +251,13 @@ func TestV34(t *testing.T) {
"prefixMatching": false,
"statistic": "Sum",
},
map[string]interface{}{
"name": "CloudWatch Annotation - null",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
},
map[string]interface{}{
"name": "CloudWatch Annotation - Average",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
@@ -310,12 +332,14 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
@@ -323,12 +347,14 @@ func TestV34(t *testing.T) {
"datasource": "prometheus",
},
map[string]interface{}{
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -360,11 +386,13 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -427,11 +455,14 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": []interface{}{},
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -464,12 +495,23 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -502,11 +544,13 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -541,24 +585,28 @@ func TestV34(t *testing.T) {
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"period": "300",
"alias": "CPU Usage",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"period": "300",
"alias": "CPU Usage",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -650,36 +698,44 @@ func TestV34(t *testing.T) {
"id": 4,
"targets": []interface{}{
map[string]interface{}{
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Average",
"refId": "C",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Average",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-2",
"metricName": "CPUUtilization",
"statistic": "Sum",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-2",
"metricName": "CPUUtilization",
"statistic": "Sum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "Minimum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "D",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "p12.21",
"refId": "D",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "default",
"metricName": "CPUUtilization",
"statistic": "p12.21",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -687,20 +743,24 @@ func TestV34(t *testing.T) {
"id": 5,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Sum",
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Sum",
"metricEditorMode": 0,
"metricQueryType": 0,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Min",
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-456"},
"namespace": "AWS/EC2",
"region": "us-west-1",
"metricName": "NetworkIn",
"statistic": "Min",
"metricEditorMode": 0,
"metricQueryType": 0,
},
},
},
@@ -709,6 +769,64 @@ func TestV34(t *testing.T) {
},
},
},
{
name: "preserves existing metricEditorMode and metricQueryType values",
input: map[string]interface{}{
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": []interface{}{"Average", "Maximum"},
"metricEditorMode": 1,
"metricQueryType": 1,
"period": "300",
"alias": "CPU Usage",
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": int(34),
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"targets": []interface{}{
map[string]interface{}{
"refId": "A",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Average",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 1,
"metricQueryType": 1,
},
map[string]interface{}{
"refId": "B",
"dimensions": map[string]interface{}{"InstanceId": "i-123"},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistic": "Maximum",
"period": "300",
"alias": "CPU Usage",
"metricEditorMode": 1,
"metricQueryType": 1,
},
},
},
},
},
},
}
runMigrationTests(t, tests, schemaversion.V34)
}
+153 -52
View File
@@ -1,8 +1,77 @@
package schemaversion
// V36 migrates dashboard datasource references from string names to UIDs.
// This migration converts datasource references in annotations, template variables, and panels
// from the old format (string name or UID) to the new format (object with uid, type, apiVersion).
// V36 migrates dashboard datasource references from legacy string format to structured UID-based objects.
//
// This migration addresses a critical evolution in Grafana's datasource architecture where datasource
// identification shifted from potentially ambiguous display names to reliable UIDs. The original format
// used string references that could break when datasources were renamed, moved between organizations,
// or when multiple datasources shared similar names. This created reliability and portability issues
// for dashboard sharing and automation workflows.
//
// The migration works by:
// 1. Processing annotations, template variables, and panels (including nested panels in rows)
// 2. Converting string datasource references to structured objects containing uid, type, and apiVersion
// 3. Handling null/missing datasource references by setting appropriate defaults
// 4. Maintaining consistency between panel and target datasource configurations
// 5. Preserving special datasource types like Mixed datasources and expression queries
//
// This transformation provides several critical benefits:
// - Eliminates datasource reference breakage when datasources are renamed
// - Enables reliable dashboard export/import across different Grafana instances
// - Supports advanced datasource features that require type and version information
// - Prepares the schema for future datasource management enhancements
// - Maintains backward compatibility while establishing a robust foundation
//
// The migration handles complex scenarios including:
// - Panels with missing datasource configuration (set to default)
// - Mixed datasource panels with heterogeneous targets
// - Expression queries that reference other queries
// - Template variables that depend on datasource queries
// - Annotation queries from various datasource types
//
// Example transformations:
//
// Before migration (string reference):
//
// datasource: "prometheus-prod"
// // or
// datasource: null
//
// After migration (structured object):
//
// datasource: {
// uid: "prometheus-uid-123",
// type: "prometheus",
// apiVersion: "v1"
// }
//
// Before migration (panel with targets):
//
// panel: {
// datasource: "CloudWatch",
// targets: [{
// datasource: null,
// refId: "A"
// }]
// }
//
// After migration (consistent references):
//
// panel: {
// datasource: {
// uid: "cloudwatch-uid-456",
// type: "cloudwatch",
// apiVersion: "v1"
// },
// targets: [{
// datasource: {
// uid: "cloudwatch-uid-456",
// type: "cloudwatch",
// apiVersion: "v1"
// },
// refId: "A"
// }]
// }
func V36(dsInfo DataSourceInfoProvider) SchemaVersionMigrationFunc {
datasources := dsInfo.GetDataSourceInfo()
return func(dashboard map[string]interface{}) error {
@@ -34,11 +103,8 @@ func migrateAnnotations(dashboard map[string]interface{}, datasources []DataSour
continue
}
ds, exists := queryMap["datasource"]
if !exists {
continue
}
// Always migrate datasource, even if it doesn't exist (will be set to default)
ds := queryMap["datasource"]
queryMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
}
@@ -55,6 +121,7 @@ func migrateTemplateVariables(dashboard map[string]interface{}, datasources []Da
return
}
defaultDS := GetDefaultDSInstanceSettings(datasources)
for _, variable := range list {
varMap, ok := variable.(map[string]interface{})
if !ok {
@@ -67,11 +134,12 @@ func migrateTemplateVariables(dashboard map[string]interface{}, datasources []Da
}
ds, exists := varMap["datasource"]
if !exists {
continue
// Handle null datasource variables by setting to default
if !exists || ds == nil {
varMap["datasource"] = GetDataSourceRef(defaultDS)
} else {
varMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
varMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
}
@@ -88,30 +156,68 @@ func migratePanels(dashboard map[string]interface{}, datasources []DataSourceInf
continue
}
migratePanelDatasources(panelMap, datasources)
// Handle nested panels in collapsed rows
nestedPanels, hasNested := panelMap["panels"].([]interface{})
if !hasNested {
continue
}
for _, nestedPanel := range nestedPanels {
np, ok := nestedPanel.(map[string]interface{})
if !ok {
continue
}
migratePanelDatasources(np, datasources)
}
}
}
// migratePanelDatasources updates datasource references in a single panel and its targets
func migratePanelDatasources(panelMap map[string]interface{}, datasources []DataSourceInfo) {
targets, hasTargets := panelMap["targets"].([]interface{})
if !hasTargets || len(targets) == 0 {
return
}
// NOTE: Even though row panels don't technically need datasource or targets fields,
// we process them anyway to exactly match frontend behavior and avoid inconsistencies
// between frontend and backend migrations. The frontend DashboardMigrator processes
// all panels uniformly without special row panel handling.
defaultDS := GetDefaultDSInstanceSettings(datasources)
panelDataSourceWasDefault := false
// Handle targets - treat empty arrays same as missing targets (matches frontend behavior)
targets, hasTargets := panelMap["targets"].([]interface{})
if !hasTargets || len(targets) == 0 {
targets = []interface{}{
map[string]interface{}{
"refId": "A",
},
}
panelMap["targets"] = targets
hasTargets = true
}
// Handle panel datasource
if ds, exists := panelMap["datasource"]; exists {
if ds == nil {
defaultDS := GetDefaultDSInstanceSettings(datasources)
ds, exists := panelMap["datasource"]
if !exists || ds == nil {
// Set to default if panel has targets (matches frontend logic)
panelMap["datasource"] = GetDataSourceRef(defaultDS)
panelDataSourceWasDefault = true
} else {
// Migrate existing non-null datasource (should be null after V33)
migrated := MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources)
if migrated == nil {
// If migration returned nil, set to default
panelMap["datasource"] = GetDataSourceRef(defaultDS)
panelDataSourceWasDefault = true
} else {
panelMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": true}, datasources)
panelMap["datasource"] = migrated
}
}
// Handle target datasources
if !hasTargets {
return
}
for _, target := range targets {
targetMap, ok := target.(map[string]interface{})
if !ok {
@@ -120,48 +226,43 @@ func migratePanelDatasources(panelMap map[string]interface{}, datasources []Data
ds, exists := targetMap["datasource"]
// Check if target datasource is null or has no uid
isNullOrNoUID := !exists || ds == nil
if !isNullOrNoUID {
dsMap, ok := ds.(map[string]interface{})
if ok {
uid, hasUID := dsMap["uid"]
if !hasUID || uid == nil {
isNullOrNoUID = true
}
// Check if target datasource is null, missing, or has no uid
needsDefault := false
if !exists || ds == nil {
needsDefault = true
} else if dsMap, ok := ds.(map[string]interface{}); ok {
uid, hasUID := dsMap["uid"]
if !hasUID || uid == nil {
needsDefault = true
}
}
if isNullOrNoUID {
// If panel doesn't have mixed datasource, use panel's datasource
if needsDefault {
// Use panel's datasource if it's not mixed
panelDS, ok := panelMap["datasource"].(map[string]interface{})
if !ok {
continue
}
uid, hasUID := panelDS["uid"].(string)
if hasUID && uid != "-- Mixed --" {
targetMap["datasource"] = panelDS
if ok {
uid, hasUID := panelDS["uid"].(string)
if hasUID && uid != "-- Mixed --" {
targetMap["datasource"] = panelDS
} else {
// If panel is mixed, migrate target datasource independently
targetMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
}
} else {
// Migrate existing target datasource
targetDS := MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
targetMap["datasource"] = targetDS
targetMap["datasource"] = MigrateDatasourceNameToRef(ds, map[string]bool{"returnDefaultAsNull": false}, datasources)
}
// Update panel datasource if it was default and target is not an expression
if !panelDataSourceWasDefault {
continue
}
targetDS, ok := targetMap["datasource"].(map[string]interface{})
if !ok {
continue
}
uid, ok := targetDS["uid"].(string)
if ok && uid != "__expr__" {
panelMap["datasource"] = targetDS
if panelDataSourceWasDefault {
targetDS, ok := targetMap["datasource"].(map[string]interface{})
if ok {
uid, ok := targetDS["uid"].(string)
if ok && uid != "__expr__" {
panelMap["datasource"] = targetDS
}
}
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,9 +1,76 @@
package schemaversion
// V37 normalizes legend configuration in panels to use a consistent format:
// - Converts boolean legend values to object format
// - Standardizes hidden legends to use showLegend: false with displayMode: list
// - Ensures visible legends have showLegend: true
// V37 normalizes legend configuration to use `showLegend` property consistently.
//
// This migration addresses inconsistencies in how legend visibility was handled.
// There were two ways to hide the legend:
// 1. Using displayMode: "hidden"
// 2. Using showLegend: false
//
// The migration normalizes both approaches to use showLegend consistently:
// - If displayMode is "hidden" OR showLegend is false, set displayMode to "list" and showLegend to false
// - For all other existing legend objects, ensure showLegend is true
//
// Note: This migration only processes legend configurations that already exist as objects.
// Boolean legend values are not processed by this migration.
//
// Example transformations:
//
// Before migration (hidden displayMode):
//
// options: {
// legend: {
// displayMode: "hidden",
// placement: "bottom"
// }
// }
//
// After migration:
//
// options: {
// legend: {
// displayMode: "list",
// showLegend: false,
// placement: "bottom"
// }
// }
//
// Before migration (showLegend false):
//
// options: {
// legend: {
// displayMode: "table",
// showLegend: false
// }
// }
//
// After migration:
//
// options: {
// legend: {
// displayMode: "list",
// showLegend: false
// }
// }
//
// Before migration (visible legend):
//
// options: {
// legend: {
// displayMode: "table",
// placement: "bottom"
// }
// }
//
// After migration:
//
// options: {
// legend: {
// displayMode: "table",
// placement: "bottom",
// showLegend: true
// }
// }
func V37(dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = int(37)
@@ -12,51 +79,50 @@ func V37(dashboard map[string]interface{}) error {
return nil
}
// Process all panels, including nested ones
processPanelsV37(panels)
return nil
}
// processPanelsV37 recursively processes panels, including nested panels within rows
func processPanelsV37(panels []interface{}) {
for _, panel := range panels {
p, ok := panel.(map[string]interface{})
if !ok {
continue
}
// Process nested panels if this is a row panel
if p["type"] == "row" {
if nestedPanels, ok := p["panels"].([]interface{}); ok {
processPanelsV37(nestedPanels)
}
continue
}
options, ok := p["options"].(map[string]interface{})
if !ok {
continue
}
// Skip if no legend config exists
// Only process legend if it exists and is an object (not boolean)
legendValue := options["legend"]
if legendValue == nil {
continue
}
// Convert boolean legend to object format
if legendBool, ok := legendValue.(bool); ok {
options["legend"] = map[string]interface{}{
"displayMode": "list",
"showLegend": legendBool,
}
continue
}
// Handle object format legend
legend, ok := legendValue.(map[string]interface{})
if !ok {
if !ok || legend == nil {
continue
}
displayMode, hasDisplayMode := legend["displayMode"].(string)
displayMode, _ := legend["displayMode"].(string)
showLegend, hasShowLegend := legend["showLegend"].(bool)
// Normalize hidden legends
if (hasDisplayMode && displayMode == "hidden") || (hasShowLegend && !showLegend) {
// If displayMode is "hidden" OR showLegend is false, normalize to hidden legend
if displayMode == "hidden" || (hasShowLegend && !showLegend) {
legend["displayMode"] = "list"
legend["showLegend"] = false
continue
} else {
// For all other cases, ensure showLegend is true
legend["showLegend"] = true
}
// Ensure visible legends have showLegend true
legend["showLegend"] = true
}
return nil
}
@@ -9,96 +9,186 @@ import (
func TestV37(t *testing.T) {
tests := []migrationTestCase{
{
name: "no legend config",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"options": map[string]interface{}{},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"options": map[string]interface{}{},
},
},
},
},
{
name: "boolean legend true",
name: "legend normalization with nested panels",
input: map[string]interface{}{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 36,
"panels": []interface{}{
// Boolean legend true (should remain unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": map[string]interface{}{
"legend": true,
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": true,
},
},
},
},
},
},
{
name: "boolean legend false",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
// Boolean legend false (should remain unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": map[string]interface{}{
"legend": false,
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
},
},
},
{
name: "hidden displayMode",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
// Hidden displayMode (should be normalized)
map[string]interface{}{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "hidden",
"placement": "bottom",
},
},
},
// ShowLegend false (should be normalized)
map[string]interface{}{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"showLegend": false,
},
},
},
// Valid legend with table displayMode (should get showLegend: true)
map[string]interface{}{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"placement": "bottom",
},
},
},
// Valid legend with list displayMode (should get showLegend: true)
map[string]interface{}{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"placement": "right",
},
},
},
// Panel with no options (should remain unchanged)
map[string]interface{}{
"type": "text",
"title": "Panel with No Options",
"id": 7,
},
// Panel with no legend config (should remain unchanged)
map[string]interface{}{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": map[string]interface{}{
"reduceOptions": map[string]interface{}{
"fields": "/.*temperature.*/",
},
},
},
// Panel with nil legend (should remain unchanged)
map[string]interface{}{
"type": "piechart",
"title": "Panel with Nil Legend",
"id": 9,
"options": map[string]interface{}{
"legend": nil,
},
},
// Row with nested panels
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": []interface{}{
// Nested panel with boolean legend (should remain unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": map[string]interface{}{
"legend": true,
},
},
// Nested panel with hidden displayMode (should be normalized)
map[string]interface{}{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "hidden",
},
},
},
// Nested panel with showLegend false (should be normalized)
map[string]interface{}{
"type": "stat",
"title": "Nested Panel with ShowLegend False",
"id": 13,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"showLegend": false,
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 37,
"panels": []interface{}{
// Boolean legend true (unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": map[string]interface{}{
"legend": true,
},
},
// Boolean legend false (unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": map[string]interface{}{
"legend": false,
},
},
// Hidden displayMode (normalized)
map[string]interface{}{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
"placement": "bottom",
},
},
},
// ShowLegend false (normalized)
map[string]interface{}{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
@@ -106,62 +196,100 @@ func TestV37(t *testing.T) {
},
},
},
},
},
},
{
name: "showLegend false",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"showLegend": false,
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
},
},
},
{
name: "visible legend",
input: map[string]interface{}{
"schemaVersion": 36,
"panels": []interface{}{
map[string]interface{}{
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Valid legend with table displayMode (showLegend added)
map[string]interface{}{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
},
},
// Valid legend with list displayMode (showLegend added)
map[string]interface{}{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"placement": "right",
"showLegend": true,
},
},
},
// Panel with no options (unchanged)
map[string]interface{}{
"type": "text",
"title": "Panel with No Options",
"id": 7,
},
// Panel with no legend config (unchanged)
map[string]interface{}{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": map[string]interface{}{
"reduceOptions": map[string]interface{}{
"fields": "/.*temperature.*/",
},
},
},
// Panel with nil legend (unchanged)
map[string]interface{}{
"type": "piechart",
"title": "Panel with Nil Legend",
"id": 9,
"options": map[string]interface{}{
"legend": nil,
},
},
// Row with nested panels (nested panels processed)
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": []interface{}{
// Nested panel with boolean legend (unchanged)
map[string]interface{}{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": map[string]interface{}{
"legend": true,
},
},
// Nested panel with hidden displayMode (normalized)
map[string]interface{}{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
// Nested panel with showLegend false (normalized)
map[string]interface{}{
"type": "stat",
"title": "Nested Panel with ShowLegend False",
"id": 13,
"options": map[string]interface{}{
"legend": map[string]interface{}{
"displayMode": "list",
"showLegend": false,
},
},
},
},
},
},
},
},
@@ -1,7 +1,75 @@
package schemaversion
// V38 updates the configuration of the table panel to use the new cellOptions format
// and updates the overrides to use the new cellOptions format
// V38 migrates table panel configuration from displayMode to the structured cellOptions format.
//
// This migration addresses limitations in the original table panel cell display configuration where
// the flat displayMode string property could not accommodate the growing complexity of cell rendering
// options. The original design forced all display settings into a single string value, making it
// difficult to add new customization parameters or provide mode-specific configuration options.
//
// The migration works by:
// 1. Locating table panels in the dashboard (including nested panels within rows)
// 2. Examining field configuration defaults and any field overrides for displayMode properties
// 3. Converting string displayMode values to structured cellOptions objects with type and mode
// 4. Updating both field defaults and field override references to use the new property path
// 5. Preserving all existing visual behavior while enabling future cell customization features
//
// This restructuring provides several key benefits:
// - Enables mode-specific configuration options (e.g., gauge thresholds, color schemes)
// - Supports future cell rendering types without breaking existing configurations
// - Provides clearer separation between cell type and rendering mode
// - Maintains backward compatibility while preparing for enhanced table functionality
//
// The migration handles special cases for legacy gauge modes and color background variants,
// ensuring all existing display behaviors are preserved exactly.
//
// Example transformations:
//
// Before migration (field defaults):
//
// fieldConfig: {
// defaults: {
// custom: {
// displayMode: "gradient-gauge"
// }
// }
// }
//
// After migration (field defaults):
//
// fieldConfig: {
// defaults: {
// custom: {
// cellOptions: {
// type: "gauge",
// mode: "gradient"
// }
// }
// }
// }
//
// Before migration (field override):
//
// overrides: [{
// matcher: { id: "byName", options: "CPU" },
// properties: [{
// id: "custom.displayMode",
// value: "color-background-solid"
// }]
// }]
//
// After migration (field override):
//
// overrides: [{
// matcher: { id: "byName", options: "CPU" },
// properties: [{
// id: "custom.cellOptions",
// value: {
// type: "color-background",
// mode: "basic"
// }
// }]
// }]
func V38(dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = int(38)
@@ -10,12 +78,28 @@ func V38(dashboard map[string]interface{}) error {
return nil
}
// Process all panels, including nested ones
processPanelsV38(panels)
return nil
}
// processPanelsV38 recursively processes panels, including nested panels within rows
func processPanelsV38(panels []interface{}) {
for _, panel := range panels {
p, ok := panel.(map[string]interface{})
if !ok {
continue
}
// Process nested panels if this is a row panel
if p["type"] == "row" {
if nestedPanels, ok := p["panels"].([]interface{}); ok {
processPanelsV38(nestedPanels)
}
continue
}
// Only process table panels
if p["type"] != "table" {
continue
@@ -48,8 +132,6 @@ func V38(dashboard map[string]interface{}) error {
// Update any overrides referencing the cell display mode
migrateOverrides(fieldConfig)
}
return nil
}
// migrateOverrides updates the overrides configuration to use the new cellOptions format
@@ -9,50 +9,213 @@ import (
func TestV38(t *testing.T) {
tests := []migrationTestCase{
{
name: "no table panels",
input: map[string]interface{}{
"schemaVersion": 37,
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"title": "Panel 1",
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "graph",
"title": "Panel 1",
},
},
},
},
{
name: "table panel with basic gauge displayMode",
name: "table migration with nested panels",
input: map[string]interface{}{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 37,
"panels": []interface{}{
// Basic gauge table
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "basic",
},
},
"overrides": []interface{}{},
},
},
// Gradient gauge table
map[string]interface{}{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "gradient-gauge",
},
},
"overrides": []interface{}{},
},
},
// LCD gauge table
map[string]interface{}{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "lcd-gauge",
},
},
"overrides": []interface{}{},
},
},
// Color background table
map[string]interface{}{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background",
},
},
"overrides": []interface{}{},
},
},
// Color background solid table
map[string]interface{}{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background-solid",
},
},
"overrides": []interface{}{},
},
},
// Unknown mode table
map[string]interface{}{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "some-other-mode",
},
},
"overrides": []interface{}{},
},
},
// Table with no display mode
map[string]interface{}{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"width": 100,
},
},
"overrides": []interface{}{},
},
},
// Table with overrides
map[string]interface{}{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "basic",
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field1",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.displayMode",
"value": "gradient-gauge",
},
},
},
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field2",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.displayMode",
"value": "color-background",
},
},
},
},
},
},
// Non-table panel (should remain unchanged)
map[string]interface{}{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9,
},
// Row with nested table panels
map[string]interface{}{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "basic",
},
},
"overrides": []interface{}{},
},
},
map[string]interface{}{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "gradient-gauge",
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "NestedField",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.displayMode",
"value": "lcd-gauge",
},
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 38,
"panels": []interface{}{
// Basic gauge table (migrated)
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -62,33 +225,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with gradient-gauge displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Gradient gauge table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "gradient-gauge",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -98,33 +242,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with lcd-gauge displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// LCD gauge table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "lcd-gauge",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -134,33 +259,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with color-background displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Color background table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -170,33 +276,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with color-background-solid displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Color background solid table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "color-background-solid",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -206,33 +293,14 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
},
},
},
{
name: "table panel with default displayMode",
input: map[string]interface{}{
"schemaVersion": 37,
"panels": []interface{}{
// Unknown mode table (migrated)
map[string]interface{}{
"type": "table",
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"displayMode": "some-other-mode",
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 38,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
@@ -241,6 +309,132 @@ func TestV38(t *testing.T) {
},
},
},
"overrides": []interface{}{},
},
},
// Table with no display mode (unchanged)
map[string]interface{}{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"width": 100,
},
},
"overrides": []interface{}{},
},
},
// Table with overrides (migrated)
map[string]interface{}{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"cellOptions": map[string]interface{}{
"type": "gauge",
"mode": "basic",
},
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field1",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.cellOptions",
"value": map[string]interface{}{
"type": "gauge",
"mode": "gradient",
},
},
},
},
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field2",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.cellOptions",
"value": map[string]interface{}{
"type": "color-background",
"mode": "gradient",
},
},
},
},
},
},
},
// Non-table panel (unchanged)
map[string]interface{}{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9,
},
// Row with nested table panels (nested tables migrated)
map[string]interface{}{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"cellOptions": map[string]interface{}{
"type": "gauge",
"mode": "basic",
},
},
},
"overrides": []interface{}{},
},
},
map[string]interface{}{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": map[string]interface{}{
"defaults": map[string]interface{}{
"custom": map[string]interface{}{
"cellOptions": map[string]interface{}{
"type": "gauge",
"mode": "gradient",
},
},
},
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "NestedField",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.cellOptions",
"value": map[string]interface{}{
"type": "gauge",
"mode": "lcd",
},
},
},
},
},
},
},
},
},
},
@@ -1,7 +1,50 @@
package schemaversion
// V39 updates the configuration of the Timeseries to table transformation
// to support multiple options per query
// V39 migrates timeSeriesTable transformation configuration to support extensible per-query options.
//
// This migration addresses limitations in the original timeSeriesTable transformation design where
// each query could only be configured with a single statistic function. The original refIdToStat
// format was too restrictive for evolving use cases that require multiple configuration parameters
// per query, such as custom formatting, aggregation methods, or display preferences.
//
// The migration works by:
// 1. Locating panels with timeSeriesTable transformations (including nested panels in rows)
// 2. Extracting the existing refIdToStat mapping from transformation options
// 3. Converting each refId-statistic pair to the new nested object structure
// 4. Preserving the statistic function while enabling future option expansion
// 5. Skipping transformations that lack valid refIdToStat configuration
//
// This restructuring enables future enhancements while maintaining backward compatibility:
// - Additional per-query options can be added without breaking existing configurations
// - The stat property preserves current functionality exactly as before
// - New features like custom labels, formats, or calculations can be added seamlessly
// - The structure scales better for complex multi-query transformations
//
// Example transformation:
//
// Before migration:
//
// transformations: [{
// id: "timeSeriesTable",
// options: {
// refIdToStat: {
// "A": "mean",
// "B": "max",
// "C": "last"
// }
// }
// }]
//
// After migration:
//
// transformations: [{
// id: "timeSeriesTable",
// options: {
// "A": { stat: "mean" },
// "B": { stat: "max" },
// "C": { stat: "last" }
// }
// }]
func V39(dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = int(39)
@@ -10,12 +53,28 @@ func V39(dashboard map[string]interface{}) error {
return nil
}
// Process all panels, including nested ones
processPanelsV39(panels)
return nil
}
// processPanelsV39 recursively processes panels, including nested panels within rows
func processPanelsV39(panels []interface{}) {
for _, panel := range panels {
p, ok := panel.(map[string]interface{})
if !ok {
continue
}
// Process nested panels if this is a row panel
if p["type"] == "row" {
if nestedPanels, ok := p["panels"].([]interface{}); ok {
processPanelsV39(nestedPanels)
}
continue
}
transformations, ok := p["transformations"].([]interface{})
if !ok {
continue
@@ -55,6 +114,4 @@ func V39(dashboard map[string]interface{}) error {
t["options"] = transformationOptions
}
}
return nil
}
@@ -9,32 +9,32 @@ import (
func TestV39(t *testing.T) {
tests := []migrationTestCase{
{
name: "no transformations",
input: map[string]interface{}{
"schemaVersion": 38,
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"title": "Panel 1",
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"panels": []interface{}{
map[string]interface{}{
"title": "Panel 1",
},
},
},
},
{
name: "timeSeriesTable transformation with refIdToStat",
name: "comprehensive timeSeriesTable transformation migration with nested panels",
input: map[string]interface{}{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 38,
"panels": []interface{}{
// Single stat timeSeriesTable
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "mean",
},
},
},
},
},
// Multiple stats timeSeriesTable
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
@@ -42,6 +42,121 @@ func TestV39(t *testing.T) {
"refIdToStat": map[string]interface{}{
"A": "mean",
"B": "max",
"C": "min",
"D": "sum",
},
},
},
},
},
// Mixed transformations
map[string]interface{}{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": []interface{}{
map[string]interface{}{
"id": "reduce",
"options": map[string]interface{}{
"reducers": []interface{}{"mean"},
},
},
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "last",
"B": "first",
},
},
},
map[string]interface{}{
"id": "organize",
"options": map[string]interface{}{
"excludeByName": map[string]interface{}{},
},
},
},
},
// Non-timeSeriesTable transformation
map[string]interface{}{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": []interface{}{
map[string]interface{}{
"id": "reduce",
"options": map[string]interface{}{
"reducers": []interface{}{"mean", "max"},
},
},
},
},
// Empty refIdToStat
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{},
},
},
},
},
// No options (should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
},
},
},
// Invalid options (should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"someOtherOption": "value",
},
},
},
},
// No transformations
map[string]interface{}{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8,
},
// Row with nested panels
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"NestedA": "median",
"NestedB": "stdDev",
},
},
},
},
},
@@ -50,9 +165,30 @@ func TestV39(t *testing.T) {
},
},
expected: map[string]interface{}{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 39,
"panels": []interface{}{
// Single stat timeSeriesTable (migrated)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"A": map[string]interface{}{
"stat": "mean",
},
},
},
},
},
// Multiple stats timeSeriesTable (migrated)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
@@ -63,41 +199,126 @@ func TestV39(t *testing.T) {
"B": map[string]interface{}{
"stat": "max",
},
},
},
},
},
},
},
},
{
name: "non-timeSeriesTable transformation is not modified",
input: map[string]interface{}{
"panels": []interface{}{
map[string]interface{}{
"transformations": []interface{}{
map[string]interface{}{
"id": "otherTransform",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "mean",
"C": map[string]interface{}{
"stat": "min",
},
"D": map[string]interface{}{
"stat": "sum",
},
},
},
},
},
},
},
expected: map[string]interface{}{
"schemaVersion": 39,
"panels": []interface{}{
// Mixed transformations (timeSeriesTable migrated, others unchanged)
map[string]interface{}{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": []interface{}{
map[string]interface{}{
"id": "otherTransform",
"id": "reduce",
"options": map[string]interface{}{
"refIdToStat": map[string]interface{}{
"A": "mean",
"reducers": []interface{}{"mean"},
},
},
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"A": map[string]interface{}{
"stat": "last",
},
"B": map[string]interface{}{
"stat": "first",
},
},
},
map[string]interface{}{
"id": "organize",
"options": map[string]interface{}{
"excludeByName": map[string]interface{}{},
},
},
},
},
// Non-timeSeriesTable transformation (unchanged)
map[string]interface{}{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": []interface{}{
map[string]interface{}{
"id": "reduce",
"options": map[string]interface{}{
"reducers": []interface{}{"mean", "max"},
},
},
},
},
// Empty refIdToStat (migrated to empty options)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{},
},
},
},
// No options (unchanged - should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
},
},
},
// Invalid options (unchanged - should skip)
map[string]interface{}{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"someOtherOption": "value",
},
},
},
},
// No transformations (unchanged)
map[string]interface{}{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8,
},
// Row with nested panels (nested panel migrated)
map[string]interface{}{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": []interface{}{
map[string]interface{}{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": []interface{}{
map[string]interface{}{
"id": "timeSeriesTable",
"options": map[string]interface{}{
"NestedA": map[string]interface{}{
"stat": "median",
},
"NestedB": map[string]interface{}{
"stat": "stdDev",
},
},
},
},
},
@@ -1,5 +1,38 @@
package schemaversion
// V40 normalizes the dashboard refresh property to ensure consistent string typing.
//
// This migration addresses type inconsistencies in dashboard refresh configuration that could
// cause runtime errors or unexpected behavior. Over time, the refresh property has accumulated
// various data types (boolean, numeric, null, undefined) due to different dashboard creation
// methods, API usage patterns, and legacy imports.
//
// The migration works by:
// 1. Checking if the refresh property exists and is already a string type
// 2. Converting any non-string values (boolean true/false, numbers, null) to an empty string
// 3. Ensuring all dashboards have a consistent string-typed refresh property
//
// This normalization is critical because:
// - The frontend refresh logic expects string values for parsing time intervals
// - Non-string values can cause dashboard loading failures
// - Empty string is the standard representation for "no auto-refresh"
// - Consistent typing enables proper validation and UI behavior
//
// Example transformations:
//
// Before migration:
//
// refresh: true // boolean
// refresh: 30 // number (seconds)
// refresh: null // null value
// refresh: undefined // missing property
//
// After migration:
//
// refresh: "" // normalized to empty string
// refresh: "" // normalized to empty string
// refresh: "" // normalized to empty string
// refresh: "" // property added with empty string
func V40(dash map[string]interface{}) error {
dash["schemaVersion"] = int(40)
if _, ok := dash["refresh"].(string); !ok {
@@ -20,7 +20,7 @@ func TestV40(t *testing.T) {
},
},
{
name: "boolean refresh value is converted to an empty string",
name: "boolean refresh value (true) is converted to an empty string",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
@@ -32,6 +32,19 @@ func TestV40(t *testing.T) {
"refresh": "",
},
},
{
name: "boolean refresh value (false) is converted to an empty string",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"refresh": false,
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 40,
"refresh": "",
},
},
{
name: "string refresh value is not converted",
input: map[string]interface{}{
@@ -45,6 +58,32 @@ func TestV40(t *testing.T) {
"refresh": "1m",
},
},
{
name: "empty string refresh value is preserved",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"refresh": "",
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 40,
"refresh": "",
},
},
{
name: "numeric refresh value is converted to empty string",
input: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 39,
"refresh": 60,
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 40,
"refresh": "",
},
},
}
runMigrationTests(t, tests, schemaversion.V40)
@@ -1,5 +1,35 @@
package schemaversion
// V41 removes the deprecated time_options property from dashboard timepicker configuration.
//
// This migration addresses technical debt by cleaning up legacy timepicker settings that have
// been obsolete since Grafana version 5. The time_options property was originally designed to
// allow customization of predefined time range options in the time picker dropdown, but this
// functionality was superseded by more flexible time selection mechanisms.
//
// The migration works by:
// 1. Locating dashboard timepicker configuration objects
// 2. Removing the deprecated time_options property if present
// 3. Preserving all other timepicker settings (refresh_intervals, etc.)
//
// This cleanup prevents potential confusion for developers and ensures the dashboard schema
// remains focused on actively used configuration options. The removal is safe because the
// time_options property has had no functional impact for several major Grafana versions.
//
// Example transformation:
//
// Before migration:
//
// timepicker: {
// refresh_intervals: ["5s", "10s", "30s", "1m"],
// time_options: ["5m", "15m", "1h", "6h", "12h", "24h"]
// }
//
// After migration:
//
// timepicker: {
// refresh_intervals: ["5s", "10s", "30s", "1m"]
// }
func V41(dash map[string]interface{}) error {
dash["schemaVersion"] = int(41)
if timepicker, ok := dash["timepicker"].(map[string]interface{}); ok {
@@ -22,6 +22,22 @@ func TestV41(t *testing.T) {
"timepicker": map[string]interface{}{},
},
},
{
name: "timepicker without time_options is unchanged",
input: map[string]interface{}{
"title": "Test Dashboard",
"timepicker": map[string]interface{}{
"refresh_intervals": []string{"5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 41,
"timepicker": map[string]interface{}{
"refresh_intervals": []string{"5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"},
},
},
},
{
name: "timepicker is not set",
input: map[string]interface{}{
@@ -1,561 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"name": "CloudWatch Annotation Single Stat",
"enable": true,
"iconColor": "red",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Stats",
"enable": true,
"iconColor": "blue",
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Stats",
"id": 11,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"targets": [
{
"refId": "A",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300",
"alias": "CPU Usage"
}
]
},
{
"type": "timeseries",
"title": "Mixed CloudWatch and Prometheus Queries",
"id": 12,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"targets": [
{
"refId": "A",
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum", "Average"]
},
{
"refId": "B",
"expr": "up",
"datasource": "prometheus"
},
{
"refId": "C",
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistics": ["Maximum"]
}
]
},
{
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"id": 13,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"panels": [
{
"type": "timeseries",
"title": "Nested CloudWatch Panel",
"id": 14,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"refId": "A",
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum", "Sum"]
}
]
}
]
},
{
"type": "stat",
"title": "V33: Panel with Null Datasource",
"id": 15,
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"targets": [
{
"refId": "A",
"datasource": "non-default-test-ds-uid"
}
]
},
{
"type": "stat",
"title": "V33: Panel with Existing Datasource Reference",
"id": 16,
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
}
}
]
},
{
"type": "table",
"title": "V33: Panel without Targets",
"id": 17,
"datasource": "Non Default Test Datasource",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
}
},
{
"type": "table",
"title": "V33: Panel with Empty Targets Array",
"id": 18,
"datasource": "default",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"targets": []
},
{
"type": "graph",
"title": "V33: Target Datasource Edge Cases",
"id": 19,
"datasource": "non-default-test-ds-uid",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"targets": [
{
"refId": "A",
"datasource": null
},
{
"refId": "B",
"datasource": "default"
},
{
"refId": "C",
"datasource": "non-existing-ds"
},
{
"refId": "D"
}
]
},
{
"type": "timeseries",
"title": "V33: Mixed Target References",
"id": 20,
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-ref",
"type": "prometheus"
}
},
{
"refId": "B",
"datasource": "Non Default Test Datasource"
},
{
"refId": "C",
"datasource": "default"
}
]
},
{
"type": "stat",
"title": "V33: Panel with Empty String Datasource",
"id": 21,
"datasource": "",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"targets": [
{
"refId": "A",
"datasource": ""
}
]
},
{
"type": "table",
"title": "V33: Panel with Another Non-existing Datasource",
"id": 22,
"datasource": "completely-missing-ds",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"targets": [
{
"refId": "A",
"datasource": "also-missing-ds"
},
{
"refId": "B",
"datasource": ""
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 32,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
},
{
"type": "query",
"datasource": "",
"name": "empty_string_var"
},
{
"type": "query",
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,375 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"name": "CloudWatch Annotation Single Stat",
"enable": true,
"iconColor": "red",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Stats",
"enable": true,
"iconColor": "blue",
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Stats",
"id": 11,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"targets": [
{
"refId": "A",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300",
"alias": "CPU Usage"
}
]
},
{
"type": "timeseries",
"title": "Mixed CloudWatch and Prometheus Queries",
"id": 12,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"targets": [
{
"refId": "A",
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum", "Average"]
},
{
"refId": "B",
"expr": "up",
"datasource": "prometheus"
},
{
"refId": "C",
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistics": ["Maximum"]
}
]
},
{
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"id": 13,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"panels": [
{
"type": "timeseries",
"title": "Nested CloudWatch Panel",
"id": 14,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"refId": "A",
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum", "Sum"]
}
]
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 33,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,251 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,231 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,125 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,362 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "basic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "gradient-gauge"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "lcd-gauge"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "color-background"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "color-background-solid"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "some-other-mode"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,155 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean",
"B": "max"
}
}
}
],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,136 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": "",
"refresh": true,
"schemaVersion": 39
}
@@ -1,136 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": "",
"refresh": "",
"schemaVersion": 40
}
@@ -0,0 +1,166 @@
{
"schemaVersion": 32,
"title": "V33 Panel Datasource Name to Ref Test",
"panels": [
{
"type": "stat",
"title": "Panel Datasource: null → should stay null",
"description": "Tests v33 migration behavior when panel datasource is explicitly null. Should remain null after migration (returnDefaultAsNull: true).",
"id": 1,
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": "non-default-test-ds-uid",
"description": "Target with UID reference should migrate to full object"
}
]
},
{
"type": "stat",
"title": "Panel Datasource: existing object → should stay unchanged",
"description": "Tests v33 migration behavior when panel datasource is already a proper object reference. Should remain unchanged.",
"id": 2,
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
},
"description": "Target with existing object should remain unchanged"
}
]
},
{
"type": "table",
"title": "Panel Datasource: string name → should migrate to object",
"description": "Tests v33 migration when panel datasource is a string name. Should convert to proper object with uid, type, apiVersion.",
"id": 3,
"datasource": "Non Default Test Datasource Name"
},
{
"type": "table",
"title": "Panel Datasource: string name with empty targets → should migrate",
"description": "Tests v33 migration when panel has datasource string but empty targets array. Panel datasource should still migrate.",
"id": 4,
"datasource": "Default Test Datasource Name",
"targets": []
},
{
"type": "graph",
"title": "Target Datasources: mixed null/string/non-existing scenarios",
"description": "Tests v33 target migration with various edge cases: null target (unchanged), valid string (migrated), non-existing string (preserved), missing datasource field (unchanged).",
"id": 5,
"datasource": "non-default-test-ds-uid",
"targets": [
{
"refId": "A",
"datasource": null,
"description": "Null target datasource should remain null"
},
{
"refId": "B",
"datasource": "Default Test Datasource Name",
"description": "Valid string should migrate to object"
},
{
"refId": "C",
"datasource": "non-existing-ds",
"description": "Non-existing datasource should be preserved as-is (migration returns nil)"
},
{
"refId": "D",
"description": "Target without datasource field should remain unchanged"
}
]
},
{
"type": "timeseries",
"title": "Panel: null datasource with mixed target types",
"description": "Tests v33 migration when panel datasource is null but targets have mixed reference types (object, string). Panel should stay null, targets should migrate appropriately.",
"id": 6,
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-ref",
"type": "prometheus"
},
"description": "Existing object target should remain unchanged"
},
{
"refId": "B",
"datasource": "Non Default Test Datasource Name",
"description": "String target should migrate to object"
},
{
"refId": "C",
"datasource": "Default Test Datasource Name",
"description": "Default datasource string should migrate to object"
}
]
},
{
"type": "stat",
"title": "Empty string datasource → should return empty object {}",
"description": "Tests v33 migration behavior with empty string datasource. Should migrate to empty object {} based on MigrateDatasourceNameToRef logic.",
"id": 7,
"datasource": "",
"targets": [
{
"refId": "A",
"datasource": "",
"description": "Empty string target should also migrate to empty object {}"
}
]
},
{
"type": "table",
"title": "Non-existing datasources → should be preserved as-is",
"description": "Tests v33 migration with completely unknown datasource names. Since migration returns nil for unknown datasources, they should be preserved unchanged.",
"id": 8,
"datasource": "completely-missing-ds",
"targets": [
{
"refId": "A",
"datasource": "also-missing-ds",
"description": "Unknown target datasource should remain unchanged (migration returns nil)"
},
{
"refId": "B",
"datasource": "",
"description": "Empty string target should migrate to {}"
}
]
},
{
"type": "row",
"title": "Row Panel: nested panels should also migrate",
"description": "Tests v33 migration handles nested panels within collapsed rows. Nested panel datasources should migrate same as top-level panels.",
"id": 9,
"collapsed": true,
"panels": [
{
"type": "timeseries",
"title": "Nested Panel: string datasource → should migrate to object",
"description": "Nested panel with string datasource should migrate to proper object reference, proving row panel recursion works.",
"id": 10,
"datasource": "Non Default Test Datasource Name",
"targets": [
{
"refId": "A",
"datasource": "Default Test Datasource Name",
"description": "Nested target should also migrate from string to object"
}
]
}
]
}
]
}
@@ -0,0 +1,366 @@
{
"title": "CloudWatch Multiple Statistics Test Dashboard",
"schemaVersion": 33,
"annotations": {
"list": [
{
"name": "CloudWatch Annotation Single Statistic",
"enable": true,
"iconColor": "red",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Statistics",
"enable": true,
"iconColor": "blue",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
},
{
"name": "CloudWatch Annotation Empty Statistics",
"enable": true,
"iconColor": "green",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"LoadBalancer": "my-lb"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-1",
"prefixMatching": false,
"statistics": []
},
{
"name": "CloudWatch Annotation Invalid Statistics",
"enable": true,
"iconColor": "yellow",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"TableName": "my-table"
},
"namespace": "AWS/DynamoDB",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["InvalidStat", "Sum", null, "Average"]
},
{
"name": "Non-CloudWatch Annotation",
"enable": true,
"iconColor": "purple",
"datasource": {
"uid": "prometheus"
}
}
]
},
"panels": [
{
"id": 1,
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300"
}
]
},
{
"id": 2,
"type": "timeseries",
"title": "CloudWatch Single Query Single Statistic",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum"]
}
]
},
{
"id": 3,
"type": "timeseries",
"title": "CloudWatch Query No Statistics Array",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistic": "Maximum"
}
]
},
{
"id": 4,
"type": "timeseries",
"title": "Mixed CloudWatch and Non-CloudWatch Queries",
"datasource": {
"uid": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum"]
},
{
"refId": "B",
"expr": "up",
"datasource": {
"uid": "prometheus"
}
},
{
"refId": "C",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"TopicName": "my-topic"
},
"namespace": "AWS/SNS",
"region": "us-west-1",
"metricName": "NumberOfMessagesPublished",
"statistics": ["Sum"]
}
]
},
{
"id": 5,
"type": "timeseries",
"title": "CloudWatch Query Empty Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"BucketName": "my-bucket"
},
"namespace": "AWS/S3",
"region": "us-east-1",
"metricName": "BucketSizeBytes",
"statistics": []
}
]
},
{
"id": 6,
"type": "timeseries",
"title": "CloudWatch Query Invalid Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"FunctionName": "my-function"
},
"namespace": "AWS/Lambda",
"region": "us-west-2",
"metricName": "Duration",
"statistics": ["InvalidStat", "Average", null, "Maximum", ""]
}
]
},
{
"id": 7,
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
}
}
],
"panels": [
{
"id": 8,
"type": "timeseries",
"title": "Nested CloudWatch Query Multiple Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"StreamName": "my-stream"
},
"namespace": "AWS/Kinesis",
"region": "us-east-1",
"metricName": "IncomingRecords",
"statistics": ["Sum", "Average", "Maximum"]
}
]
}
]
},
{
"id": 9,
"type": "timeseries",
"title": "CloudWatch Query with Existing Editor Mode",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"ClusterName": "my-cluster"
},
"namespace": "AWS/ECS",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum"],
"metricEditorMode": 1,
"metricQueryType": 1,
"period": "300"
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Non-CloudWatch Panel",
"datasource": {
"uid": "prometheus"
},
"targets": [
{
"refId": "A",
"expr": "cpu_usage",
"datasource": {
"uid": "prometheus"
}
}
]
}
]
}
@@ -0,0 +1,100 @@
{
"title": "X-Axis Visibility Test Dashboard",
"schemaVersion": 34,
"panels": [
{
"title": "Timeseries with Hidden Axis",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"title": "Timeseries with Hidden Axis and Existing Overrides",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Series A"
},
"properties": [
{
"id": "color.mode",
"value": "palette-classic"
}
]
}
]
}
},
{
"title": "Timeseries with Auto Axis (No Change Expected)",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto"
}
},
"overrides": []
}
},
{
"title": "Stat Panel with Hidden Axis (No Change Expected)",
"type": "stat",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"title": "Timeseries with Missing FieldConfig",
"type": "timeseries",
"id": 5
},
{
"title": "Timeseries with Missing Defaults",
"type": "timeseries",
"fieldConfig": {
"overrides": []
}
},
{
"title": "Timeseries with Missing Custom Config",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"unit": "bytes"
},
"overrides": []
}
},
{
"title": "Timeseries with Missing Overrides Array",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
}
}
}
]
}
@@ -0,0 +1,286 @@
{
"title": "Datasource Reference Migration Test Dashboard",
"schemaVersion": 35,
"annotations": {
"list": [
{
"name": "Default Annotation - Tests default datasource migration",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
}
},
{
"name": "Named Datasource Annotation - Tests migration by datasource name",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "UID Datasource Annotation - Tests migration by datasource UID",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "Null Datasource Annotation - Tests null datasource fallback to default",
"datasource": null
},
{
"name": "Unknown Datasource Annotation - Tests unknown datasource preserved as UID",
"datasource": {
"uid": "unknown-datasource-name"
}
}
]
},
"templating": {
"list": [
{
"name": "query_var_null",
"type": "query",
"datasource": null
},
{
"name": "query_var_named",
"type": "query",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "query_var_uid",
"type": "query",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "query_var_unknown",
"type": "query",
"datasource": {
"uid": "unknown-datasource"
}
},
{
"name": "non_query_var",
"type": "constant",
"datasource": null
}
]
},
"panels": [
{
"id": 1,
"title": "Panel with Null Datasource and Targets",
"description": "Tests null panel datasource migration with targets - should fallback to default",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": null
}
]
},
{
"id": 2,
"title": "Panel with Null Datasource and Empty Targets",
"description": "Tests null panel datasource with empty targets array - should create default target",
"datasource": null,
"targets": []
},
{
"id": 3,
"title": "Panel with No Targets Array",
"description": "Tests null panel datasource with missing targets - should create default target array",
"datasource": null
},
{
"id": 4,
"title": "Panel with Mixed Datasources",
"description": "Tests mixed datasource panel - targets should migrate independently",
"datasource": {
"uid": "-- Mixed --"
},
"targets": [
{
"refId": "A",
"datasource": null
},
{
"refId": "B",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 5,
"title": "Panel with Existing Object Datasource",
"description": "Tests panel with already migrated datasource object - should preserve existing refs",
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
}
}
]
},
{
"id": 6,
"title": "Panel with Unknown Datasource Name",
"description": "Tests panel with unknown datasource - should preserve as UID-only reference",
"datasource": {
"uid": "unknown-panel-datasource"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "unknown-target-datasource"
}
}
]
},
{
"id": 7,
"title": "Panel with Expression Query",
"description": "Tests panel with expression query - should not inherit expression as panel datasource",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
},
{
"refId": "B",
"datasource": {
"uid": "__expr__",
"type": "__expr__"
}
}
]
},
{
"id": 8,
"title": "Panel Inheriting from Target",
"description": "Tests panel inheriting datasource from target when panel datasource was default",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 9,
"title": "Panel with Named Datasource",
"description": "Tests panel with datasource referenced by name - should migrate to full object",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
},
{
"id": 10,
"title": "Panel with UID Datasource",
"description": "Tests panel with datasource referenced by UID - should migrate to full object",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
},
{
"id": 11,
"type": "row",
"title": "Simple Row Panel",
"description": "Tests row panel - it gets datasource or targets fields added even it is not needed, but this is how it works in frontend",
"collapsed": false,
"panels": []
},
{
"id": 12,
"type": "row",
"title": "Collapsed Row with Nested Panels",
"description": "Tests collapsed row with nested panels - nested panels should migrate",
"collapsed": true,
"panels": [
{
"id": 13,
"title": "Nested Panel with Default Datasource",
"description": "Nested panel in collapsed row with default datasource",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 14,
"title": "Nested Panel with Unknown Datasource",
"description": "Nested panel in collapsed row with unknown datasource",
"datasource": {
"uid": "unknown-nested-datasource"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
}
]
}
]
}
@@ -0,0 +1,126 @@
{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 36,
"panels": [
{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": {
"legend": true
}
},
{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": {
"legend": false
}
},
{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": {
"legend": {
"displayMode": "hidden",
"showLegend": true
}
}
},
{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": {
"legend": {
"displayMode": "table",
"showLegend": false
}
}
},
{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom"
}
}
},
{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": {
"legend": {
"displayMode": "list",
"placement": "right"
}
}
},
{
"type": "text",
"title": "Panel with No Options",
"id": 7
},
{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": {
"reduceOptions": {
"fields": "/.*temperature.*/"
}
}
},
{
"type": "piechart",
"title": "Panel with Null Legend",
"id": 9,
"options": {
"legend": null
}
},
{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": {
"legend": true
}
},
{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": {
"legend": {
"displayMode": "hidden"
}
}
},
{
"type": "stat",
"title": "Nested Panel with Conflicting Properties",
"id": 13,
"options": {
"legend": {
"displayMode": "table",
"showLegend": false
}
}
}
]
}
]
}
@@ -0,0 +1,187 @@
{
"title": "V38 Table Migration Comprehensive Test Dashboard",
"schemaVersion": 37,
"panels": [
{
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "lcd-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background-solid"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "some-other-mode"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
}
]
}
]
}
},
{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9
},
{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
}
]
}
]
}
}
]
}
]
}
@@ -0,0 +1,187 @@
{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 37,
"panels": [
{
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "lcd-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background-solid"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "some-other-mode"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
}
]
}
]
}
},
{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9
},
{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
}
]
}
]
}
}
]
}
]
}
@@ -0,0 +1,145 @@
{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 38,
"panels": [
{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean"
}
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean",
"B": "max",
"C": "min",
"D": "sum"
}
}
}
]
},
{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["mean"]
}
},
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "last",
"B": "first"
}
}
},
{
"id": "organize",
"options": {
"excludeByName": {}
}
}
]
},
{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["mean", "max"]
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {}
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": [
{
"id": "timeSeriesTable"
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"someOtherOption": "value"
}
}
]
},
{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8
},
{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"NestedA": "median",
"NestedB": "stdDev"
}
}
}
]
}
]
}
]
}
@@ -0,0 +1,10 @@
{
"title": "Empty String Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": ""
}
@@ -0,0 +1,10 @@
{
"title": "Boolean False Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": false
}
@@ -0,0 +1,9 @@
{
"title": "Refresh Not Set Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
}
}
@@ -0,0 +1,10 @@
{
"title": "Numeric Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": 60
}
@@ -0,0 +1,10 @@
{
"title": "String Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": "1m"
}
@@ -0,0 +1,10 @@
{
"title": "Boolean Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": true
}
@@ -0,0 +1,10 @@
{
"title": "No Time Picker Test Dashboard",
"schemaVersion": 40,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": ""
}
@@ -0,0 +1,7 @@
{
"title": "Time Picker No Time Options Test Dashboard",
"schemaVersion": 40,
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
}
}
@@ -0,0 +1,14 @@
{
"title": "Time Picker Time Options Test Dashboard",
"schemaVersion": 40,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"refresh": ""
}
@@ -1,660 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistics": [
"Average"
]
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistics": [
"Maximum",
"Minimum",
"Sum"
]
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistics": [
"Average",
"Maximum",
"Minimum"
]
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistics": [
"Sum",
"Average"
]
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistics": [
"Maximum"
]
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistics": [
"Average",
"Maximum",
"Sum"
]
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": [],
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": null,
"refId": "A"
},
{
"datasource": "default",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": "default",
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 33,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
},
{
"datasource": "",
"name": "empty_string_var",
"type": "query"
},
{
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,719 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": null,
"refId": "A"
},
{
"datasource": "default",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": "default",
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
},
{
"datasource": "",
"name": "empty_string_var",
"type": "query"
},
{
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,732 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": null,
"refId": "A"
},
{
"datasource": "default",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": "default",
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
},
{
"datasource": "",
"name": "empty_string_var",
"type": "query"
},
{
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,831 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,840 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,828 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"id": 15,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Null Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"id": 16,
"targets": [
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Existing Datasource Reference",
"type": "stat"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
},
"id": 17,
"title": "V33: Panel without Targets",
"type": "table"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"id": 18,
"targets": null,
"title": "V33: Panel with Empty Targets Array",
"type": "table"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"id": 19,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "D"
}
],
"title": "V33: Target Datasource Edge Cases",
"type": "graph"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"id": 20,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "C"
}
],
"title": "V33: Mixed Target References",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"id": 21,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "V33: Panel with Empty String Datasource",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"id": 22,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "B"
}
],
"title": "V33: Panel with Another Non-existing Datasource",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "empty_string_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "another_non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,462 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": "default",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": "non-existing-ds",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": "non-existing-ds"
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": "prometheus",
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,475 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": "default",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": "non-existing-ds",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": "non-existing-ds"
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": "prometheus",
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,531 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,540 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,528 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"dimensions": {
"InstanceId": "i-123456"
},
"enable": true,
"iconColor": "red",
"name": "CloudWatch Annotation Single Stat",
"namespace": "AWS/EC2",
"prefixMatching": false,
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Maximum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Maximum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Minimum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Minimum"
},
{
"dimensions": {
"InstanceId": "i-789012"
},
"enable": true,
"iconColor": "blue",
"name": "CloudWatch Annotation Multiple Stats - Sum",
"namespace": "AWS/RDS",
"prefixMatching": false,
"region": "us-west-2",
"statistic": "Sum"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 11,
"targets": [
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"alias": "CPU Usage",
"dimensions": {
"InstanceId": "i-123456"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"period": "300",
"refId": "C",
"region": "us-east-1",
"statistic": "Minimum"
}
],
"title": "CloudWatch Single Query Multiple Stats",
"type": "timeseries"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"id": 12,
"targets": [
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "A",
"region": "us-west-2",
"statistic": "Sum"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "up",
"refId": "B"
},
{
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"metricName": "DatabaseConnections",
"namespace": "AWS/RDS",
"refId": "C",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"metricName": "RequestCount",
"namespace": "AWS/ApplicationELB",
"refId": "D",
"region": "us-west-2",
"statistic": "Average"
}
],
"title": "Mixed CloudWatch and Prometheus Queries",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"id": 13,
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"targets": [
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "A",
"region": "us-east-1",
"statistic": "Average"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "B",
"region": "us-east-1",
"statistic": "Maximum"
},
{
"dimensions": {
"QueueName": "my-queue"
},
"metricName": "ApproximateNumberOfMessages",
"namespace": "AWS/SQS",
"refId": "C",
"region": "us-east-1",
"statistic": "Sum"
}
],
"title": "Nested CloudWatch Panel",
"type": "timeseries"
}
],
"title": "Collapsed Row with CloudWatch",
"type": "row"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,273 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": "default",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": "non-existing-ds",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": "non-existing-ds"
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"datasource": "default",
"name": "default_var",
"type": "query"
},
{
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": null,
"name": "null_var",
"type": "query"
},
{
"datasource": "non-existing-ds",
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,326 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,335 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,323 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
},
{
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 10,
"title": "Timeseries Panel with Hidden Axes",
"type": "timeseries"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,294 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": true
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": false
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,303 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,291 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
},
{
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 7,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Datasources Panel"
},
{
"datasource": {
"uid": "-- Mixed --"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"id": 8,
"targets": [
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
}
}
],
"title": "Mixed Panel with Mixed Targets"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"id": 9,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"title": "Non-existing Datasource Panel"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "default_var",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_name",
"type": "query"
},
{
"datasource": {
"apiVersion": "1",
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"name": "es_var_by_uid",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "null_var",
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"name": "non_existing_var",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,144 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,132 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"title": "No Legend Config",
"type": "graph"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"displayMode": "list",
"showLegend": true
}
},
"title": "Boolean Legend True"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Boolean Legend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "Hidden DisplayMode"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"legend": {
"displayMode": "list",
"showLegend": false
}
},
"title": "ShowLegend False"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"legend": {
"displayMode": "table",
"showLegend": true
}
},
"title": "Visible Legend"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,387 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,387 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,387 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,375 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "lcd",
"type": "gauge"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "gradient",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"mode": "basic",
"type": "color-background"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"cellOptions": {
"type": "some-other-mode"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,167 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"A": {
"stat": "mean"
},
"B": {
"stat": "max"
}
}
}
],
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}

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