prometheus / prometheus/alertmanager

mute_time_intervals should be inherited to sub routes

Open
#2,833 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/config component/dispatch
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

What did you do?
I set up a route to mute all warning alert outside work days, and several sub routes to route these alerts to different receivers.

What did you expect to see?
I was expecting this alert could be silenced in all sub routes

What did you see instead? Under which circumstances?
the alert was sent regardless of the mute intervel setting
Environment

  • System information:

    insert output of uname -srm here

  • Alertmanager version:

    insert output of alertmanager --version here (repeat for each alertmanager
    version in your cluster, if relevant to the issue)
    v0.23.0

  • Prometheus version:

    insert output of prometheus --version here (repeat for each prometheus
    version in your cluster, if relevant to the issue)

  • Alertmanager configuration file:

insert configuration here
  • Prometheus configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here

I'm aware the document said:

# Times when the route should be muted. These must match the name of a
# mute time interval defined in the mute_time_intervals section. 
# Additionally, the root node cannot have any mute times.
# When a route is muted it will not send any notifications, but
# otherwise acts normally (including ending the route-matching process
# if the `continue` option is not set.)
mute_time_intervals:
  [ - [<string>](https://www.prometheus.io/docs/alerting/latest/configuration/#string) ...]

but I think these rules should be inherited, this can make the config shorter and easier to read, otherwise I have to set mute time for every single route.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Alertmanager's routing configuration entry point and the mute_time_intervals documentation referenced in the issue, then trace how parent and sub-route settings are evaluated. Done means a mute interval configured on a parent route applies to its sub routes as expected, with coverage for the inheritance behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.