To keep things clean, I want to use the duration format suggested in
this article 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?