# Csv file headers are missing in logstash output

**URL:** <https://discuss.elastic.co/t/csv-file-headers-are-missing-in-logstash-output/155241>\
**Category:** Logstash\
**Created:** [November 3, 2018, 2:55am UTC](https://discuss.elastic.co/t/csv-file-headers-are-missing-in-logstash-output/155241 "2018-11-03T02:55:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chamani\_Shiranthika](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chamani_shiranthika/32/35792_2.png) [@Chamani\_Shiranthika](https://discuss.elastic.co/u/Chamani_Shiranthika)\
**Post date:** [November 3, 2018, 2:55am UTC](https://discuss.elastic.co/t/csv-file-headers-are-missing-in-logstash-output/155241/1 "2018-11-03T02:55:18Z")

</div>

I am generating a csv file by loading a log file from filebeat and using logstash to process the data specifying the input and output. The format of logstash output configuration is as follows.

```
output {
        csv {
     fields => ["fieldA","fieldB"]
            path => "/home/csv_reports/%{+YYYY}-%{+MM}-%{+dd}/myReport.csv"
       
        }
}

```

The data in the logfile is correctly loaded into the csv file without any problem displays in the 2 fields. But the header names are missing. How to resolve this issue.?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 1, 2018, 2:55am UTC](https://discuss.elastic.co/t/csv-file-headers-are-missing-in-logstash-output/155241/2 "2018-12-01T02:55:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
