# Don't know why \_grokparsefailure

**URL:** <https://discuss.elastic.co/t/dont-know-why-grokparsefailure/158217>\
**Category:** Logstash\
**Created:** [November 26, 2018, 4:21pm UTC](https://discuss.elastic.co/t/dont-know-why-grokparsefailure/158217 "2018-11-26T16:21:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Leite](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel_leite/32/41988_2.png) [@Miguel\_Leite](https://discuss.elastic.co/u/Miguel_Leite)\
**Post date:** [November 26, 2018, 4:21pm UTC](https://discuss.elastic.co/t/dont-know-why-grokparsefailure/158217/1 "2018-11-26T16:21:05Z")

</div>

Hello,

I'm trying to parse this log format:

`alarms_2gw:ddb_alr:Warn.GenProc-No:1306,Id:10462,TimeScada:26/11/1816:15:22,TimeSource:1543248887.0,Kidx:565141,state:1.000000,type:5,Hl0:LOCAL,Stat=0200H,AlrTyp=c2H,attr=10H`

I have the following logstash grok config filter:

```
 grok {

       match => { "full_msg" => ["^%{DATA:al_prgm}:ddb_alr:%{DATA:al_lvl}\.GenProc-No:%{INT:al_no},Id:%{INT:al_id},TimeScada:%{MONTHDAY:day_scada}/%{MONTHNUM:month_scada}/{YEAR:year_scada}%{TIME:time_scada},TimeSource:%{DATA:time_source},Kidx:%{DATA:kidx},state:%{DATA:state},type:%{INT:type},Hl0:%{DATA:local},Stat=%{DATA:stat},AlrTyp=%{DATA:alr_typ},attr=%{DATA:attr}$"] }
       add_tag => ["alarm2gw"]
 }

```

Anyone knows why is failing on grok? Using the Grok Debugger I have full match with this parse type.

---

<div class="post-metadata">

**Author:** ![bigphil](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bigphil](https://discuss.elastic.co/u/bigphil)\
**Post date:** [November 27, 2018, 5:21am UTC](https://discuss.elastic.co/t/dont-know-why-grokparsefailure/158217/2 "2018-11-27T05:21:19Z")

</div>

Your TIME pattern is invalid. TIME requires hh:mm:ss. If you never have seconds then this will work:  
^%{DATA:al\_prgm}:ddb\_alr:%{DATA:al\_lvl}.GenProc-No:%{INT:al\_no},Id:%{INT:al\_id},TimeScada:%{MONTHDAY:day\_scada}/%{MONTHNUM:month\_scada}/%{YEAR:year\_scada}:%{HOUR:hour\_scada}:%{MINUTE:minute\_scada},TimeSource:%{DATA:time\_source},Kidx:%{DATA:kidx},state:%{DATA:state},type:%{INT:type},Hl0:%{DATA:local},Stat=%{DATA:stat},AlrTyp=%{DATA:alr\_typ},attr=%{DATA:attr}$

---

<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:** [December 25, 2018, 5:21am UTC](https://discuss.elastic.co/t/dont-know-why-grokparsefailure/158217/3 "2018-12-25T05:21:22Z")

</div>

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