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

Add an option to allow change "to" param to 'now' instead of the end time of a shift #22

Open
hungnt61h opened this issue Sep 29, 2023 · 2 comments

Comments

@hungnt61h
Copy link

There is a problem that when I enabled the Real-time shift auto-select option, the "to" parameter on url was sought to the end time of a shift. That was not really helpful while I was querying PromQL that calculated a sum of data point in a time range like from the start time of the shift till now. To solve this problem, I have modified your code to add a new option like below.

image

So my query is able to calculate the sum of data points from the start time of a shift till present.
image
image

I hope you would approve this feature and guide me how to contribute my work to your plugin.
By the way, I would suggest another feature that is adding a shift countdown. It would appear below the shift selector on the same panel.

@hungnt61h
Copy link
Author

@isaozler Could you review my PR #39 ? Could we discuss more about this?

@hungnt61h
Copy link
Author

The main reason behinding this feature is that I need the shift changes automatically, but the calculation of the time range which the plugin overrides does not work with Prometheus. PromQL cannot limit data between 2 points, one from the past and one from the future. It can only calculate a metric limited by a point in the past and now or 2 points in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant