The syslog-ng Agent for Windows application can collect log messages from text
files, and supports the use of wildcards (*) in filenames and
foldernames to be able to follow log files that are automatically rotated. To
configure file sources, complete the following steps:
Procedure 5.3.2.1. Managing file sources
Start the configuration interface of the syslog-ng Agent for Windows application.
Select , double-click on , and check the Enable option.
Select , and select the log file or the folder containing the log files in the Base Directory field. Select or enter the name and extension of the log files in the File Name Filter field. Wildcards may be used. The syslog-ng agent will forward log messages from every file that is located in this folder and has a name that matches the filter expression.
![]() |
Tip |
|---|---|
When specifying the Base Directory, you can use the environment
variables of Windows, e.g., |
![]() |
Warning |
|---|---|
Note that when managing members of a domain, the selected path must be
available on the domain members, e.g., |
To send messages from the files located in the subfolders of the folder set as Base Directory, select the Recursive option.
To send messages only from the file that was last modified, select the Last Modified File Only option.
![]() |
Note |
|---|---|
|
When using the Last Modified File Only option with a file source that has wildcard in the filename (e.g., When you use wildcards together with the Last Modified File Only option, make sure that older files will not be modified. |
If you are forwarding the logs of Internet Information Server (IIS) 5 applications, select the IIS 5.x Log option.
![]() |
Note |
|---|---|
If this option is not selected, the syslog-ng agent monitors every matching file in the folder for changes, and sends new log messages from all files. |
To send messages only from the file that was last modified of every subfolder of the Base Directory, select both the Last Modified File Only and the Recursive options.
To change the log facility or the log priority associated to the file source, select the desired facility or priority from the Log Facility or Log Priority fields, respectively.
![]() |
Note |
|---|---|
|
Significant changes to the settings of a file source may cause the syslog-ng Agent to resend the entire contents of the matching files. This means that log messages already sent earlier to the syslog-ng server may be resent and thus duplicated in the server logs. Configuration changes that may result in such behavior are:
|
Select , then . To activate the changes, restart the syslog-ng Agent service.
![]() |
Note |
|---|---|
If an application writes a message into a log file without ending the line with a new-line character, saves (closes) the file, and later continues to write into the same line, then this is visible in the file as a single line, but the syslog-ng agent interprets them as two separate messages. |
![]() |
Example 5.1. Collecting the logs of multiple applications from a single folder |
|---|---|
|
If two applications log into the same folder (e.g.,
If other applications log into the By default, the syslog-ng agent will send every message to the server that arrives into any of the monitored log files. To send only the messages that arrive into the latest file of the source, enable the Last Modified File Only option. |
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com