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

Does PromQL support automated reporting of designated sections? #5490

Closed
wangchaoyu1992 opened this Issue Apr 19, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@wangchaoyu1992
Copy link

wangchaoyu1992 commented Apr 19, 2019

Proposal

Use case. Why is this important?

“Nice to have” is not a good use case. :)

Bug Report

What did you do?
http_requests_total > 100 && 1=<day_of_week() <=5
This is not supported
What did you expect to see?
from Monday to Friday, the number of HTTP requests is greater than 100.
Alarm for HTTP requests greater than 50 from Saturday to Sunday
Can PromQL do this? If you can write an example,Thanks.
What did you see instead? Under which circumstances?

Environment

  • System information:

    insert output of uname -srm here

  • Prometheus version:

    insert output of prometheus --version here

  • Alertmanager version:

    insert output of alertmanager --version here (if relevant to the issue)

  • Prometheus configuration file:

insert configuration here
  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Apr 19, 2019

You want: http_requests_total > 100 and on() day_of_week(vector(time())) >= 1 and on() day_of_week(vector(time())) <= 5.

I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search.

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.