# Using logstash how can i get the values that are in \[ \] to .csv file?

**URL:** <https://discuss.elastic.co/t/using-logstash-how-can-i-get-the-values-that-are-in-to-csv-file/71846>\
**Category:** Logstash\
**Created:** [January 17, 2017, 10:41am UTC](https://discuss.elastic.co/t/using-logstash-how-can-i-get-the-values-that-are-in-to-csv-file/71846 "2017-01-17T10:41:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [January 17, 2017, 10:41am UTC](https://discuss.elastic.co/t/using-logstash-how-can-i-get-the-values-that-are-in-to-csv-file/71846/1 "2017-01-17T10:41:53Z")

</div>

Hi,

i have logs in the format  
[2017-01-13 21:21:03,956][WARN][index.search.slowlog.query] [Yaswanth] [bank][0] took[28.9ms], took\_millis[28], types[], stats[], search\_type[QUERY\_THEN\_FETCH], total\_shards[5], source[], extra\_source[],

when i send it to .csv file it is showing like this ,because the default separator is ","

[2017-01-13 21:21:03 --column 1  
956][WARN][index.search.slowlog.query] [Yaswanth] [bank][0] took[28.9ms] --column 2  
took\_millis[28] --column 3  
types[] --column4  
stats[] --column 5  
search\_type[QUERY\_THEN\_FETCH] --column 6  
total\_shards[5] --column 7  
source[] --column 8  
extra\_source[] --column 9

But what i want is the content that is in "[]" .  
2017-01-13 21:21:03,956 column1  
WARN column 2  
index.search.slowlog.query column 3  
and so on.. column ......

Even i tried giving

csr {  
separator =\> "[]"  
}  
But nothing worked..

Can anyone help me on this?  
Thanks

---

<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:** [February 14, 2017, 10:42am UTC](https://discuss.elastic.co/t/using-logstash-how-can-i-get-the-values-that-are-in-to-csv-file/71846/2 "2017-02-14T10:42:05Z")

</div>

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