On 4/04/2013, at 4:59 PM, Martin Holste <
mcho...@gmail.com>
wrote:
> I'm sure some more documentation is needed. Can you write a few lines of what you're looking for?
>
most certainly!
Not quite sure where it should go… an FAQ or Tips section ?
Tip:
When relaying logs from another syslog-ng server where you can not spoof the source IP address but still want to retain the correct host attribute in ELSA you can rewrite the HOST macro on the sending system:
rewrite r_elsa { set("$SOURCEIP", value("HOST")); }; # put the sourceIP into the HOST macro
and include this in your elsa log definition:
log { source(s_net); filter(f_elsa_tcp); rewrite( r_elsa); destination(elsa_tcp); };
On your elsa node in your /etc/elsa_syslog-ng.conf you need to override r_host:
rewrite r_host {};
Note that this is *global* and will affect all sources.
If one wanted to do this for a subset of sources then one would need to have separate source log definitions and name the rewrite rule something other than r_host. Doable but not pretty and it will mean that you would need to carefully check your syslog setup after each update.
======================================================
comments anyone? you can probably do this with rsyslog as well...
Russell