How do I set the maintenance cycle

37 views
Skip to first unread message

zhengwei y

unread,
Dec 14, 2020, 5:25:17 AM12/14/20
to Prometheus Users
How do I set the maintenance cycle ?  such as silence all alarms from 0:00 to 1:00 am every day?

Stuart Clark

unread,
Dec 14, 2020, 5:29:38 AM12/14/20
to zhengwei y, Prometheus Users
On 2020-12-14 10:25, zhengwei y wrote:
> How do I set the maintenance cycle ? such as silence all alarms from
> 0:00 to 1:00 am every day?

You can create silences in advance & there is an API to create them
automaticlly.

--
Stuart Clark

zhengwei y

unread,
Dec 14, 2020, 10:39:30 PM12/14/20
to Prometheus Users
Does this mean That I have to maintain a timer task to create and delete the corresponding silence rules every day ? 

Christian Hoffmann

unread,
Dec 15, 2020, 6:03:16 AM12/15/20
to zhengwei y, Prometheus Users
On 2020-12-15 04:39, zhengwei y wrote:
> Does this mean That I have to maintain a timer task to create and delete
> the corresponding silence rules every day ?

That would be one possibility. This could also be automated using cron
or something.

We chose a different approach and solve that on the alerting side using
specific rules and inhibition:
https://groups.google.com/g/prometheus-users/c/EfgshKvBua0/m/8GCUpT5XBwAJ

Kind regards,
Christian

Julien Pivotto

unread,
Dec 15, 2020, 7:05:06 AM12/15/20
to zhengwei y, Prometheus Users
On 14 Dec 19:39, zhengwei y wrote:
> Does this mean That I have to maintain a timer task to create and delete
> the corresponding silence rules every day ?


For the moment yes, but we expect to have that kind of features
available directly in alertmanager soon (time windows).


>
> 在2020年12月14日星期一 UTC+8 下午6:29:38<Stuart Clark> 写道:
>
> > On 2020-12-14 10:25, zhengwei y wrote:
> > > How do I set the maintenance cycle ? such as silence all alarms from
> > > 0:00 to 1:00 am every day?
> >
> > You can create silences in advance & there is an API to create them
> > automaticlly.
> >
> > --
> > Stuart Clark
> >
>
> --
> 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 prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/7199b7bc-d681-4603-a01d-f20daad85ba6n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie

Laurent Dumont

unread,
Dec 15, 2020, 5:35:21 PM12/15/20
to zhengwei y, Prometheus Users
If you are coming from a Zabbix world, there is no equivalent maintenance mechanic in Prometheus. Most of the service assurance/service mapping is not part of the Prometheus stack.

Silences are only active between X and Y and will expire after Y. They cannot repeat so you'll need some kind of external mechanism to create and delete the silences.

--
Reply all
Reply to author
Forward
0 new messages