[syslog-ng] group-by() send all messages to destination() ?

Jason Cooper syslog-ng at lakedaemon.net
Thu Oct 3 14:40:16 UTC 2019


Hi Gabor!

On Wed, Oct 02, 2019 at 01:33:22PM +0000, Gabor Nagy (gnagy) wrote:
> What Fabien suggested just rang a bell for me, but wouldn't
> "context-values" or "context-lookup" template functions  suit your
> need?
> 
> I have copied the admin guide's referring part:
> 
> context-values
> Syntax:
> $(context-values $name-value1 $name-value2 ...)
> Description: The context-values template function returns a list of
> every occurrence of the specified name-value pairs from the entire
> context. For example, if the context contains multiple messages, the
> $(context-values ${HOST}) template function will return a comma-
> separated list of the ${HOST} values that appear in the context.

Hot damn!  I think so!  It looks like I'll need `implode()` as well to
string together the messages from `context-values()` separated by
'\n'...

thx,

Jason.


More information about the syslog-ng mailing list