I'm a new users, and I have search in vain for an explanation of the query and filter syntax in Nagios Log Server. Ideally, I'd like both the syntax and a comprehensive list of examples.
And it would be helpful if the flavor of regex used in NLS were explained somewhere. Python? Perl? Emacs? Grep?
I've found a few links on the forum here, but they seem to be the result of hit-and-miss exploration by users rather than well-considered expositions by designers and developers. I would prefer the latter.
Thanks!
Precise and complete syntax of queries & filters ???
-
- Posts: 1
- Joined: Tue Mar 08, 2016 9:13 am
-
- Posts: 9117
- Joined: Mon Sep 23, 2013 8:40 am
Re: Precise and complete syntax of queries & filters ???
Have you checked out out knowledgebase? The following overviews should give a good introduction:
https://support.nagios.com/kb/article.p ... ategory=45
https://support.nagios.com/kb/article.p ... ategory=45
You can also check out the documentation for some of the components that Logserver uses:
https://www.elastic.co/guide/en/kibana/ ... lters.html
https://www.elastic.co/guide/en/beats/p ... lters.html
https://support.nagios.com/kb/article.p ... ategory=45
https://support.nagios.com/kb/article.p ... ategory=45
You can also check out the documentation for some of the components that Logserver uses:
https://www.elastic.co/guide/en/kibana/ ... lters.html
https://www.elastic.co/guide/en/beats/p ... lters.html
Former Nagios employee
-
- Attack Rabbit
- Posts: 2560
- Joined: Thu Feb 12, 2015 12:40 pm
Re: Precise and complete syntax of queries & filters ???
Please read through the following write-up regarding queries versus filters in the dashboard:I'm a new users, and I have search in vain for an explanation of the query and filter syntax in Nagios Log Server. Ideally, I'd like both the syntax and a comprehensive list of examples.
The distinction seems small at first, but grows as you get more familiar with the product.First, what is the use difference between QUERY and FILTERING?
The basic difference is that filters are used for filtering out logs you do not want to see, or filtering in logs that you do want to see.
Queries are used for searching through the remaining information.
You can apply several filters (filter by host, username, and ip address range, for example). You can use AND and OR operations between your filters.
Queries can _only_ use the OR operator, because Nagios Log Server expects that anything you query for you _want to see_ - multiple queries means multiple representations of data. For example: The two queries are displayed side-by-side on that graph, because it is assumed that anything you query is something you'd like to see (on graphs, charts, etc) - be sure to keep this in mind when designing your dashboards.
Filters are a more low-level construct for getting rid of noise.
That about described the difference between them in my mind. Let me know if you have any questions.
While I agree that an extensive guide would be useful that directly relates to NLS, we haven't generated one - mostly because there are several great guides on the internet already. Here are some of my favorites:Are there any docs with use case examples on creating queries/filters. The simple queries are easy, but it would be great to see what I can do with log server.
https://www.elastic.co/guide/en/kibana/ ... lters.html
https://www.mjt.me.uk/posts/kibana-101/
The regex library used in Logstash is Oniguruma. Feel free to read up on the syntax.And it would be helpful if the flavor of regex used in NLS were explained somewhere. Python? Perl? Emacs? Grep?
Here are some of the better ones:I've found a few links on the forum here, but they seem to be the result of hit-and-miss exploration by users rather than well-considered expositions by designers and developers. I would prefer the latter.
Logstash-
Long:
http://support.nagios.com/forum/viewtop ... 37&t=32221
Less long:
http://support.nagios.com/forum/viewtop ... 28#p137728
Alerts:
http://support.nagios.com/forum/viewtop ... 37&t=32548
Let me know if you have any questions after reading through the above!
You do not have the required permissions to view the files attached to this post.