# Incoming syslog date missing in timestamp

**URL:** <https://discuss.elastic.co/t/incoming-syslog-date-missing-in-timestamp/310916>\
**Category:** Logstash\
**Created:** [July 28, 2022, 6:36pm UTC](https://discuss.elastic.co/t/incoming-syslog-date-missing-in-timestamp/310916 "2022-07-28T18:36:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giridharan\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giridharan_c/32/102396_2.png) [@Giridharan\_C](https://discuss.elastic.co/u/Giridharan_C)\
**Post date:** [July 28, 2022, 6:36pm UTC](https://discuss.elastic.co/t/incoming-syslog-date-missing-in-timestamp/310916/1 "2022-07-28T18:36:53Z")

</div>

Hi, I'm receiving Syslog from logstash pipeline and that doesn't have a date field. How can I manipulate the date using the system's current date by matching "message\_time"?

```auto
"message_time" => "13:51:10"

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 28, 2022, 6:48pm UTC](https://discuss.elastic.co/t/incoming-syslog-date-missing-in-timestamp/310916/2 "2022-07-28T18:48:50Z")

</div>

You could try

```
mutate { replace => { "message_time" => "%{+YYYY/MM/dd} %{message_time}" } }

```

Note that this uses the value of [@timestamp], which may be wrong. If syslog sends a message at 23:59:59.999 then logstash will get it the next day and add the next day's date to that time. If that is a dealbreaker then you would have to write some logic in a ruby filter to determine how improbable the resulting date+time is, and how to adjust it.

---

<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:** [August 25, 2022, 6:49pm UTC](https://discuss.elastic.co/t/incoming-syslog-date-missing-in-timestamp/310916/3 "2022-08-25T18:49:02Z")

</div>

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