0

I am working with creating metrics using Pushgateway+Prometheus. Question is that prometheus received metrics along with labels, In Prometheus query language we make use of many operators or inbuilt functions such as increase(), rate(), sort() . These are used in querying the data incoming . Now, i apply these functions and query my incoming data (metrics), can the results of my queries be stored somewhere and further sent to GRAFANA(or any where for that matter). Or these functions can just be used for querying and viewing results in prometheus interface only. Does prometheus have any kind of inbuilt support for my requirement?

Also, I suppose We can use Prometheus functions directly in Grafana and create queries in Grafana to meet the above requirement? Please correct me and provide insights.

userdr725
  • 25
  • 1
  • 6
  • did you check the recording rues?https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules – star67 Dec 06 '22 at 08:15
  • @star67, According to recording rules, it seems like its some sort of a cache for frequently used computations on queries , but how will those results will be further sent to Grafana after computation? Are the picked up from the rules files or what ? – userdr725 Dec 06 '22 at 11:53
  • they would be stored in Prometheus as regular metrics, and Grafana would pick then up the same way as any other metrics. Pls check & upvote (if it's useful) this answer https://stackoverflow.com/questions/74605310/gcp-recommendations-for-reducing-time-series-samples-gmp/74641661#74641661. There're some Google-Managed-Prometheus' specifics but still general enough – star67 Dec 06 '22 at 12:01

0 Answers0