Variable limit - LS query

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Variable limit - LS query

Post by rferebee »

Good morning Nagios team, I'm wondering if there is a variable limit on queries within Log Server? If you take a look at the attached screenshot, we're currently monitoring for domains flagged as unsafe by MS-ISAC. Unfortunately, the number of domains grows almost weekly and I'm not sure how many I'll be able to add in a single query or if perhaps there's a better way to go about it in your opinion?

Thank you for your 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: Variable limit - LS query

Post by mcapra »

I can't think of a way to solve this that doesn't involve reducing the cardinality of the query. I think the only limiting factor within Elasticsearch is the Netty server's max content length (http.max_content_length) which is like 100mb by default -- it'd have to be a massive Lucene query to hit that limit:
https://www.elastic.co/guide/en/elastic ... -http.html

You could certainly reduce the cardinality with clever filter rules (or input rules), like adding a tag to the messages of those flagged hosts. A giant manually maintained filter rule that needs to hit every single message sounds kinda painful though. Ideally this tagging would be done at the agent level -- you'd update the flagged machines nxlog configs to include that tag before it passes the message to NLS, then query on that special tag instead of an ever growing list of hosts.
Former Nagios employee
https://www.mcapra.com/
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Variable limit - LS query

Post by rferebee »

Sorry, I guess the reply I got isn't clear enough for me.

Can I keep adding domains to the query shown in the screenshot or do I need to figure out a better way to accomplish what we need?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Variable limit - LS query

Post by benjaminsmith »

Hi,

It would be best to tag messages based on the domain of interest and then search for the tags. Can you provide a screenshot of the details that this query is currently returning?

A couple of other options, you can limit the number of queries by using domain1|domain2|domain3|domainX in a single query field.

It's also possible to use regex instead of Lucene,

https://www.elastic.co/guide/en/elastic ... exp-syntax

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked