# Correct parsing Syslog message to json

**URL:** <https://discuss.elastic.co/t/correct-parsing-syslog-message-to-json/326564>\
**Category:** Logstash\
**Created:** [February 27, 2023, 10:29am UTC](https://discuss.elastic.co/t/correct-parsing-syslog-message-to-json/326564 "2023-02-27T10:29:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 27, 2023, 5:07pm UTC](https://discuss.elastic.co/t/correct-parsing-syslog-message-to-json/326564/2 "2023-02-27T17:07:34Z")

</div>

I suggest using dissect to parse the prefix and then using a json filter to parse the rest. Something similar to [this](https://discuss.elastic.co/t/how-to-strip-events-from-message-field-logstash-syslog/279110/7) (except that uses kv rather than json).

---

_[View the full topic](https://discuss.elastic.co/t/correct-parsing-syslog-message-to-json/326564)._
