Describe the solution you'd like
We use prometheus scrape kubernetes metric and do some pre-aggregation through recording rule (like this).
Is there any plan to add recording rule feature in vmagent?
Describe alternatives you've considered
An independent program executes the recoding rule through the promql http api and writes back the pre-aggregated data through the remote write api.
It is likely support for recording rules will be eventually added into vmalert tool. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/304 . cc'ing @tenmozes .
It is hard to implement Prometheus recording rules in vmagent, since it has no local data to execute recording rules on - it immediately forwards all the collected data to the configured remote storage systems. Probably, we can implement streaming recording and alerting rules in vmagent in the future, which will be evaluated in real time on incoming stream of data. But they will definitely differ from Prometheus-like recording and alerting rules.
Hi @faceair! Recording rules support was added to vmalert in https://github.com/VictoriaMetrics/VictoriaMetrics/commit/270552fde4cd5c511b4e39d1c814d231de0bab99. Would appreciate your feedback!
Most helpful comment
It is likely support for recording rules will be eventually added into
vmalerttool. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/304 . cc'ing @tenmozes .It is hard to implement Prometheus recording rules in
vmagent, since it has no local data to execute recording rules on - it immediately forwards all the collected data to the configured remote storage systems. Probably, we can implement streaming recording and alerting rules invmagentin the future, which will be evaluated in real time on incoming stream of data. But they will definitely differ from Prometheus-like recording and alerting rules.