# How to pick up only ip address and timestamp from log message

**URL:** <https://discuss.elastic.co/t/how-to-pick-up-only-ip-address-and-timestamp-from-log-message/126426>\
**Category:** Logstash\
**Created:** [April 2, 2018, 12:46pm UTC](https://discuss.elastic.co/t/how-to-pick-up-only-ip-address-and-timestamp-from-log-message/126426 "2018-04-02T12:46:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eswar\_Kumar\_Musiboin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eswar_kumar_musiboin/32/28623_2.png) [@Eswar\_Kumar\_Musiboin](https://discuss.elastic.co/u/Eswar_Kumar_Musiboin)\
**Post date:** [April 2, 2018, 12:46pm UTC](https://discuss.elastic.co/t/how-to-pick-up-only-ip-address-and-timestamp-from-log-message/126426/1 "2018-04-02T12:46:47Z")

</div>

I am having a big log message and i have to pick up only ip and timestamp in that message. is it work?? . anybody find out help

msg:

Apr 2 06:34:32 logmessage[213456]: this is log message of the system with an ip:123.456.789.1

i need to pick only ip and timestamp from this message

---

<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:** [April 2, 2018, 2:27pm UTC](https://discuss.elastic.co/t/how-to-pick-up-only-ip-address-and-timestamp-from-log-message/126426/2 "2018-04-02T14:27:52Z")

</div>

```auto
  dissect { mapping => { "message" => "%{ts} %{+ts} %{+ts} %{} ip:%{ip}" } }
  date { match => ["ts", "MMM d HH:mm:ss"] }

```

perhaps

---

<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:** [April 30, 2018, 2:28pm UTC](https://discuss.elastic.co/t/how-to-pick-up-only-ip-address-and-timestamp-from-log-message/126426/3 "2018-04-30T14:28:07Z")

</div>

Closed on April 30, 2018, 2:28pm UTC

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