# Logstash Output Issue

**URL:** <https://discuss.elastic.co/t/logstash-output-issue/329319>\
**Category:** Logstash\
**Created:** [April 4, 2023, 12:55pm UTC](https://discuss.elastic.co/t/logstash-output-issue/329319 "2023-04-04T12:55:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rushikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rushikesh/32/119417_2.png) [@Rushikesh](https://discuss.elastic.co/u/Rushikesh)\
**Post date:** [April 4, 2023, 12:55pm UTC](https://discuss.elastic.co/t/logstash-output-issue/329319/1 "2023-04-04T12:55:41Z")

</div>

Below is my logstash configuration file.

```auto
input {
  beats {
    port => 5044
  }
}

filter {
  json {
    source => "message"
  }
}

output {
  stdout {
    codec => json
  }
}

```

```auto
filter {
  mutate {
    add_field => {
      "ddsource" => "logstash"
      "service" => "%{[fields][type]}"
    }
  }
  mutate {
    replace => {"host" => "%{[agent][name]}"}
  }
  if [fields][type] == "laravel" {
      if [context] {
        mutate {add_field => {"Laravel-data" => "%{[context]}"}}
      } else {
        mutate {add_field => {"Laravel-data" => "%{[event]}"}}
      }
  }
}

output {
  datadog_logs {
      api_key => "example"
  }
}

```

```auto
output {
  elasticsearch {
    hosts => ["localhost:9200"]
    ssl => false
    index => "logs-%{+YYYY.MM.dd}"
    ilm_enabled => false
  }
}

```

```auto
output {
  s3 {
    access_key_id => "test"
    secret_access_key => "test"
    bucket => "logstorage"
    region => "us-west-1"
    codec => "json_lines"
    prefix => "%{+YYYY}/%{+MM}/%{+dd}/1.log"

  }
}

```

I am trying to send the filter data to datadog and elasticsearch and it works fine. But I want to send raw data to the S3 bucket without a filter. But when I execute the S3 configuration file it sends the logs to S3 in filter way which is not my need.

How can I achieve this?

Thank you

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 4, 2023, 4:50pm UTC](https://discuss.elastic.co/t/logstash-output-issue/329319/2 "2023-04-04T16:50:17Z")

</div>

If you want to send data to two outputs with different processing for each then you can use pipeline-to-pipeline communication with a [forked-path](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#forked-path-pattern) pattern.

---

<div class="post-metadata">

**Author:** ![Rushikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rushikesh/32/119417_2.png) [@Rushikesh](https://discuss.elastic.co/u/Rushikesh)\
**Post date:** [April 6, 2023, 5:10am UTC](https://discuss.elastic.co/t/logstash-output-issue/329319/3 "2023-04-06T05:10:29Z")

</div>

Thanks @Badger

---

<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:** [May 4, 2023, 5:11am UTC](https://discuss.elastic.co/t/logstash-output-issue/329319/4 "2023-05-04T05:11:06Z")

</div>

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