Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

large scope alert rule overlay with small scope alert rule question ! #4614

Closed
gaopeiliang opened this Issue Sep 17, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@gaopeiliang
Copy link

gaopeiliang commented Sep 17, 2018

I have add one alert rule about one timeseries .. it will notify something when match , like

    - alert: Y
      expr: prometheus_notifications_sent_total < 40
      for: 10s
      labels:
        A: A
      annotations:
        summary: "{{$value}}"

but when I want know more detail about it , I add another alert rule , like:

    - alert: X
      expr: prometheus_notifications_sent_total{environment="dev"} < 20
      for: 10s
      labels:
        A: A
      annotations:
        summary: "{{$value}}"

so that , when prometheus_notifications_sent_total(environment="dev") == 10 matched,
I will received alert Y and alert X ... but alert Y is no need and meanless .. now we only want alert X.

the best is to fix alert Y expr not include alert X expr like:

    - alert: Y
      expr: prometheus_notifications_sent_total unless  prometheus_notifications_sent_total{environment="dev"}< 40
      for: 10s
      labels:
        A: A
      annotations:
        summary: "{{$value}}"

it maybe work , but question is:

  1. when I add alert X, I must to fix every alert relate with alert X about diff scope! it is difficult to find it..
  2. alert X and alert Y will add by different user, every know less about scope ....

anyone has idea to manager the alert rule ??

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Sep 19, 2018

Hi, this looks more like a question rather than a bug/issue. Have you tried: https://prometheus.io/docs/alerting/alertmanager/#inhibition

To make your question, and all replies, easier to find, we suggest you move this over to our user mailing list, which you can also search. If you prefer more interactive help, join or our IRC channel, #prometheus on irc.freenode.net. Please be aware that our IRC channel has no logs, is not searchable, and that people might not answer quickly if they are busy or asleep. If in doubt, you should choose the mailing list.

Once your questions have been answered, please add a short line pointing to relevant replies in case anyone stumbles here via a search engine in the future.

@gouthamve gouthamve closed this Sep 19, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.