Thanks I’ll have a look into that. Are you able to advise on substituting my query into the format ‘foo or on (x,y,z) bar * 0’ like you suggested.
I tried one but got unexpected expression so I’m obviously getting the syntax wrong….! I suppose that if there are for example no nodes that are enabled but not available, would Prometheus actually know the pools that don’t match this because they theory they would not be returned at all in the query, nevermind the count by. On Tue, 7 Mar 2023 at 16:31, Brian Candler <[email protected]> wrote: > 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 a topic in the > Google Groups "Prometheus Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/prometheus-users/qlHK7r1hQVs/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/5290bd96-4623-4742-ba49-8f4b44b846c6n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/5290bd96-4623-4742-ba49-8f4b44b846c6n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAC4WY582H7ye0tmAZjEvoG8sAw2R7OTO%3D-1Rdyeoftka07-6AQ%40mail.gmail.com.

