# Dateparsefailure - Mac Syslogs

**URL:** <https://discuss.elastic.co/t/dateparsefailure-mac-syslogs/130511>\
**Category:** Logstash\
**Created:** [May 3, 2018, 6:12pm UTC](https://discuss.elastic.co/t/dateparsefailure-mac-syslogs/130511 "2018-05-03T18:12:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TCBeeekley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tcbeeekley/32/60922_2.png) [@TCBeeekley](https://discuss.elastic.co/u/TCBeeekley)\
**Post date:** [May 3, 2018, 6:12pm UTC](https://discuss.elastic.co/t/dateparsefailure-mac-syslogs/130511/1 "2018-05-03T18:12:39Z")

</div>

Hello!

Brand new to the Elasticstack, I have a question about date filtering. Here's the sample message:

`May 3 14:08:41 foo-hostname com.apple.xpc.launchd[1] (com.apple.preference.displays.MirrorDisplays): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.`

Here's the filter from my yml file:

```
filter {
  grok{
    match => ["message", "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{GREEDYDATA:syslog_message}"]
  }
  date {
    match => ["syslog_timestamp", "MMM dd HH:mm:ss"]
  }
}

```

It's giving me a dateparsefailure tag and I can't seem to figure out why...

Thanks!

Tim

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 3, 2018, 6:29pm UTC](https://discuss.elastic.co/t/dateparsefailure-mac-syslogs/130511/2 "2018-05-03T18:29:26Z")

</div>

You use "dd" in your pattern but the day of month (3) is only one character long. You need to list two patterns in your filter; one with "dd" and one with "d".

---

<div class="post-metadata">

**Author:** ![TCBeeekley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tcbeeekley/32/60922_2.png) [@TCBeeekley](https://discuss.elastic.co/u/TCBeeekley)\
**Post date:** [May 7, 2018, 7:21pm UTC](https://discuss.elastic.co/t/dateparsefailure-mac-syslogs/130511/3 "2018-05-07T19:21:43Z")

</div>

That was it! Thanks!

---

<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:** [June 4, 2018, 7:21pm UTC](https://discuss.elastic.co/t/dateparsefailure-mac-syslogs/130511/4 "2018-06-04T19:21:47Z")

</div>

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