ElasticSearch regex search

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
bennyboy
Posts: 157
Joined: Thu Oct 29, 2015 9:42 am

ElasticSearch regex search

Post by bennyboy »

Hi,

I try to understand how I can do search with a regex. I read that : https://www.elastic.co/guide/en/elastic ... query.html

I try to use a query like the screenshoot and like the example under.

{
"regexp": {
"message": {
"value": "AW.......E"
}
}
}

I don't find the way to do it.

Help!
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: ElasticSearch regex search

Post by mcapra »

It looks like you are defining regular expressions within filters, which is a much different process than defining regular expressions within queries.

If you're just looking to search a field using a regular expression, change the search type from lucene to regex and plug the regex into the search bar:
2016_12_06_11_26_01_Dashboard_Nagios_Log_Server.png
If that doesn't work, could you share some sample messages as well as the regex you are trying to match?
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
Locked