Importable sample Cloud Monitoring Dashboards
Is your feature request related to a problem? Please describe.
We have great default dashboards for prometheus/grafana. Now that the Stackdriver API is live, we can do the same for Stackdriver as well!
https://cloud.google.com/blog/products/management-tools/cloud-monitoring-dashboards-using-an-api
Describe the solution you'd like
I'm thinking Terraform scripts to install the dashboards would be the best way to go.
https://www.terraform.io/docs/providers/google/r/monitoring_dashboard.html
Describe alternatives you've considered
You could do it in a shell script with gcloud, but that seems less portable.
Additional context
- https://cloud.google.com/monitoring/api/ref_v3/rest/v1/projects.dashboards#resource:-dashboard
- https://www.terraform.io/docs/providers/google/r/monitoring_dashboard.html
I have a plan how to accomplish this:
- Create all necessary Graphs on Stackdriver Monitorring Dashboard similar to what we have now on Grafana.
- Transform them to json and copy to a terraform configurations
- Follow the pattern found in official Terraform provider docs: https://www.terraform.io/docs/providers/google/r/monitoring_dashboard.html
- Merge to existent GKE Terraform config or create a separate one. Will start with latter.
- Add documentation how to use it
- Add Make target for this feature
Shame we can't do some kind of transform to Grafana dashboards -> stackdriver.
(That would be a neat project)
Well, that sounds like a great feature or a great open source project. When I understand some similarities and mappings while doing this ticket I will let you know if this is trivial to do. I assume there are no more than 3 typical types of dashboards we are using currently in Grafana.
So far dealing with the following error:
Error: Error creating Dashboard: googleapi: Error 400: Field gridLayout.widget[0].xyChart.dataSets[0].timeSeriesQuery.timeSeriesFilter.aggregation.crossSeriesReducer has an invalid value: if group-by fields are specified, a crossSeriesReducer must be specified.
I have copied the output of GCloud Monitoring API Dashboards List as it is stated to be done here: https://www.terraform.io/docs/providers/google/r/monitoring_dashboard.html
'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '
I still think we should do this - although it's now "Cloud Monitoring". https://github.com/GoogleCloudPlatform/monitoring-dashboard-samples has some great howtos with samples.
wait... what? https://cloud.google.com/monitoring/dashboards/import-grafana-dashboards