# Logs not being sent if multiple fields in grok pattern

**URL:** <https://discuss.elastic.co/t/logs-not-being-sent-if-multiple-fields-in-grok-pattern/352881>\
**Category:** Logstash\
**Created:** [February 8, 2024, 5:10pm UTC](https://discuss.elastic.co/t/logs-not-being-sent-if-multiple-fields-in-grok-pattern/352881 "2024-02-08T17:10:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vuvu](https://avatars.discourse-cdn.com/v4/letter/v/8c91f0/32.png) [@vuvu](https://discuss.elastic.co/u/vuvu)\
**Post date:** [February 8, 2024, 5:10pm UTC](https://discuss.elastic.co/t/logs-not-being-sent-if-multiple-fields-in-grok-pattern/352881/1 "2024-02-08T17:10:16Z")

</div>

hi! I have the following filter which works fine:

```auto
filter {
  grok {
    match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp}" }
  }

  date {
    match => ["syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]
    target => "@timestamp"
  }
}

```

But if I change the grok filter to this:

```auto
grok {
    match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_host} %{DATA:syslog_program}: %{GREEDYDATA:syslog_message}" }
  }

```

It does not work anymore, the logs are not injected into kibana anymore. Why does this happen? I checked the pattern in a Grok Debugger. These are some sample logs:

```auto
Feb 7 12:35:56 hostnamexxxxxxxxxx systemd: Created slice User Slice of root.
Feb 7 12:30:01 hostnamexxxxxxxxxx systemd: Started Session 9520 of user root.
Feb 7 12:12:59 hostnamexxxxxxxxxx systemd-logind: Removed session 3893.

```

What could be the issue here?

---

<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 8, 2024, 5:26pm UTC](https://discuss.elastic.co/t/logs-not-being-sent-if-multiple-fields-in-grok-pattern/352881/2 "2024-02-08T17:26:17Z")

</div>

> [@vuvu](#):
>
> the logs are not injected into kibana anymore

If logstash is processing events but they are not reaching elasticsearch then I cannot think of any case in which there would NOT be an error in the logstash logs.

I would start by using `output { stdout { codec => rubydebug } }` to verify then grok is working, then verify the events are reaching elasticsearch using the [document counts](https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html), then figure out why the documents do not show up in your current Kibana search window.

---

<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:** [March 7, 2024, 5:44pm UTC](https://discuss.elastic.co/t/logs-not-being-sent-if-multiple-fields-in-grok-pattern/352881/4 "2024-03-07T17:44:23Z")

</div>

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