agones icon indicating copy to clipboard operation
agones copied to clipboard

Importable sample Cloud Monitoring Dashboards

Open markmandel opened this issue 5 years ago • 7 comments

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

markmandel avatar Aug 18 '20 16:08 markmandel

I have a plan how to accomplish this:

  1. Create all necessary Graphs on Stackdriver Monitorring Dashboard similar to what we have now on Grafana.
  2. Transform them to json and copy to a terraform configurations
  3. Follow the pattern found in official Terraform provider docs: https://www.terraform.io/docs/providers/google/r/monitoring_dashboard.html
  4. Merge to existent GKE Terraform config or create a separate one. Will start with latter.
  5. Add documentation how to use it
  6. Add Make target for this feature

aLekSer avatar Aug 24 '20 21:08 aLekSer

Shame we can't do some kind of transform to Grafana dashboards -> stackdriver.

(That would be a neat project)

markmandel avatar Aug 24 '20 21:08 markmandel

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.

aLekSer avatar Aug 24 '20 21:08 aLekSer

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

aLekSer avatar Aug 28 '20 14:08 aLekSer

'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 '

github-actions[bot] avatar Aug 01 '23 10:08 github-actions[bot]

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.

markmandel avatar Aug 01 '23 16:08 markmandel

wait... what? https://cloud.google.com/monitoring/dashboards/import-grafana-dashboards

markmandel avatar Nov 15 '23 19:11 markmandel