A simple way is to use the hour() PromQL function, e.g. something like: up == 1 unless on() hour() < 9 or hour() > 17
To alert about up jobs during “working hours” (for the sake of an example, you should be able to graph this and see there’s no results outside those hours). On Sat, 21 Nov 2020 at 13:41, Aleksandar Ilic <[email protected]> wrote: > Hello everyone, > > I was wondering if there is any way to set an alert only to be triggered > at a specific time of day. > > As I saw for alertmanager there is PR open on GitHub but wondering if > there is any workaround for this or any other way. > > Best Regards > > -- > 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/9bb0e0d1-488b-49b0-b005-878d736c5bden%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/9bb0e0d1-488b-49b0-b005-878d736c5bden%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAP9KPhDqruZ%3DTh9U1Ra2fGEPa3j9UtidWQvkCO4nj8z7EKCPkw%40mail.gmail.com.

