[syslog-ng]Message retension period

Jim Mozley syslog-ng@lists.balabit.hu
Mon, 20 Sep 2004 10:21:11 +0100


Balazs Scheidler wrote:

> Checked the source, it is taken from the global option, and this patch
> allows it to set it for TCP/UDP targets (though the latter will never
> drop messages):
> 
> Index: cfg-grammar.y
> ===================================================================
> RCS file: /var/cvs/syslog-ng/syslog-ng/src/cfg-grammar.y,v
> retrieving revision 1.58.4.4
> diff -u -r1.58.4.4 cfg-grammar.y
> --- cfg-grammar.y       6 May 2004 08:57:52 -0000       1.58.4.4
> +++ cfg-grammar.y       17 Sep 2004 09:18:38 -0000
> @@ -497,7 +497,8 @@
>         ;
> 
>  dest_afinet_option
> -       : KW_LOCALIP '(' string ')'             { afinet_dest_set_localip(last_dest_driver, $3); free($3); }
> +       : dest_item_option
> +       | KW_LOCALIP '(' string ')'             { afinet_dest_set_localip(last_dest_driver, $3); free($3); }
>         | KW_LOCALPORT '(' NUMBER ')'           { afinet_dest_set_localport(last_dest_driver, $3, NULL, NULL); }
>         | KW_PORT '(' NUMBER ')'                { afinet_dest_set_destport(last_dest_driver, $3, NULL, NULL); }
>         | KW_DESTPORT '(' NUMBER ')'            { afinet_dest_set_destport(last_dest_driver, $3, NULL, NULL); }
> 
> 
> After applying the patch, rerun make (you fill need bison installed to
> rebuild)

Thanks for the fantastic response and patch. Knowing it works at the 
global level with log_fifo_size is great for my purposes; I just needed 
to know when message would be lost and increasing it globally should be 
sufficient for me. I've used a package on FreeBSD (rather than compiled 
myself as I have on Solaris) so I'll need to get the source and apply. 
Once I've done this I'll confirm it is OK.

As an aside I assume when you say "TCP/UDP targets (though the latter 
will never drop messages)" you are referring to the the fact that the 
server sending UDP messages to another server will send them regardless 
of whether that second server is listening (because it's UDP) and so is 
not recorded as a dropped message?

Thanks again,

Jim Mozley