No data after CSV Export - Kibana

Hello Team,

In reference to No data after CSV Export - Kibana
I am also facing exact same issue. Could you please help me in fixing it?
Note:- I am using kibana 7.9.3.

Hi @njain213

Have you changed the xpack.reporting.csv.maxSizeBytes value increasing it?
It would help to share the logs that have the reporting tag also.

Also, can you download CSV ok from visualizations, or you have the same issue as with reporting?

Hi @Marco_Liberati

I have tried increasing xpack.reporting.csv.maxSizeBytes value but it didn't helped me out. Even for 5 results I am getting blank csv report as mentioned by other user for which I have shared reference. I am getting exact same issue.

When I have selected 1 day date and added filter, I got 14 hits and after saving it, I clicked on generate CSV.

Below is the latest csv that I have downloaded.

Are you talking about below logs? I have used grep command with keyword reporting in kibana logs and got below

{"type":"log","@timestamp":"2021-11-23T08:50:11Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:10.889Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:14Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-
/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:14.000Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:17Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:17.113Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:20Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-
/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:20.227Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:23Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:23.340Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:26Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-
/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:26.451Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:29Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:29.564Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}
{"type":"log","@timestamp":"2021-11-23T08:50:32Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-
/_search\n{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2021-11-23T08:50:32.676Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}"}

More info regarding logs. I have checked started and completion time in reporting tab.
image


{"type":"log","@timestamp":"2021-11-23T12:45:27Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-2021-11-21/_update/kwc3ccva0l3q7a5a326h2ccs?if_seq_no=0&if_primary_term=1\n{"doc":{"attempts":1,"started_at":"2021-11-23T12:45:27.121Z","process_expiration":"2021-11-23T12:47:27.121Z","status":"processing","kibana_id":"357b4983-ce1c-4944-8e83-81378f8c75c9","kibana_name":""}}"}


{"type":"log","@timestamp":"2021-11-23T12:45:28Z","tags":["debug","Elasticsearch","data","query"],"pid":870,"message":"200\nPOST /.reporting-2021-11-21/_update/kwc3ccva0l3q7a5a326h2ccs?if_seq_no=1&if_primary_term=1\n{"doc":{"status":"completed","completed_at":"2021-11-23T12:45:28.014Z","output":{"content":"\"@timestamp\",\"response-status\",\"proxy-url\",datacenter,\"proxy-elapsed-time-ms\"\n","content_type":"text/csv","max_size_reached":false,"csv_contains_formulas":false,"size":78}}}"}

I would propose to restore the xpack.reporting.csv.maxSizeBytes to its original value (10485760) and try again to generate a CSV from a small search.
That should help understand if it is a possible memory issue on the machine the server is running.

Also, what is the size of the downloaded CSV with only the first header row filled?

Last, can you confirm downloading a CSV from visualizations works ok?

Please find inline answers to your queries.

I would propose to restore the xpack.reporting.csv.maxSizeBytes to its original value ( 10485760 ) and try again to generate a CSV from a small search.
That should help understand if it is a possible memory issue on the machine the server is running.

I have tried with 10485760 value as well but no luck.

Also, what is the size of the downloaded CSV with only the first header row filled?

File that I have downloaded is of 78 bytes.

Last, can you confirm downloading a CSV from visualizations works ok?

I am confused on this point. Below are the steps that I am performing.

  1. Go to discover Tab
  2. Select index and date.
  3. When I got results, click on Save button and give any name.
  4. Click on share tab and click on generate csv option.

image

As for last point, I meant Visualization as TSVB, Lens or other aggregation based tools. Not Discover.

oh ok but I am not going on this, I am performing steps that I have mentioned above so need help on this part.

Do you need any other info from my side?

From the menu:

Visualize Library >
Create Visualization >
Lens

Drag and drop a field in the main central area and once the chart is displayed click on the top right toolbar Download CSV.

I have tried above steps but not able to find download csv option in right side that you have mentioned.

Oh sorry, just realized the Download CSV in Lens was introduced in a later version than 7.9.3 :man_facepalming: .

no Issues. Anything else you want me to try? If not please help me out in current issue that I am facing.

Also just for your info, this issue is not limited to particular index, I am getting this for all indices.

One more thing, is it known issue or any bug in this version?

I could not find any similar issue so far.
The strange pattern here is that headers are written, but the content is not.
Need to investigate a bit more to understand what is going on here.

sure thanks. I will wait for your response, meanwhile if you need any other info from my side then do let me know.

Hi @Marco_Liberati

Any luck in this issue?

I found this issue which seems to have similar effects to those you are experiencing: [Reporting] Streaming CSV download appears to not be working · Issue #119540 · elastic/kibana · GitHub

[Reporting] Streaming CSV download appears to not be working · Issue #119540 · elastic/kibana · GitHub is an open issue, what can be done to fix this? Do you recommend anything that I can try to fix this? Also issue that you are pointing is for around 100MB size but I am facing this even for small size.

Also in reported issue, browser connection will time out if the download is stalled 2 minutes or so but that is not happening in my case. Also it was mentioned in [Reporting] Streaming CSV download appears to not be working · Issue #119540 · elastic/kibana · GitHub , it started happening in 7.15.2 version so I believe my issue is not similar to this one.

Also can you confirm, the issue I am facing is bug or config issue?

Any update on this?