# I am trying to add special character in logstash config

**URL:** <https://discuss.elastic.co/t/i-am-trying-to-add-special-character-in-logstash-config/324785>\
**Category:** Logstash\
**Tags:** ingest-pipeline\
**Created:** [February 6, 2023, 10:45am UTC](https://discuss.elastic.co/t/i-am-trying-to-add-special-character-in-logstash-config/324785 "2023-02-06T10:45:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![upreddy](https://avatars.discourse-cdn.com/v4/letter/u/f04885/32.png) [@upreddy](https://discuss.elastic.co/u/upreddy)\
**Post date:** [February 6, 2023, 10:45am UTC](https://discuss.elastic.co/t/i-am-trying-to-add-special-character-in-logstash-config/324785/1 "2023-02-06T10:45:56Z")

</div>

Hi  
I am sharing log pattern in below.  
2023-02-06T10:10:42.075890912Z stdout F 2023-02-06 10:10:42.075 [DEBUG] - {"logtype":"INFO","request":{"operation":"XXXXXX","trackingID":"abccc","usecase":"xyz"}

I am trying to put condition in pipeline config as below.  
if ("logtype":"INFO" in [message] and "operation" in [message]) )

for this i am getting below error.  
[2023-02-06T10:23:09,258][ERROR][logstash.agent] Failed to execute action {:id=\>:XXXXXXXXXX, :action\_type=\>LogStash::ConvergeResult::FailedAction, :message=\>"Expected one of [\t\r\n], "#", "in", "not ", "==", "!=", "\<=", "\>=", "\<", "\>", "=~", "!~", "and", "or", "xor", "nand", ")" at line 195, column 76 (byte 6095) after output \n{\n\n\t\telasticsearch \n\t\t{\n\t\t\thosts =\> ['${abc}','${def}']\n\t\t\t

Could you please guide me on this?

Thanks

---

<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:** [February 6, 2023, 6:02pm UTC](https://discuss.elastic.co/t/i-am-trying-to-add-special-character-in-logstash-config/324785/2 "2023-02-06T18:02:23Z")

</div>

> [@upreddy](#):
>
> at line 195, column 76 (byte 6095) after output \n{\n\n\t\telasticsearch \n\t\t{\n\t\t\thosts =\> ['${abc}','${def}']\n\t\t\t

What does the whole of the elasticsearch output configuration look like?

---

<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:** [March 6, 2023, 6:03pm UTC](https://discuss.elastic.co/t/i-am-trying-to-add-special-character-in-logstash-config/324785/3 "2023-03-06T18:03:00Z")

</div>

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