# Logstash fail to parse dates when sending to elastic but not on rybydebug

**URL:** <https://discuss.elastic.co/t/logstash-fail-to-parse-dates-when-sending-to-elastic-but-not-on-rybydebug/73248>\
**Category:** Logstash\
**Created:** [January 30, 2017, 5:04pm UTC](https://discuss.elastic.co/t/logstash-fail-to-parse-dates-when-sending-to-elastic-but-not-on-rybydebug/73248 "2017-01-30T17:04:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmalossi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lmalossi/32/14766_2.png) [@lmalossi](https://discuss.elastic.co/u/lmalossi)\
**Post date:** [January 30, 2017, 5:04pm UTC](https://discuss.elastic.co/t/logstash-fail-to-parse-dates-when-sending-to-elastic-but-not-on-rybydebug/73248/1 "2017-01-30T17:04:46Z")

</div>

Hi,  
I get messages tagged with "dateparsefailure" only when sending messages to elastic but not on rubydebug

this is my typical message:  
####\<Jan 27, 2017 12:14:30 AM CET\> \<02srv006y6.ad02.eni.intranet\> \<weblogic.GCMonitor\> \<\> \<\> \<29d1948389fc1539:5ed6b398:159d6d2c9ad:-8000-00000000000000bc\> \<1485472470999\> \<38% of the total memory in the server is free\>

and this is my filter:

```
if [type] == "weblogic-log" {
    grok {
      patterns_dir => ["/etc/logstash/conf.d/weblogic_patterns"]
      match => { "message" => "%{WLS_SRV_LOG}" }
    }

    #
    # Sostituisco la timezxone di weblogic con l'equivalente numerico
    # e uso wsl_timestamp come timestamp del messaggio
    #
    mutate {
      gsub => ["wls_timestamp", "CET", "+0100"]
    }
    #mutate {
    # gsub => ["wls_timestamp", "CEST", "+0200"]
    #}
    date {
      match => ["wls_timestamp", "MMM dd, yyyy HH:mm:ss aa Z"]
    }

    # extract domain name and managed name
    grok {
      match => ["source","weblogic-logs\/%{DATA:domain_name}\/servers\/%{DATA:managed_name}\/"]
    }

    #
    # implement stuck thread alerting for production env
    #
    # check if thread is stuck (by BEA-000337 code)
    if "BEA-000337" in [message] {
      mutate {
        add_tag => ["stuck_thread"]
      }
    }
    # check if thread is unstuck (by BEA-000339 code)
    if "BEA-000339" in [message] {
      mutate {
        add_tag => ["unstuck_thread"]
      }
    }
    if "stuck_thread" in [tags]{
      mutate {
        replace => ["thread_status", "STUCK"]
      }
    }
    if "unstuck_thread" in [tags]{
      mutate {
        replace => ["thread_status", "UNSTUCK"]
      }
    }

    mutate {
      # cosmetic unification
      uppercase => ["severity"]
    }

```

This is Ryby Output:  
{  
"severity" =\> "INFO",  
"wls\_topic" =\> "Health",  
"server" =\> "wlsdommiw-01",  
"hostname" =\> "02srv006y6.ad02.eni.intranet",  
"@timestamp" =\> 2017-01-27T11:14:30.000Z,  
"wls\_timestamp" =\> "Jan 27, 2017 12:14:30 AM +0100",  
"@version" =\> "1",  
"host" =\> "02srv009oa.ad02.eni.intranet",  
"logmessage" =\> "\<weblogic.GCMonitor\> \<\> \<\> \<29d1948389fc1539:5ed6b398:159d6d2c9ad:-8000-00000000000000bc\> \<1485472470999\> \<38% of the total memory in the server is free\> ",  
"message" =\> "####\<Jan 27, 2017 12:14:30 AM CET\> \<02srv006y6.ad02.eni.intranet\> \<weblogic.GCMonitor\> \<\> \<\> \<29d1948389fc1539:5ed6b398:159d6d2c9ad:-8000-00000000000000bc\> \<1485472470999\> \<38% of the total memory in the server is free\> "  
}

Any Ideas?  
Regards  
Luca

---

<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:** [February 27, 2017, 5:05pm UTC](https://discuss.elastic.co/t/logstash-fail-to-parse-dates-when-sending-to-elastic-but-not-on-rybydebug/73248/2 "2017-02-27T17:05:16Z")

</div>

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