The syslog-ng Agent for Windows application can filter log messages in a blacklist-fashion: you can define filters, and any message that matches the filters is ignored by the agent — only messages that do not match the filters are sent to the central server. In other words, the filters are connected to each other with logical OR operations.
Different filters are available for eventlog- and file sources. When the syslog-ng agent processes a message, it checks the relevant filters on-by-one: if it finds a filter that matches the message, the agent stops processing the message without sending it to the server.
![]() |
Note |
|---|---|
By default, all filters are case sensitive. To change this behavior, see Section 5.3.3, “Global settings of the syslog-ng agent”. |
The following types of filters are available for eventlog sources:
Sources and Event ID: Filter on the source (application) that created the message, and optionally on the identification number of the event. Corresponds with the EVENT_SOURCE and EVENT_ID macros.
Message Contents: Filter the text of the message, i.e., the contents of the EVENT_MESSAGE macro.
Sources and Categories: Filter on the source
(application) that created the message, and optionally on the category of the
event. Corresponds with the EVENT_SOURCE and EVENT_CATEGORY macros. Note that
leaving the category field empty equals with the none
category of the Event Viewer.
Users: Filter on the username associated with the event. Corresponds with the EVENT_USERNAME macro.
Computers: Filter on the name of the computer (host) that created the event. Corresponds with the HOST macro.
Event Types: Filter on the type of the event. Corresponds with the EVENT_TYPE macro.
To modify the filters used for eventlog messages, complete the following procedure:
Procedure 5.5.1. Filtering eventlog messages
Start the configuration interface of the syslog-ng Agent for Windows application.
Select , and double-click on the type of filter you want to create.
To ignore messages sent by a specific application, or messages of the application with a specific event ID, double-click on , select , and select the name of the source (application) whose messages you want to ignore from the Source Name field. To ignore only specific messages of the application, enter the ID of the event into the Event ID field. Select .
To ignore messages that contain a specific string or text, double-click on , enter the search term or a regular expression into the field, then select .
To ignore messages sent by a specific application, or messages of the application that fall into a specific category, double-click on , select , and select the name of the application whose messages you want to ignore from the Application Name field. To ignore only those messages of the application that fall into a specific category, enter the name of the category into the Category field. Select .
To ignore messages sent by a specific user, double-click on , enter the name of the user into the field, then select .
To ignore messages sent by a specific computer (host), double-click on , enter the name of the user into the field, then select .
Event Types: To ignore messages of a specific event-type, double-click on , select the event types to ignore, and select .
![]() |
Note |
|---|---|
Under Windows Vista and Server 2008, Windows labels certain
messages as level 3 and the Event Viewer labels such messages as
warnings. This is against the official specification: level 3 should
not be used; and only level 2 messages are warnings. To filter these
events, you have to manually add a new event type to the registry
and set its value to 3, e.g.,
|
Select , then . To activate the changes, restart the syslog-ng Agent service.
The following types of filters are available for file sources:
Message Contents: Filter the text of the message, i.e., the contents of the FILE_MESSAGE macro.
To modify the filters used for file messages, complete the following procedure:
Procedure 5.5.2. Filtering file messages
Start the configuration interface of the syslog-ng Agent for Windows application.
Select , and double-click on the type of filter you want to create.
To ignore messages that contain a specific string or text, double-click on , enter the search term or a regular expression into the field, then select .
Select , then . To activate the changes, restart the syslog-ng Agent service.
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com