prometheus alert rule with different scope
up vote
0
down vote
favorite
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:
when I add alert X, I must to fix every alert relate with alert X about diff scope! it is difficult to find it..
alert X and alert Y will add by different user, every know less about scope ....
anyone has idea to manager the alert rule ??
prometheus-alertmanager
add a comment |
up vote
0
down vote
favorite
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:
when I add alert X, I must to fix every alert relate with alert X about diff scope! it is difficult to find it..
alert X and alert Y will add by different user, every know less about scope ....
anyone has idea to manager the alert rule ??
prometheus-alertmanager
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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:
when I add alert X, I must to fix every alert relate with alert X about diff scope! it is difficult to find it..
alert X and alert Y will add by different user, every know less about scope ....
anyone has idea to manager the alert rule ??
prometheus-alertmanager
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:
when I add alert X, I must to fix every alert relate with alert X about diff scope! it is difficult to find it..
alert X and alert Y will add by different user, every know less about scope ....
anyone has idea to manager the alert rule ??
prometheus-alertmanager
prometheus-alertmanager
asked Nov 8 at 3:01
gpl
12
12
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53200944%2fprometheus-alert-rule-with-different-scope%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown