Splunk Enterprise

Escape quote in standard input?

stefano339
Engager

Hello. I have a input script in python that gets data from db and puts them in stdin in the form field = "value". One field contains a json so I tried to escape quotes:
field = "{\"id\": \"a\"}"
but what I get in the field is "{\" losing the rest.
There is a way to escape quote in this case?
Thanks

Labels (1)
Tags (2)
0 Karma
1 Solution

stefano339
Engager

Yes I did but is was non working until I found out to use auto_escaped instead of auto as KV_MODE.
Now it's working fine.
Thanks

View solution in original post

0 Karma

stefano339
Engager

Yes I did but is was non working until I found out to use auto_escaped instead of auto as KV_MODE.
Now it's working fine.
Thanks

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If your problem is resolved, please accept the answer to help future readers.

---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried field = '{\"id\": \"a\"}'?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...