I'm using the http_poller to poll for some data and this is working fine except for one site. The site provides data in JSON and it displays fine in a browser and doesn't show the \ in rawdata view but for some reason logstash is encapsulating every field in \fieldname\ which leans to JSON parse failures.
I tried adding a gsub filter to remove the backslashes but that doesn't work either.
Part of the JSON from stdout with codec => plain. Setting it to json will result in the same but with a parse error. Rest of the config is normal and works fine with other websites.
"[{\"uptime\":55485,\"dataLinkState\":\"Established\",\"state\":\"In Network\",\"netlock\":{\"state\":\"Remote Lock Not Engaged\"}}]"
message contains a list rather than an object and that doesn't fly with the json codec (because it can't store an array directly in the message). Use the plain codec and a json filter with target set to a field where you want the array stored.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.