Starting from syslog-ng Agent for Windows version 3.0.4, it is possible to specify the configuration of the agent in an XML file when installing the agent, and also when starting the agent. The configuration file must be a valid XML file that complies to the XML schema supplied with the syslog-ng agent.
![]() |
Note |
|---|---|
By default, the XML schema file is called
|
Procedure 5.7.1. Creating an XML configuration file for the syslog-ng agent
Create a new configuration file, or edit the one shown in Section 5.7.2, “Sample configuration files for the syslog-ng Agent”. Use a text editor that can validate the file to the XML schema of the configuration file. One such editor is the Microsoft XML Notepad 2007 application, which is available for free at http://msdn.microsoft.com/en-us/xml/bb190622.aspx.
When creating the configuration file, bear in mind the following points:
For details on the format of the XML file, see the sample file at Section 5.7.2, “Sample configuration files for the syslog-ng Agent” and XML schema (.xsd) file installed with the agent.
File sources, event sources, servers, and filters must have a unique
index, that is, the definition of the first server should start as
<Server0 Enabled="1", the second
<Server2 Enabled="1", etc.
File sources must have a unique identifier (UUID). The agent does not create these identifiers, you must enter them into the configuration file manually.
If you do not use throttling, remove the
Throttle attribute from the destination. Setting
the Throttle attribute to
0 is not accepted by the agent.
If you do not want the agent to send old (already existing) messages to the logserver, use the following in the configuration file:
<syslog-ng_Agent SendOldMessages="0">
Note that when it starts, the agent automatically removes the
SendOldMessages="0" attribute from the
configuration file, but it will not resend the messages after the agent
is restarted.
To start the agent and use the configuration file, open a command prompt, and issue the following command: syslog-ng-agent.exe -c myconfigfile.xml -d. This command will start the agent in debug mode, and display any errors of the XML configuration file.
If there are no errors in the configuration file, start the agent in normal mode: syslog-ng-agent.exe -c myconfigfile.xml.
To use the XML file during the installation of the agent, use the same syntax with the installer: syslog-ng-agent-3.0.4-setup.exe /xmlconfig="fullpath\myconfigfile.xml". Note that the XML schema file must be in the same folder as the installer file.
![]() |
Note |
|---|---|
|
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com