Search for field values with wildcard

(Peter) #1


I have imported java logs into elasticsearch and some of the fields have ended up having huge multiline values. I am in need to search for a pattern in the value. Is there a way. Can I do that?


(Zachary Tong) #2

Yep, there's a simple Wildcard Query, and a more advanced Regexp Query.

There's also a Grok Ingest Processor which can be configured with regexp patterns, and will extract the blobs of text into structured documents while ingesting. That's the preferred method (or using something like Logstash) because it makes search a lot simpler than trying to use regex queries.

(Peter) #3

I am using logstash to inject the log into elasticsearch. I have a very specific situation when I have to set an alert for some kind of pattern of the data of the logs. I have tried from kibana but I don't seam to be able to get the proper data out of it.

To be more exact here is a log example:

and the pattern I want to search for is "java.lang.IllegalStateException, zip file closed"


(system) #4

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