LOG Pattern Matching

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

LOG Pattern Matching

Post by sarfarosh »

Hello Team,
I have a requirement, where i need to match a log pattern. How can i achieve it?
Sample log pattern are
:::DUMPLOG LOG CREATED
:::PROCESS LOG CREATED

We have to check count of “:::DUMPLOG LOG CREATED” and “:::PROCESS LOG CREATED” nearly equal. if count difference exceeded 10%, alert will generate.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: LOG Pattern Matching

Post by mcapra »

I would need to see some sample logs to ensure there aren't conflicts with any query I may provide.

A simple search for ":::DUMPLOG LOG CREATED" and ":::PROCESS LOG CREATED" seems to work to at least get results:
2017_03_24_09_26_21_Dashboard_Nagios_Log_Server.png
2017_03_24_09_27_29_Dashboard_Nagios_Log_Server.png
if count difference exceeded 10%, alert will generate.
Nagios Log Server alerts are currently a simple document count of query results. There's no way to implement conditional logic (or arithmetic) currently.
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: LOG Pattern Matching

Post by sarfarosh »

Hello mcapra,
I am trying to create an alert and i found a Query field there. How to write a custom query for this ?
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: LOG Pattern Matching

Post by mcapra »

The easiest way to create a query would be to get your dashboard displaying the events you would like to match, then using the "Manage Queries" button (magnifying glass at the top) to save the dashboard's query:
2017_03_30_10_50_13_Dashboard_Nagios_Log_Server.png
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: LOG Pattern Matching

Post by sarfarosh »

Hello mcapra,
Thanks a lot. Exactly the thing i was looking for.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: LOG Pattern Matching

Post by cdienger »

Was there anything further we can help with related to this or are we okay to lock the thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: LOG Pattern Matching

Post by sarfarosh »

Hi Mcapra,
Thank you very much. We can close it now.
Locked