# Logstash throwing error for filter portion when trying to convert csv to elastic search

**URL:** https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584
**Category:** Logstash
**Created:** [May 12, 2018, 4:23pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584 "2018-05-12T16:23:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Nithin\_Nk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nithin_nk/32/31137_2.png) [@Nithin\_Nk](https://discuss.elastic.co/u/Nithin_Nk)
#### Post date: [May 12, 2018, 4:23pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/1 "2018-05-12T16:23:50Z")

</div>

Fixed so deleting

---

<div class="post-metadata">

### Author: ![Nithin\_Nk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nithin_nk/32/31137_2.png) [@Nithin\_Nk](https://discuss.elastic.co/u/Nithin_Nk)
#### Post date: [May 12, 2018, 4:30pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/3 "2018-05-12T16:30:25Z")

</div>

## sorry, This is my config:

input {  
file {  
path =\> "/opt/TenantAvailabilityCheckConsolidatedCustomReport.csv"  
start\_position =\> "beginning"  
ignore\_older =\> 0  
sincedb\_path =\> "/persistent/log"  
sincedb\_write\_interval =\> 10  
}  
}  
filter {  
csv {  
seperator =\> ","  
columns =\> ["Customer Name", "Tenant ID", "Cluster", "Application ID", "Business Type", "Component Name", "Error Message", "Reported On or Before Date-Time", "Closed On or Before Date-Time", "Current Status"]  
mutate {  
convert =\> { "Reported On or Before Date-Time" =\> "integer"  
"Closed On or Before Date-Time" =\> "integer"  
}  
}

```
    }

```

}

output {  
elasticsearch {  
hosts =\> "localhost"  
index =\> "logs"  
document\_type =\> "error\_logs"  
}

stdout{}  
}

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [May 12, 2018, 4:31pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/4 "2018-05-12T16:31:49Z")

</div>

You seem to be missing a curly brace to close the `csv` block before the `mutate` block starts.

---

<div class="post-metadata">

### Author: ![Nithin\_Nk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nithin_nk/32/31137_2.png) [@Nithin\_Nk](https://discuss.elastic.co/u/Nithin_Nk)
#### Post date: [May 12, 2018, 4:34pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/5 "2018-05-12T16:34:35Z")

</div>

@Christian_Dahlqvist  
Thanks, I done that... Now the error changed to

Unknown setting 'seperator' for csv {:level=\>:error}  
Error: Something is wrong with your configuration. {:level=\>:error}

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [May 12, 2018, 6:13pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/6 "2018-05-12T18:13:09Z")

</div>

I think the error message is quite clear. It is `separator`, not `seperator`.

---

<div class="post-metadata">

### Author: ![Nithin\_Nk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nithin_nk/32/31137_2.png) [@Nithin\_Nk](https://discuss.elastic.co/u/Nithin_Nk)
#### Post date: [May 14, 2018, 3:42pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/7 "2018-05-14T15:42:11Z")

</div>

Thanks Christian. @Christian_Dahlqvist Now I am able to process the csv. But still I have some issue. say for example  
This is my csv file

Header:  
Customer Name,Tenant ID,Cluster,Application ID,Business Type,Component Name,Error Message,Reported On or Before Date-Time,Closed On or Before Date-Time,Current Status

Values:  
customerxvz,e0431,GBT132,e0431tmn,Test,CXF-endpoint-IFLMAP-hcisbt,"[CXF][CXF][EXCEPTION]:java.net.SocketTimeoutException: Read timed out (local port 59858 to address 10.78.28.107 (vsa3873176.od.sap.biz), remote port 443 to address 155.56.210.165)",29-4-2018 00:03:54 UTC,29-4-2018 02:03:58 UTC,Completed

But with the above configuration file result I got is:

message:customerxyz,e0431,GBT132,e0431iflmap,Test,Messaging Service (JMS),State Message is returning Null,30-4-2018 07:45:30 UTC,08-5-2018 06:54:28 UTC,Completed Customer Name:customerxyz Tenant ID:e0431 @version:1 @timestamp:May 14th 2018, 18:07:06.805 path:/opt/TenantAvailabilityCheckConsolidatedCustomReport.csv host:devops Cluster:GBT132 Application ID:e0431iflmap Business Type:Test Component Name:Messaging Service (JMS) Error Message:State Message is returning Null Reported On or Before Date-Time:30 Closed On or Before Date-Time:8 Current Status:Completed \_id:AWNep4WMau29r0E95zBe \_type:error\_logs \_index:hurray \_score:

We can see that these are not the fields expected. Fields mismatch each other. Some fits and some are misplaced. Is there any additional match I have to done?

---

<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: [June 11, 2018, 3:42pm UTC](https://discuss.elastic.co/t/logstash-throwing-error-for-filter-portion-when-trying-to-convert-csv-to-elastic-search/131584/8 "2018-06-11T15:42:13Z")

</div>

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