Many thanks Julius. Checking for an update will be my first port of call next time.
Tom On Mon, 25 Jan 2021, 14:43 Julius Volz, <[email protected]> wrote: > Hi Tom, > > The composite duration syntax got introduced only in 2.21.0. Your config > works fine for me with the latest Prometheus version, so you probably just > need to upgrade :) > > Regards, > Julius > > On Mon, Jan 25, 2021 at 1:30 PM Tom Gregory <[email protected]> wrote: > >> 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 >> <https://groups.google.com/d/msgid/prometheus-users/4e9607dc-6914-43cc-b127-1ac64477f533n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Julius Volz > PromLabs - promlabs.com > -- 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/CADSXXdoVf%3Dgq-9roBTcfTt58Wzsq4KBnuyFaicccHC2FypnoQw%40mail.gmail.com.

