# Logstash configuration input error with if statement

**URL:** <https://discuss.elastic.co/t/logstash-configuration-input-error-with-if-statement/246019>\
**Category:** Logstash\
**Created:** [August 23, 2020, 12:55pm UTC](https://discuss.elastic.co/t/logstash-configuration-input-error-with-if-statement/246019 "2020-08-23T12:55:19Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [August 23, 2020, 5:45pm UTC](https://discuss.elastic.co/t/logstash-configuration-input-error-with-if-statement/246019/8 "2020-08-23T17:45:17Z")

</div>

A codec can only be used on an input. The idea is that you accept the events using a beats input, then in the output section, if they have that "forcepoint" tag you can use a tcp output to send them to another pipeline that has a tcp input with a cef codec. That second pipeline can then send the decoded events to elasticsearch.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-configuration-input-error-with-if-statement/246019)._
