-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Reporting URL from Discover has no relative time range mode #22261
Comments
A user I was talking to also needs this fixed and needs to be able to generate CSV report URLs with relative time intervals for the sake of periodic reports generated through watcher. |
Tracking this issue to make sure that as we improve the API for generating reports, we will support absolute + relative time ranges in the request. |
This is WIP for the new CSV export API: #34571 |
This is still being tracked as not started. The new CSV Export API still only has time range params as The job parameters for CSV report creation require a lot of browser-side Kibana APIs. This is an important enhancement to work on, for side reasons: we have other potential improvements to do whenever the browser-side APIs are involved. |
I looked into this further and found that Reporting is gathering the query within the jobParams via referencing Discover code. That is how we want the code ownership split. Reporting calls Somewhere in the generation of the query body, the relative time range that we want is getting converted to an absolute time range. |
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
Just wanted to add that I am also experiencing this issue and would prefer that the dynamic range is preserved. |
Also experiencing this issue when generating .csv reports with Watcher. |
Example of my work around: #not fixed
#fixed
Replaced With |
I investigating this in more depth in hopes of fixing it. Here is what I found:
I think a fix would be to wait for the necessary code for search generation is available on the server side so Reporting can use it properly. Then CSV export job params would just contain the saved search ID and the relative time filters *. The fact that relative time gets converted to absolute at the time of the search shouldn't matter.
|
Pinging @elastic/kibana-app-services (Team:AppServices) |
This feature is an absolute must to have. Without this feature, wasted many hours to simply edit the time range from absolute to relative. |
Any update on this, this is still not resolved. Please do something about it. |
Yes I'm running 7.16.x, I can remember it worked before on version < 7.16.x. Thanks for the update. |
When exporting data as CSV from the Discover application, the job parameters use an absolute time range that was co-erced into the POST URL:
Time range portion appears to be:
range:(updated_at:(format:epoch_millis,gte:1534808045652,lte:1534811645652))
In contrast, PDF export from Dashboard appears to have the desired behavior:
Time range portion appears to be:
time:(from:now-1h,mode:quick,to:now)
Relative range is necessary when automating report generation from watcher, for example, if we want to generate a CSV and send to email every day, we need to have
now-1d
tonow
as the range.As a workaround, the URL could be modified by hand like so:
However URLs should be copied as generated.
The text was updated successfully, but these errors were encountered: