How to disable all formatting/processing done by logstash

I am using logstash purely to upload them to my S3 bucket. My logs are already formatted nicely and I do not want any further formatting done on it.

Is there any way to disable all the processing done by logstash? It's current prepending this to all my logs, and I don't want them:

2020-08-18T10:30:24.599Z ip-x-x-x-x

What output configuration are you using?

My configuration is like this, placed in the conf.d folder. Everything else is untouched:

input {
  file {
    path => "/home/user/vf_xxxx/current/log/*.log"

output {
  s3 {
    region => "ap-southeast-1"
    bucket => "vf-xxxx"
    size_file => 20000

Anything? I find it really strange how Logstash is unable to simply just watch a folder for logs and just upload them directly. Why the forced need to prepend 2020-08-24T03:33:42.908Z ip-x-x-x-x to all my logs?

An s3 output uses a line codec by default. A line codec calls .to_s on the event if it is not given a format to use. to_s adds a timestamp and hostname. If you do not want it do do that then set the format option on the codec.

1 Like

Nice, that works. Thank you.

Just need to add this inside the s3 block:

codec => line { 
  format => "%{message}" 
1 Like

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