# Logstash cvs plugin not sending data to index

**URL:** https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924
**Category:** Logstash
**Created:** [October 27, 2023, 1:24pm UTC](https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924 "2023-10-27T13:24:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)
#### Post date: [October 27, 2023, 1:24pm UTC](https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924/1 "2023-10-27T13:24:32Z")

</div>

Hello All,

I have csv files under one folder in windows system and need to send the data in elastic index using logstash. I'm not sure why data is not showing in index,though index getting created.  
Need key and value as json data in index.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0f7bcd7a6011b69cc5ed02c79e504b375dee8d05.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fe3a45baa5b86e3f71d5a9be93ea5fbed291e46f.png)

Another requirement:  
Same CSV Should not be processed again, not sure how to achieve this.

config:

```auto
input {
file {
      path=> "path => "D:\\app\\cis\\logstash_execl_data\\*.csv""(WORKS)
      **path => "D:\app\mis\logstash_execl_data\*.csv"(Dont work)**
      start_position => "beginning"

     }
}

filter {
        csv {
        separator => ","
        columns => ["brandName","hostName","instanceName","tcVersion","clientType","clientVersion","usecaseName","usecaseStepName","startTime","endTime","duration"]
}
}

output {
	elasticsearch {
		hosts => "https://abc:445"
		ilm_pattern => "{now/d}-000001"
		ilm_rollover_alias => "mis-logstash-excel-data"
		ilm_policy => "mis-monitoring-common-policy"
		api_key => "abc:lmn"
		ssl_enabled => true
		ssl_certificate_authorities => "my_path"
		http_compression => true
		data_stream => false
	}  
}

```

Please suggest something why data is not coming in index, as in log no error and how if data comes then same file should not process again?

Thanx

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [October 27, 2023, 1:58pm UTC](https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924/2 "2023-10-27T13:58:14Z")

</div>

> [@PRASHANT\_MEHTA](#):
>
> `path=> "path => "D:\\app\\cis\\logstash_execl_data\\*.csv""`

Change to:  
`path=> "D:/app/cis/logstash_execl_data/*.csv""`

---

<div class="post-metadata">

### Author: ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)
#### Post date: [October 27, 2023, 2:26pm UTC](https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924/3 "2023-10-27T14:26:16Z")

</div>

@Rios

Many thanx, this worked.  
Now I want that again this excel file once processed should not be processed again.How this can be managed?

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [October 29, 2023, 7:36am UTC](https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924/4 "2023-10-29T07:36:29Z")

</div>

You can:

1. Use sincedb to track read files which is the most common scenario  
`sincedb_path => "c:/path/file.db"`
2. Delete file after reading with [file\_completed\_action](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-file_completed_action)

---

<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: [November 26, 2023, 7:37am UTC](https://discuss.elastic.co/t/logstash-cvs-plugin-not-sending-data-to-index/345924/5 "2023-11-26T07:37:09Z")

</div>

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