I send log files using filebeat to logstash.
Log files contain lines in json format.
logstash parses them using the std json filter and send them to elastic.
When I search in the kibana Discover tool, I got very strange things.
Searching on field named trace.requestID (number long) putting this in kibana KQL filter:
trace.requestId : 20213800080838954
(this is the real value I can see in log files)
I get these documents:
|Time|trace.requestId|
|Sep 20, 2021 @ 14:49:15.000|20213800080838952|
|Sep 20, 2021 @ 14:49:15.000|20213800080838952|
|Sep 20, 2021 @ 14:49:15.000|20213800080838952|
And if I open them, I see same value in "Table" pane but in JSON, I get this:
"trace.requestId": [
20213800080838950
],
I copied/pasted the kibana search from the inspect panel and re-did it in the Dev Tool, and there I am getting the right value. I guess it means the douments are okay in Elastic (which is reassuring in itself).
Can you confirm that you see in the Inspect Statistics tab 3 Hits?
Also, when executing the query in DevTools, if you change the track_total_hits value to true, do you get the hits.total.value of 1 or 3?
And if I expand the documents and go to the JSON tab, I see this value:
"trace.requestId": [
20213800080838950
],
So, data are okay in Elastic but Kibana Discover displays something completely wrong.
To summarize,
real value is trace.requestId : 20213800080838954
values displayed in Discover is trace.requestId : 20213800080838952
values displayed in expanded Table tab is trace.requestId : 20213800080838952
values displayed in expanded JSON tab is trace.requestId : 20213800080838950
In your screenshot you searched for ****4 but Discover is showing you something ****2 and opening the Table/JSON renderer it shows ****0.
I didn't spot the last digit there as they differ.
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.