Remove default fields from logstash output

Hi all

Im going to use the logstash to send my logfiles to s3 and later Archie it via Glacier .

But my issue was logstash by default add the @timestamp and "host" parameter details to the output log


Input log: - - [28/Mar/2016:14:53:18 +0530] "POST /xmlrpc.php HTTP/1.0" 200 665 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"

Output Log of logstahsh

2016-03-28T09:25:32.624Z - - [28/Mar/2016:14:53:18 +0530] "POST /xmlrpc.php HTTP/1.0" 200 665 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"

Basically i want to remove the ,

@timestamp - > 2016-03-28T09:25:32.624Z and host : value from the output log so that i can copy the original log file to s3

is there any way to achieve it , please advice


by default S3 output plugin use the codec line, which encodes your event in simple string.
But you can specify format for the line codec, that will be sprintfed to string. For example:

output {
     access_key_id => "crazy_key"             (required)
     secret_access_key => "monkey_access_key" (required)
     endpoint_region => "eu-west-1"           (required)
     bucket => "boss_please_open_your_bucket" (required)
     size_file => 2048                        (optional)
     time_file => 5                           (optional)
     codec => line  {
        format =>  "%{message}"