Mutate beats field

I cannot seem to get this to work:

mutate { add_field => { "hostname" => "%{beat.hostname}" } }

I used this template of code quite a bit and it is working just fine for other items.

I end up with this, visible from Kibana:

t hostname %{BEAT.HOSTNAME}

You're using the wrong notation for nested fields.

https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references

Ohhh, so:

%{[beat].[hostname]} ?

No, %{[beat][hostname]}.

Ah....muchas gracias!

In terms of things like packetbeat and winlogbeat, is there an easy way to change the field names?

I want get some of them in line with other fields names created from my groks.

I can see in new logs coming in, that worked. Thank you very much sir.

In terms of things like packetbeat and winlogbeat, is there an easy way to change the field names?

I doubt you can change the field names being sent from those tools but you can certainly use Logstash to rename them.

Yea true. Didn't want to add any undue cycles unless I needed to.

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