Filtering events at the source (multiple IDs)

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Filtering events at the source (multiple IDs)

Post by dlukinski »

Hello LOG support

You helped me to filter "Security" logs only. Now trying to filter specific multiple EventIds: 4660,4663, 4624, 5140, 560, 564..

In the sample of:
==============================================================
Query <QueryList> \
<Query Id="0">\
<Select Path="Security">*[System[(EventID='4663')]]</Select>\
</Query>\
</QueryList>
=============================================================
How do I include multiple EventIDs?

Thank you
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Filtering events at the source (multiple IDs)

Post by jolson »

You can query for a range of numbers like so:
2015-11-30 13_00_19-Dashboard • Nagios Log Server.png
You can use a filter if you'd prefer.
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Filtering events at the source (multiple IDs)

Post by dlukinski »

jolson wrote:You can query for a range of numbers like so:
2015-11-30 13_00_19-Dashboard • Nagios Log Server.png
You can use a filter if you'd prefer.

We actually prefer source-based filtering (to save the WAN). Just unsure how to edit the configuration file to include say 4660, 4663 and 560 (for example)
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Filtering events at the source (multiple IDs)

Post by jolson »

Understood. Please see this link for excellent document that covers nxlog in detail: http://nxlog-ce.sourceforge.net/nxlog-d ... manual.pdf

That said, you will need to modify nxlog.conf on your Windows Server as follows:

Code: Select all

<Input eventlog>
    Module im_msvistalog
    Exec if not ($EventID == 4660 or $EventID == 4663 or $EventID == 560) drop();
</Input>
Let me know if that works for you. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Filtering events at the source (multiple IDs)

Post by dlukinski »

jolson wrote:Understood. Please see this link for excellent document that covers nxlog in detail: http://nxlog-ce.sourceforge.net/nxlog-d ... manual.pdf

That said, you will need to modify nxlog.conf on your Windows Server as follows:

Code: Select all

<Input eventlog>
    Module im_msvistalog
    Exec if not ($EventID == 4660 or $EventID == 4663 or $EventID == 560) drop();
</Input>
Let me know if that works for you. Thanks!
This worked.
Thank you very much!
- please close this case
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Filtering events at the source (multiple IDs)

Post by rkennedy »

I will now close this out, feel free to open a new thread if you need assistance in the future.
Former Nagios Employee
Locked