# Logstash CSV output plugin not working

**URL:** https://discuss.elastic.co/t/logstash-csv-output-plugin-not-working/97488
**Category:** Logstash
**Created:** [August 17, 2017, 9:11pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-not-working/97488 "2017-08-17T21:11:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ashvita](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ashvita](https://discuss.elastic.co/u/ashvita)
#### Post date: [August 17, 2017, 9:11pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-not-working/97488/1 "2017-08-17T21:11:36Z")

</div>

Hi,

I am trying to have 2 outputs in my config file. One elastic search and other csv. But my csv file is not getting generated.

Below is my conf file -  
input{  
kafka{  
bootstrap\_servers =\> "10.100.208.97:9092"  
topics =\> ['logstash']  
decorate\_events =\> true  
}  
}

filter{  
grok{  
match =\> ['message', '%{SYSLOGTIMESTAMP:@timestamp} %{DATA:Arch} %{DATA:Server}: %{DATA:Junk} %{WORD:Info} %{GREEDYDATA:log\_message}']  
break\_on\_match =\> false  
}

```
    grok{
	 match => ['message', '..Workaround..']
    	    add_tag => 'workaround'
	    tag_on_failure => []
    	    break_on_match => true
}

```

grok{  
match =\> ['message', '..ZTR..']  
add\_tag =\> 'ztr'  
tag\_on\_failure =\> []  
break\_on\_match =\> true  
}

}

output{  
elasticsearch{  
hosts =\> ['localhost:9200']  
index =\> "logs"  
user =\> logstash\_internal\_logs  
password =\> changeme  
}

```
if [tags] == "ztr"{
csv {
	fields => ["message"]
	path => "/home/elk/ztr.csv"
	}
}

    stdout{ codec => rubydebug}

```

}

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [August 18, 2017, 6:20am UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-not-working/97488/2 "2017-08-18T06:20:01Z")

</div>

What does `stdout{ codec => rubydebug}` produce for an event that doesn't end up in the CSV?

---

<div class="post-metadata">

### Author: ![ashvita](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ashvita](https://discuss.elastic.co/u/ashvita)
#### Post date: [August 18, 2017, 11:16pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-not-working/97488/3 "2017-08-18T23:16:06Z")

</div>

It doesnt give out anything on console. It just shows the json which was fed to elastic search.

---

<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: [September 15, 2017, 11:16pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-not-working/97488/4 "2017-09-15T23:16:15Z")

</div>

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