How to search Json message in Kibana elasticSearch
10,217
You can simply input the following Lucene query into the search field:
message.orders:>30 AND message.version:>3.4
Author by
Achaius
Updated on June 04, 2022Comments
-
Achaius almost 2 years
I am using ElasticSearch Kibana dashboard with the following fields
host _id _score index message
of which message is a json string having values like
{"version": "3.4.2", "model": "EX2308", "orders": "50"}
I am searching for lucene query to search this JSON message having
orders > 30 and version > 3.4
Any help is appreciated
[Updated]
I am using logback-elasticsearch-appender to push messages into ElasticSearch using SLF4j
log.info(new org.json.JSONOject(arg).toString());
-
Achaius almost 6 yearsI am sorry, it is a JSON string stored as "{\"orders\": \"50\", \"version\": \"3.2.2\", \"model\": \"EU21x\"}"
-
Val almost 6 yearsHow do you ingest your documents? You should parse that JSON before indexing the documents into ES.
-
Achaius almost 6 yearsHey, I passed string to store using logStash. Kibana shows it as a JSON
-
Val almost 6 yearsUpdate your question with your Logstash config
-
Achaius almost 6 yearsUpdated my question. Currently I don't have permission to see logstash config
-
Achaius almost 6 yearsThank you. I changed my log to store Parsed JSON string. Now the query you provided is working
-
Val almost 6 yearsAwesome, glad you figured it out