Can I delete the message field from Logstash?

James Jiang picture James Jiang · Sep 24, 2014 · Viewed 19.5k times · Source

I have a basic Logstash -> Elasticsearch setup, and it turns out the 'message' field is not required after the logstash filter done its job - storing this raw message field to elasticsearch is only adding unnecessary data to storage imo.

Can I safely delete this field and would it cause any trouble to ES? advices or readings are welcome, thanks all.

Answer

Ben Lim picture Ben Lim · Sep 24, 2014

No, it will not cause any trouble to ES. You can delete message field if it is redundant or unused.

You can add this filter to end of the filters.

mutate
{
     remove_field => [ "message" ]
}