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

How to check if an alert is inactive? #2880

Closed
zxwing opened this Issue Jun 27, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@zxwing
Copy link

zxwing commented Jun 27, 2017

The document says:

    For pending and firing alerts, Prometheus also stores synthetic time series of the form 
    ALERTS{alertname="<alert name>", alertstate="pending|firing", <additional alert labels>}. The 
    sample value is set to 1 as long as the alert is in the indicated active (pending or firing) state, and a 
    single 0 value gets written out when an alert transitions from active to inactive state. Once inactive, 
    the time series does not get further updates.

but I am confused by what I observed. After an alert turns to inactive (the Alerts page becomes green and shows 0 active), querying ALERTS metric still returns data with state pending/firing, value 0/1 for a while, and finally returns no data which means the alert becomes inactive.

What is the reliable programming way to judge if an alert is inactive?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 14, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 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 23, 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.