[syslog-ng] external configuration file syntex

Robert Fekete frobert at balabit.com
Tue Aug 25 10:05:07 CEST 2009


Do you mean that you would like to read the port number from an external file 
and use it in your destination statements? Because this is no possible, you can 
include only complete parts of the configuration, and it is not possible to use 

If you want to include for example the complete destination statement, you just 
create a file with this statement (e.g., destination.conf) and in your syslog-ng 
conf, write
include "destination.conf";

After that you can reference the d_messages destination in the syslog-ng conf file.


Robert Fekete

Jain, Vaibhav (GE Healthcare) wrote:

> Hi,
> I am using syslog-ng open source 3.0.3-1 ( rhel5.amd64) version. I am
> sending all the logs to a tcp port.i am using destination ip address. I
> want to read this information from a external config file so that user
> does not need to open and modify this file for differnet IP address.
> Please let me know how to use external config file in syslog-ng.conf
> file and how to use the these variable values in the syslog-ng file.
> Please send me a example.
> destination d_messages {
> 	                syslog("" transport("tcp") port(601));
> 			     }
> - V
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html

More information about the syslog-ng mailing list