Generate kibana-report with filters

How can we generate reports with queries?
I have a dashboard with a user selector at the top, if I don’t select any user dashboard will show data for all users, if I select the user from the selector then it will show data for that user alone.

When we want to generate report with the filters added, it’s not considering the selected filters, generated report is for all users and not for selected user.

Is it not supported? any option to do this?

If while dashboard creation I add some filters and store that dashboard with filter that filteris getting refelcted in reports. But how will I be able to do it dynamically? change filters in dashboard.

Are you saving your search? You can generate report based on a saved search and your filters should come along with that.

If I save that search with dashboard, then it will be a static filter saved with dashboard, I am not sure how many users will be there in selector in future.

for example if I have 4 systems IP in selector, now those systems will not be constant, some may get removed and some may get added.

Now three cases are there:
case1: Add filters to dashboard, don’t save dashboard with filters, simply click reporting → Download PDF
This will have added filter in the report.

case2: Add filters to dashboard, don’t save dashboard with filters. create report definition.
As filters will not be part of saved dashboard, while creating definition there is no option to add filters. so generated report will not have dynamic filters.

case3: Edit dashboard, Add required filters, save dashboard. Create report definition with this edited dashboard.
Generated Report will have filters now, as those filters are part of dashboard, because createDefination API taking URL as /path/to/api/dashboard_id
but this will be static filters.

I’m trying to understand:

  • With your case 1, does that not meet your need?
  • Are you wanting to be able to add filters as an UI item from the “Report definition details” panel?

The first case will serve the purpose, but if I want to schedule the report generation means, I need to create report definition and it won’t consider filters.
Yes, as per your second point, I want something like that, add filters during report definition.

OK. Sounding a little more clear.

When you talk about scheduling the report, the filters would be set at the time of creating the report definition and not changed after that?