[syslog-ng] [PATCH 0/3]: value-pairs() & related patches

Gergely Nagy algernon at balabit.hu
Thu Apr 28 09:55:56 CEST 2011


Gergely Nagy <algernon at balabit.hu> writes:

> Balazs Scheidler <bazsi at balabit.hu> writes:
>
>>> (Come to think of it, I could even collect a bunch of other stuff like
>>> the $(substr) macro into this external module, so that people who want
>>> to use them just have to download a tarball, do ./configure && make &&
>>> make install and be done with it - no patching required)
>>> 
>>
>> Yeah, I was thinking creating a syslog-ng-modules repository, which
>> perhaps with submodules could make it possible to delegate maintenance
>> for certain modules to 3rd parties.
>
> Sounds like a great idea!
>
> If you don't mind, I'll go ahead and set up something similar tonight,
> as a means to test how well this idea would work in practice (and
> because it sounds like something easy I can play with tonight :).

Well, that "tonight" turned into something that'll take a bit longer. I
ran into a few problems with some of the modules I wanted to include in
the collection (afsmtp being one of them, which for some reason, refuses
to compile; and tfjson being the other, which needs value-pairs.h, which
is currently not installed by syslog-ng's make install).

However, as a preview, here's the list of stuff I plan to include:

* afsmtp: A reasonably simple SMTP destination, based on libesmtp
* tfjson: $(format-json) template function
* afmongodb: My development version of afmongodb, which at the moment is
  the same as the patch I sent to this list a couple of days ago.
* tf-strings: Various string related template functions, like $(substr)
  and $(length).
* tf-numeric: Various random numeric functions, like $(+ A B), $(- A B),
  $(* A B), $(/ A B), and $(% A B). The names of these are up to debate,
  only $(%) is implemented so far (and it's called $(modN) on one of my
  branches).

I was also thinking about adding a couple of more template functions, to
split a string into tokens, $(foreach) and a couple of other things,
perhaps. Maybe even $(defvar), just for kicks! But I've yet to find a
use-case for those.

-- 
|8]


More information about the syslog-ng mailing list