go-graphite / graphite-clickhouse

Graphite cluster backend with ClickHouse support
MIT License
213 stars 52 forks source link

fix: average alias in consolidateBy function #280

Closed Tetrergeru closed 3 months ago

Tetrergeru commented 3 months ago

Graphite standard supports both average and avg. Curent implementation supports only avg, because clickhouse supports only avg. Added condition to replace average with avg in GetRequestedAggregation function.

It is the only aggregation that has two aliases.

https://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.consolidateBy