NLS query with wildcard in it

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

NLS query with wildcard in it

Post by WillemDH »

Hello,

I would like to use * in part of a query, but this doesn't seem to work.

Code: Select all

Example query: type:"eventlog" AND hostname:"exch*.domain"
The above would then get me al the eventlogs of the exch hosts exchdc01.domain and exchac01.domain and exchac02.domain

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NLS query with wildcard in it

Post by Box293 »

Does it work if you don't use the quotes?

Code: Select all

type:eventlog AND hostname:exch*.domain
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NLS query with wildcard in it

Post by WillemDH »

Troy,

I'm not getting any results using your suggestion.

Code: Select all

type:eventlog AND hostname:exch*.domain.be
The only way i'm getting a result if I specify the full hostname. Are you sure wildcards are supported by nls?

Grtz
Nagios XI 5.8.1
https://outsideit.net
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NLS query with wildcard in it

Post by mcapra »

WillemDH wrote:Are you sure wildcards are supported by nls?
Yes, but perhaps not exactly in the way one might expect them to.

See if this logic produces the desired result:

Code: Select all

type:eventlog AND hostname:exch* AND hostname:*.domain
Otherwise, if you could provide some sample events with the hostname field highlighted I can play around with this.
Former Nagios employee
https://www.mcapra.com/
Locked