Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new cloudmonitoring target #259

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jlevesy
Copy link
Contributor

@jlevesy jlevesy commented Apr 7, 2024

What does this PR do?

This PR adds a new target called cloudmonitoring which implements a way of defining Google Cloud Metrics targets supported by Grafana 10. I did not reuse the stackdriver name, because it isn't used anymore on the actual Google Product.

It aims to support the 4 different ways of making queries to CloudMonitoring:

  • Standard query builder, via the NewTimeSeries init function.
  • Raw MQL query, using the NewMQL init function
  • Raw PromQL query, using NewPromQL init function.
  • SLO query, using NewSLO.

Very much a work in progress as I type this message. But just to let you know how I'm planing to deal with it.

Tested this branch against Grafana v10.2.6 (e5ffb9ba46)

Needs K-Phoen/sdk#29 to land before.

TODO list:

  • High level design
  • Make it work 👀
  • Write some tests
  • Support alerting, and test it. Ideally without duplicating everything 😭

@jlevesy jlevesy force-pushed the jl/support-cloudmonitoring branch 5 times, most recently from b014580 to 45987f3 Compare April 7, 2024 16:37
@@ -61,6 +62,14 @@ func WithStackdriverTarget(target *stackdriver.Stackdriver) Option {
}
}

// WithCloudMonitoringTarget adds a cloud monitoring query to the graph.
func WithCloudMonitoringTarget(target cloudmonitoring.Target) Option {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to copy-paste this for other panels too :sadness:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants