Stackdriver: Deep linking from Grafana panels to the Metrics Explorer (#25858)

* Add stackdriver deep link

* No deep link for SLO queries

* Add tests

* Update docs/sources/features/datasources/stackdriver.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Enforce resource type

* Navigate to google account chooser first

* Change renamed image reference

Fix misspelling in image name and change it to conform with the rest cloud monitoring images

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
Sofia Papagiannaki
2020-07-01 01:16:20 +03:00
committed by GitHub
parent 686149966a
commit bb4b7381fc
4 changed files with 400 additions and 6 deletions

View File

@@ -324,3 +324,14 @@ datasources:
jsonData:
authenticationType: gce
```
## Deep linking from Grafana panels to the Metrics Explorer in Google Cloud Console
Only available in Grafana v7.1+.
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_deep_linking.png" max-width="500px" class="docs-image--right" caption="Google Cloud Monitoring deep linking" >}}
> **Note:** This feature is only available for Metric queries.
Click on a time series in the panel to see a context menu with a link to View in Metrics Explorer in Google Cloud Console. Clicking that link opens the Metrics Explorer in the Google Cloud Console and runs the query from the Grafana panel there.
The link navigates the user first to the Google Account Chooser and after successfully selecting an account, the user is redirected to the Metrics Explorer. The provided link is valid for any account, but it only displays the query if your account has access to the GCP project specified in the query.