# Can't get text on a START\_OBJECT

**URL:** <https://discuss.elastic.co/t/cant-get-text-on-a-start-object/250010>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 25, 2020, 6:06pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-start-object/250010 "2020-09-25T18:06:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhansibalu](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@jhansibalu](https://discuss.elastic.co/u/jhansibalu)\
**Post date:** [September 25, 2020, 6:06pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-start-object/250010/1 "2020-09-25T18:06:12Z")

</div>

**Hi I am sending logs to kibana using filebeat ,and I am facing below error while sending logs .Some of the events doesn't have host in raw data facinf error for that events.**

[2020-09-24T09:20:40,591][WARN][logstash.outputs.elasticsearch][main] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"filetest-", :routing=\>nil, :\_type=\>"\_doc"}, #LogStash::Event:0x6eb22ef8], :response=\>{"index"=\>{"\_index"=\>"filetest-", "\_type"=\>"\_doc", "\_id"=\>"keBFwHQB9GB4WNUD5v0d", "status"=\>400, "error"=\>{"type"=\>"mapper\_par`Preformatted text`sing\_exception", "reason"=\>"failed to parse field [host.hostname] of type [keyword] in document with id 'keBFwHQB9GB4WNUD5v0d'. Preview of field's value: '{}'", "caused\_by"=\>{"type"=\>"illegal\_state\_exception", "reason"=\>"Can't get text on a START\_OBJECT at 1:603"}}}}}

**my logstash config is:**

```
input {
  beats {
    host => "192.168.1.242"
    port => 5526
  }
}
filter {

   grok {
       match => [
          "message", "%%{CISCO_REASON:network}-%{INT}-%{CISCO_REASON}:"
         "message", "(%{TIME}|%{TIMESTAMP_ISO8601}|%{YEAR}) %{HOSTNAME:host} %{WORD:[event][category]}.*?:%{GREEDYDATA:summary}" ]
       overwrite => ["host"]
    }
   mutate { rename => { "host" => "[host][hostname]" } }
}
 
output {
  elasticsearch {
hosts => ["192.168.1.242:9200"]
index => "filebeattest-"

  }
  stdout {
codec => rubydebug
  }
}

```

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 28, 2020, 3:25am UTC](https://discuss.elastic.co/t/cant-get-text-on-a-start-object/250010/2 "2020-09-28T03:25:15Z")

</div>

> [@jhansibalu](#):
>
> failed to parse field [host.hostname]

> [@jhansibalu](#):
>
> Preview of field's value: '{}'"

So it looks like there is no hostname there?

We've also explained this error here - [Can't get text on a START\_OBJECT](https://discuss.elastic.co/t/cant-get-text-on-a-start-object/244340)

---

<div class="post-metadata">

**Author:** ![jhansibalu](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@jhansibalu](https://discuss.elastic.co/u/jhansibalu)\
**Post date:** [September 28, 2020, 4:02pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-start-object/250010/3 "2020-09-28T16:02:23Z")

</div>

Thanks for your response but still have small issue , I tried with your solution added below configuration to my conf file

```
if ! [host][hostname] {
mutate { rename => { "[host]" => "[host][hostname]" } }
mutate { replace => { "[host]" => "%{[host][name]}" } }
 }
}

```

I am getting below output for **host.hostname** field

> host.hostname {"hostname":"euw2a-aero03"}

why it's taking hostname word along with value? Please help me on this

---

<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:** [October 26, 2020, 6:02pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-start-object/250010/4 "2020-10-26T18:02:24Z")

</div>

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