Multiple repeat_interval settings

20 views
Skip to first unread message

Warren Francis

unread,
Sep 3, 2020, 11:19:58 AM9/3/20
to Prometheus Users
I would like to set up a receiver that never repeats alerts to prevent ticket spam while keeping the rest of the alerts the same. The setting appears to be global. 

I have tried: 

Setting up two routes in the same file but i got this error " line 312: field route already set in type config.plain\n  line 324: field receivers already set in type config.plain"

Adding repeat_interval to the receiver but it isnt an appropriate field


Any help would be greatly appreciated thanks!


Brian Candler

unread,
Sep 3, 2020, 1:29:46 PM9/3/20
to Prometheus Users
It's not global, it's specific to a route:

There is a top level route, but this route can contain child routes (which can contain grandchild routes etc)


On Thursday, 3 September 2020 16:19:58 UTC+1, Warren Francis wrote:
Setting up two routes in the same file but i got this error " line 312: field route already set in type config.plain\n  line 324: field receivers already set in type config.plain"


route:
  ... set defaults here
  routes:
    - ... child route1 here
    - ... child route2 here
 
The receiver and settings of the parent route are only used if none of the child routes match.

There is an interactive tool that helps you visualize and debug your routing tree:

Warren Francis

unread,
Sep 4, 2020, 4:26:54 AM9/4/20
to Prometheus Users
Thanks for the reply! 

I've made the following changes:

global:
  resolve_timeout: 15m
route:
  group_by:
  - instance
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 1h
  receiver: web.hook
  routes:
  - receiver: Ticket alerts
    match_re:
      alertname: RabbitMQ-.*|QueueBuilding.*|NumberOfQueue.*|TooManyReadyMes.*
    repeat_interval: 7000h



Reply all
Reply to author
Forward
0 new messages