grafana / carbon-relay-ng

Fast carbon relay+aggregator with admin interfaces for making changes online - production ready
Other
467 stars 151 forks source link

New metric aggregation: "last" #190

Closed guillaumeautran closed 7 years ago

guillaumeautran commented 7 years ago

It would be useful to have a aggregation for sampling that data at a predefined rate. For example, only record every 5 samples within the reporting period. The actual usecase I have in mind is slightly different but a bit more specific. In my case, I want to take a single sample of a metric at a 30mins interval (basically, geographical location reported by a mobile equipment). Aggregating this location does not make sense but a single snapshot does make sense.

Dieterbe commented 7 years ago

what I think would be more useful and also address this case is a "last" aggregator. in each window of points it would just pick the last value.

guillaumeautran commented 7 years ago

Sounds good. Let me look into that (never used "Go" before).

guillaumeautran commented 7 years ago

BTW, do you have a "contributor howto" to help me get started? I can build the project from this repo but trying to build my clone fails with many errors like: cmd/carbon-relay-ng/carbon-relay-ng.go:54: cannot use log (type *"github.com/guillaumeautran/carbon-relay-ng/vendor/github.com/op/go-logging".Logger) as type *"github.com/graphite-ng/carbon-relay-ng/vendor/github.com/op/go-logging".Logger in argument to input.SetLogger

Dieterbe commented 7 years ago

you should have the code in $GOPATH/src/github.com/graphite-ng/carbon-relay-ng not $GOPATH/src/github.com/guillaumeautran/carbon-relay-ng let me know if that helps.

guillaumeautran commented 7 years ago

Ok, got that. How do I build / run the tests? (sorry, I'm a real newbee here...)

guillaumeautran commented 7 years ago

PR is up. Let me know what I've missed.

Dieterbe commented 7 years ago

Merged in #191