# CSV files through LogStash into Elastic

**URL:** <https://discuss.elastic.co/t/csv-files-through-logstash-into-elastic/183340>\
**Category:** Logstash\
**Created:** [May 29, 2019, 1:38pm UTC](https://discuss.elastic.co/t/csv-files-through-logstash-into-elastic/183340 "2019-05-29T13:38:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![userelastic](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@userelastic](https://discuss.elastic.co/u/userelastic)\
**Post date:** [May 29, 2019, 1:38pm UTC](https://discuss.elastic.co/t/csv-files-through-logstash-into-elastic/183340/1 "2019-05-29T13:38:22Z")

</div>

Hi; I have a CSV file which I am trying to get into Elastic through Logstash. I am using filebeat to get file into the Logstash. I can see in the filebeat log that CSV file is processed successfully. Logstash does not show any errors while file is sent to it but no data is shown in Elastic. Following is my logstash config; can anyone please let me know what is wrong with this config: (" **o365logs**" files are processed file but " **cisco-prime**" is the new source which I added and is not working). Thanks in advance.

input {  
beats {  
port =\> 5044  
}  
}

filter {  
if "o365logs" in [tags] {  
csv {  
separator =\> ","  
autodetect\_column\_names =\> true  
skip\_empty\_columns =\> true  
skip\_empty\_rows =\> true  
columns =\> ["Received","SenderAddress","RecipientAddress","Subject","Status","ToIP","FromIP","Size","MessageId","MessageTraceId"]  
}  
mutate  
{  
remove\_field =\> ["message"]  
}  
}

if [fields][log\_type] == "cisco-prime"  
{  
csv {  
separator =\> ","  
autodetect\_column\_names =\> true  
skip\_empty\_columns =\> true  
skip\_empty\_rows =\> true  
columns =\> ["AP Name","Base Radio MAC","Event Time","Associated Client Count","Authenticated Client Count"]  
}  
mutate  
{  
remove\_field =\> ["message"]  
}

}  
}

output {  
if "o365logs" in [tags] {  
elasticsearch {  
hosts =\> ["[http://10.10.10.10:9200](http://10.10.10.10:9200)"]  
index =\> "o365-smtp"  
}  
}  
if [fields][log\_type] == "cisco-prime" {  
elasticsearch {  
hosts =\> ["[http://10.10.10.10:9200](http://10.10.10.10:9200)"]  
index =\> "logstash-ciscoprime-%{+YYYY.MM}"  
}  
}  
elasticsearch {  
hosts =\> ["[http://10.10.10.10:9200](http://10.10.10.10:9200)"]  
}  
}

---

<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 26, 2019, 1:48pm UTC](https://discuss.elastic.co/t/csv-files-through-logstash-into-elastic/183340/2 "2019-06-26T13:48:53Z")

</div>

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