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

[Proposal] Allow to use evaluation_interval for alert FOR calculation #4744

Open
dmajere opened this Issue Oct 15, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@dmajere
Copy link

dmajere commented Oct 15, 2018

Allow to use evaluation_interval for alert FOR calculation

It's a common problem to find a right value for alerts FOR parameter.
In general you want your alert rule to be evaluated for N evaluation periods, so you have to manually calculate FOR: N * evaluation_interval, which is error prone due to possible changes of a prometheus server that would lead to necessity to change [possibly] every alert rule configuration.
It would be great to have an ability to specify evaluation_interval based evaluation as a value for FOR.
For example:

 - alert: AlertName
    expr: job:metric > 0.1
    for: 5 * config:evaluation_interval
    annotations:
      summary: my alert rule
@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Oct 15, 2018

Does #4277 help with this?
Also, see #1154.

@dmajere

This comment has been minimized.

Copy link
Author

dmajere commented Oct 15, 2018

No, not really, proposal is not about alert rule testing, but about making FOR dependency on evaluation_interval more explicit. So, it would be easier to maintain alert rules after they are tested.

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Oct 16, 2018

This is more a job for your configuration management system which Prometheus doesn't attempt to replicate.

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.