How to create filter match a string using regex?


#1

Hi there,

I was trying to create a filter to match field "source" and value "/var/log/nginx/*-access.log", the log file name contains the domain name, e.g, /var/log/nginx/mydomain.com-access.log, couldn't get it work, help please.

{
"query": {
"match": {
"source": {
"query": "/var/log/nginx/*-access.log",
"type": "phrase"
}
}
}
}


(system) #2

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