# Grok an Elasticsearch problem

**URL:** <https://discuss.elastic.co/t/grok-an-elasticsearch-problem/259675>\
**Category:** Elasticsearch\
**Created:** [December 27, 2020, 8:18am UTC](https://discuss.elastic.co/t/grok-an-elasticsearch-problem/259675 "2020-12-27T08:18:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mesutalf](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mesutalf](https://discuss.elastic.co/u/mesutalf)\
**Post date:** [December 27, 2020, 8:18am UTC](https://discuss.elastic.co/t/grok-an-elasticsearch-problem/259675/1 "2020-12-27T08:18:35Z")

</div>

Hi, I use ELK (7.2.x) my localhost and I have problem.  
I have log file like this;  
`2020-11-30 05:52:33,018 [9344] INFO Zdk.ServiceProvider.ServiceThread [] - Thread [Core[8047e7a3-c403-4fe4-ab87-9bea0c0ab449]:0]: idle check on every 15000ms`  
and l have logstash conf;

```auto
input {
   file {
        path => "/opt/log/ICU/*"
        start_position => "beginning"
        sincedb_path => "/dev/null"
   }
}

filter {
    grok {
        match => {"message" => "%{GREEDYDATA:logdate} \[%{INT:deger}\] %{LOGLEVEL:loglevel} %{GREEDYDATA:svctpye} \[\] - %{GREEDYDATA:message}.*"
        }
        add_field => { "tip" => "icu" }
    }
    date {
      match => ["logdate", "YYYY-MM-DD HH:mm:ss,SSS", "YYYY/MM/DD HH:mm:ss,SSS", "ISO8601"]
      remove_field => ["timestamp"]
    }
}

output {
   elasticsearch {
        hosts => ["localhost:9200"]
        index => "icu"
   }
}

```

When i start logstash i only see  
`_grokparsefailure`  
value on kibana. Some of records may not match my grok pattern. But i only see this record. Where are the success match records?  
Thanks.

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 27, 2020, 2:14pm UTC](https://discuss.elastic.co/t/grok-an-elasticsearch-problem/259675/2 "2020-12-27T14:14:19Z")

</div>

Check for 2 spaces after `%{LOGLEVEL:loglevel}`. Should be only 1.

After removing it worked and I show the below as the output which I think is what you want.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/1/4106d6a9aa5992bf248914beb92e5e2941fad1b9.png)

---

<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:** [January 24, 2021, 2:14pm UTC](https://discuss.elastic.co/t/grok-an-elasticsearch-problem/259675/3 "2021-01-24T14:14:36Z")

</div>

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