To keep things clean, I want to use the duration format suggested in this
article
<https://prometheus.io/docs/prometheus/latest/configuration/configuration/>
in my Prometheus rule configuration e.g. 1h30m
My complete rule configuration then looks like this:
groups:
- name: general
rules:
- alert: Memory
expr: sum(jvm_memory_used_bytes{area="heap"}) /
sum(jvm_memory_max_bytes{area="heap"}) * 100 > 95
for: 1h30m
Which produces this error message:
loading groups failed" err="/etc/prometheus/rules.yml: not a valid duration
string: \"1h30m\"
When I replace 1h30m with 1h the configuration is accepted. Is this
duration formation not allowed in rules?
--
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/4e9607dc-6914-43cc-b127-1ac64477f533n%40googlegroups.com.