On Tuesday, 7 March 2023 at 16:20:14 UTC Nick Carlton wrote:

This is the first I’ve heard of recording rules. So I would be able to 
convert the group_right query into a new metric using this method?


Yes.

The documentation seems to suggest it’s a colon string with an expression.


Not necessarily: the string you saw is just the metric name, and you can 
name your new metrics however you like.  However, colons are valid in 
metric names 
<https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels>, 
and indeed are "reserved for user defined recording rules" (i.e. regular 
exporters are not supposed to use them).

Using a metric name with colons helps to distinguish synthetic metrics, 
reduces the risk of name clashes, and may include a potted history of how 
they were derived, as recommended here:
https://prometheus.io/docs/practices/rules/

The actual value of the generated metric is defined by the "expr:" part of 
the recording rule.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/5290bd96-4623-4742-ba49-8f4b44b846c6n%40googlegroups.com.

Reply via email to