# Logstash fetched data not available in elastic search

**URL:** <https://discuss.elastic.co/t/logstash-fetched-data-not-available-in-elastic-search/325216>\
**Category:** Logstash\
**Created:** [February 10, 2023, 6:57am UTC](https://discuss.elastic.co/t/logstash-fetched-data-not-available-in-elastic-search/325216 "2023-02-10T06:57:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekambaram\_varathan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ekambaram_varathan/32/117094_2.png) [@ekambaram\_varathan](https://discuss.elastic.co/u/ekambaram_varathan)\
**Post date:** [February 10, 2023, 6:57am UTC](https://discuss.elastic.co/t/logstash-fetched-data-not-available-in-elastic-search/325216/1 "2023-02-10T06:57:32Z")

</div>

Hi Team,  
I am using ELK version: 6.8.23. Though Logstash uploaded csv file data are not present in elasticsearch.

my logstash conf file content as follows,

```auto
input {
  file {
    path => "/home/data/reports/*.csv"
    start_position => "beginning"
    type => metric2
  }
}

filter {
      csv {
        separator => ","
        skip_header => "true"
        columns => ["from_date","to_date","total_builds_triggered","builds_retriggered","mpm_build_success","mpm_build_error","mpm_success_rate","image_success","image_error","image_success_rate"]
     }

    }

output {
  if [type]=="metric2" {
  elasticsearch {
  hosts => "http://localhost:9200"
  index => "test"
  document_type => "test_logs"
  }
}
stdout {
}
    }

```

In logstash logs i dont find any reasons, Please let me know how do i solve this problem ?

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [February 14, 2023, 3:26am UTC](https://discuss.elastic.co/t/logstash-fetched-data-not-available-in-elastic-search/325216/2 "2023-02-14T03:26:58Z")

</div>

Try quoting metric2 in the input section. For example: `type => "metric2"`  
Thinking your if statement in the output section is never evaluating true.

---

<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:** [March 14, 2023, 3:27am UTC](https://discuss.elastic.co/t/logstash-fetched-data-not-available-in-elastic-search/325216/3 "2023-03-14T03:27:59Z")

</div>

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