Hi,
We are trying to create an alerting rule based on dynamic labels. Here is
our metric:
my_metric{id='123', date='2021-01-01'} 0.8
We want to ensure that every day at x am, a metric *with the corresponding
date* has a value exceeding a certain threshold. Effectively, it means
writing a rule with a dynamic date label.
We came up with a workaround, which consists in producing a separate metric
whose value carries the date label's corresponding epoch timestamp:
my_metric_timestamp{id='123',
date='2021-01-01'} 1640995200
We then join it with my_metric.
This is definitely not ideal; would you have any suggestions? Thank you.
--
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/75f895d2-89e9-42a3-a711-6933bf0b17a5n%40googlegroups.com.