Hi there,

I have already asked this question on Stackoverflow 
<https://stackoverflow.com/questions/66117605/predefined-group-in-prometheus-alerts>,
 
but recently found this forum and feel like the question is more suitable 
here.

I have the following query as part of my prometheus alerting rules in my 
rules.yml:
... 
- alert: Test1 expr: time() - camel_route_last_exchange_completed_timestamp{
*route="route1|route2|route3...|routex"*} 
for: 10s ... 

In short: I am looking for the time since the last time stamp *for specific 
routes*. However, the query is not as important as the part in brackets / 
bold.

I would *prefer to leave out the specific routes* and refer to a *predefined 
group** (e.g. route_group_A = "route1|route2|route3...|routex"})* so that 
the query is readable:

time() - camel_route_last_exchange_completed_timestamp{route="
*route_group_A*"}

Is this possible? If so, how and in which document to define this?
I tried using templating, but got no further.

Thanks in advance!

-- 
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/5859aa5c-63af-4ce0-9c7b-e6e107075996n%40googlegroups.com.

Reply via email to