-
Notifications
You must be signed in to change notification settings - Fork 101
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 support for aggregations. #34
base: master
Are you sure you want to change the base?
Conversation
This adds support for setting an aggregation. This aggregation is used for all metrics collection by the exporter. It adjust the resulting metric names into prometheus recording rule style to allow for different exporters to collect different aggregations. We add support for passing the fields, reducer, aligner and align duration as per other options. resulting metrics look as follows '''target_proxy_name_response_code:stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_backend_latencies:sum_bucket{...}```
This is just work in progress to see if you would be interested in this, and if so, to discuss the overall design. Issues with this implementaiton:
|
This is an interesting idea. It looks like the change needs to be rebaesd. One comment, exporters should not use |
@SuperQ so, my thinking here was that the metric is already aggregated so that the names attempt to match what you'd get if you created a recording rule for the same purpose. Other than replacing with an underscore, do you have any other ideas regarding naming? |
FWIW, we never used this code, because I didn't really ant to maintain yet another fork in house, but I'd be happy to polish this PR , since it does seem like useful functionality. May not have time in the next two weeks though. |
I think we can just close this. I think aggregating in the exporter might be a bit more than we want to support. |
After having a discussion on Slack, and looking at some of the use of Stackdriver data we have, this is more useful than I previously thought. |
Any interest in reviving this? |
I experimented with this a bit, I think there needs to be some changes. In order for this to be useful generally, we need to supply per-metrics-prefix aggregation requests. Otherwise it will try and apply aggregations to prefixes that don't make sense. I'm thinking something along the lines of this:
Part of the problem here, is we still accept ENV vars for input. This makes command line parsing much more difficult, as we need a lot of string separators. IMO, I think we need to drop the ENV vars, and change the |
Sorry for the late response, I'll need to take some time to get my head around this again. |
@tcolgate No worries. I had some more thoughts about this, and I think the best way forward would be to move the metrics prefixes to a config file. I've filed #106 to track this idea. Basically, it would be more like the balckbox/snmp exporters. Rather than just a list of "metrics prefixes", there would be scrape modules with different prefixes and aggregations. |
Hi, @tcolgate have you find another solution to collect stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_backend_latencies. I search to scrape the same metric with prometheus. Cardinalities of this metric don't help us. Maybe have you found another solution ? Thank you for your help. |
sorry for digging up an old thread. is this still being worked on? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a rebase.
This adds support for setting an aggregation. This aggregation is used
for all metrics collection by the exporter. It adjust the resulting
metric names into prometheus recording rule style to allow for
different exporters to collect different aggregations.
We add support for passing the fields, reducer, aligner and align
duration as per other options.
resulting metrics look as follows
'''target_proxy_name_response_code:stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_backend_latencies:sum_bucket{...}```