# Field is filled in stdout but empty in elasticsearch

**URL:** <https://discuss.elastic.co/t/field-is-filled-in-stdout-but-empty-in-elasticsearch/160760>\
**Category:** Logstash\
**Created:** [December 13, 2018, 2:45pm UTC](https://discuss.elastic.co/t/field-is-filled-in-stdout-but-empty-in-elasticsearch/160760 "2018-12-13T14:45:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lokylax](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@lokylax](https://discuss.elastic.co/u/lokylax)\
**Post date:** [December 13, 2018, 2:45pm UTC](https://discuss.elastic.co/t/field-is-filled-in-stdout-but-empty-in-elasticsearch/160760/1 "2018-12-13T14:45:03Z")

</div>

Hi everyone

I am new to elastic stack and I am trying to parse multiline logs for the first time. (like this)

```
2018-06-04 13:42:01,436 INFO (main) [en.vke.ultil.ServerStateChecker] - Server is not ready yet : Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
	at $Proxy11.getServerState(Unknown Source)
Caused by: java.net.SocketTimeoutException: Receive timed out

```

I am using this pattern :  
`%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:loglevel} (%{DATA:info}) %{SYSLOG5424SD:service} - %{GREEDYDATA:logmessage}`

When I show the output with the stdout codec it is working as I want and I have

```
Server is not ready yet : Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
    	at $Proxy11.getServerState(Unknown Source)
    Caused by: java.net.SocketTimeoutException: Receive timed out

```

In the "logmessage" field.  
But when I query elasticsearch to see the data, the field is empty and the lines aren't parsed but they written outside the field.

I don't know why it is acting differently so I'm requesting some help or hints to help me fix this.

Thanks !

---

<div class="post-metadata">

**Author:** ![chandra0651](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chandra0651/32/30484_2.png) [@chandra0651](https://discuss.elastic.co/u/chandra0651)\
**Post date:** [December 13, 2018, 4:18pm UTC](https://discuss.elastic.co/t/field-is-filled-in-stdout-but-empty-in-elasticsearch/160760/2 "2018-12-13T16:18:48Z")

</div>

Try below.

`%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:loglevel} \(%{DATA:info}\) \[%{SYSLOG5424SD:service}\] - %{GREEDYDATA:logmessage}`

---

<div class="post-metadata">

**Author:** ![lokylax](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@lokylax](https://discuss.elastic.co/u/lokylax)\
**Post date:** [December 14, 2018, 7:28am UTC](https://discuss.elastic.co/t/field-is-filled-in-stdout-but-empty-in-elasticsearch/160760/3 "2018-12-14T07:28:21Z")

</div>

This is giving me a grok parse failure ☹

EDIT : I forgot to mention it in the first post, but my multine pattern is :

> ```
> codec => multiline {
> pattern => "^%{TIMESTAMP_ISO8601} "
> negate => true
> what => "previous"
> }
> 
> ```

---

<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:** [January 11, 2019, 7:28am UTC](https://discuss.elastic.co/t/field-is-filled-in-stdout-but-empty-in-elasticsearch/160760/4 "2019-01-11T07:28:23Z")

</div>

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