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

Confirm annotations of resolved alert have appropriate semantics. #3308

Closed
tangr opened this Issue Oct 18, 2017 · 9 comments

Comments

Projects
None yet
4 participants
@tangr
Copy link

tangr commented Oct 18, 2017

The alert resolved rule notification send the $value with last firing state value, it should be better send the current $value instead, or the last resolved state value, then the resolved notification will be much useful.
https://github.com/prometheus/prometheus/blob/master/notifier/notifier.go#L87-100

Environment

  • System information:

Linux 3.10.0-514.26.2.el7.centos.plus.x86_64 x86_64

  • Prometheus version:

1.8.0

  • Alertmanager version:

0.8.0

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Oct 18, 2017

We never send the value with alerts. Can you give more detail on what you're asking for?

@tangr

This comment has been minimized.

Copy link
Author

tangr commented Oct 19, 2017

@brian-brazil
For example, in this alerting rule, I meaning the $value, when this notification resolved, $value of the resolved message are still more than 90, so the $value should be the last firing state, not the state after resolved. Is it more clearly for what I meaning?

ALERT memory_use_warning
IF 100 - 100 * (node_memory_MemAvailable or (node_memory_MemFree + node_memory_Buffers + node_memory_Cached)) / (node_memory_MemTotal + 0.1) > 90
FOR 3m
LABELS { severity = "warning" }
ANNOTATIONS {
short = "{{ $labels.instance }} {{ humanize $value }}%",
detail = "Host {{ $labels.instance }} {{ $labels.job }} memory usage {{ humanize $value }}%",
}

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Oct 19, 2017

The alertmanager doesn't remember previous annotations, it only has the most recent alert to go on - which is the one from the resolved alert. This is working as expected.

@tangr

This comment has been minimized.

Copy link
Author

tangr commented Oct 20, 2017

@brian-brazil , I know alertmanager doesn't remember previous annotations, what I understand is the prometheus updated the "endsAt" parameter, after send the notification to the alertmanager, then the alertmanager consider the notification as "Resolved".

What I want is when the prometheus update the "endsAt", it update the "value" at the same time.

@brian-brazil brian-brazil reopened this Oct 20, 2017

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Oct 20, 2017

That'd need to be looked into further

@brian-brazil brian-brazil changed the title Resolved message send current resolved $value, instead last firing state $value Confirm annotations of resolved alert have appropriate semantics. Oct 20, 2017

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 3, 2018

I've checked our logic, it's working as expected.

@eskp

This comment has been minimized.

Copy link

eskp commented Mar 4, 2018

Any way to get the updated value in the resolve notification then?

@ojle

This comment has been minimized.

Copy link

ojle commented Mar 7, 2019

Any way to get the updated value in the resolve notification then?

@brian-brazil
Is there any possibility for this one to be considered, ie. get the latest value in resolved notification?
As mentioned in the blog post https://www.robustperception.io/why-do-resolved-notifications-contain-old-values
"It often confuses users as to why resolved notifications don't contain updated annotations values..."
So if something is constantly confusing users, why shouldn't be considered, and applied a bit of different logic?
It all comes on human psychology that when you receive RESOLVED alert, you want to see current values, like "disk usage on /root is WARNING - 90% | disk usage on /root is OK - 15%"

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 7, 2019

If you read that blog post, you'll see that this simply isn't possible.

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