[syslog-ng] syslog-ng 3.4 confgen how to?

Evan Rempel erempel at uvic.ca
Tue Apr 16 20:54:30 CEST 2013


First thing is that the confgen module is not in the documentation :-(

Second thing is that I am having problems using the confgen module


@module confgen context(source) name(myself) exec("/bin/hostname")
source primary { tcp( localip( myself() ) port(514) ); };
log { source(primary); destination(d_my_dest); };


works like a charm and listens on the IP address of my hosts primary interface.

But this will not work.

@module confgen context(source) name(myself) exec("/bin/hostname")
source self { tcp(localip(localhost) port(1514) );
};
rewrite r_self {
         set( "myself()", value("HOST") );
};
log {
       source(self); rewrite(r_self);
};


What I am trying to do is accept TCP connections from applications on the host, and change the SOURCEHOST to
be the actual host name rather than the text "localhost".

Comments on how this can be done?



More information about the syslog-ng mailing list