Preparations for syslog-ng-incubator 0.2.0

NEWS updated, and version in configure.ac bumped.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
configure.ac: Add a check for memrchr

While we're not using memrchr directly, the compat.h file we indirectly
include from syslog-ng does. To make things compile properly on certain
platforms, like FreeBSD, we need to explicitly check for this too.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
configure.ac: Improved Lua detection

Look for lua-5.2 and lua-5.1 too, as the pkg-config module is called
like that on FreeBSD, for example.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
lua: Do not try to inject globals when they are not present.

Signed-off-by: Tusa Viktor <tusavik@gmail.com>
Merge pull request #28 from talien/fix/lua-missing-globals

lua: Do not try to inject globals when they are not present.
Preparations for syslog-ng-incubator 0.2.1

NEWS updated, and the version in configure.ac bumped.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
modules/getent: Implement a $(getent) template function

This implements most of the $(getent) template function, with the syntax
proposed in #26. $(getent hosts) is not implemented, and the rest aren't
all that portable, but for now, this will do.

Requested-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
getent: Minor code cleanup

Moved a typedef to the top of the C file, where it belongs.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
getent: Add support for returning a selected member

When using $(getent passwd), we can now return a selected member of the
structure. Without a third argument, we continue working as we did
before, but if a third argument is present, we'll pick out the specified
field.

Requested-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
getent: Code cleanup

All the lookup functions were using key->str, so lets pass that alone,
not the whole of key.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
getent: Split into multiple files

For easier maintenance, split tfgetent.c into smaller files.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
add basic $(getent group) functionality
Add support for 'mem'
Using 'mem' for key will yield a coma separated list of group members
riemann: Fix the float-y metric casting code

When casting strings to float, correctly recognise when the casting
succeeds, and when it fails. This fixes #27.

Reported-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #29 from ccin2p3/f/getent-group

add support for $(getent group)
getent: mem => members

To get the list of group members as a comma-separated list, one should
use $(getent group $GID members) instead of the former $(getent group
$GID mem).

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
getent: Cosmetic cleanups

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
README.md: Mention $(getent) too

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
perl: New module implementing a Perl destination

This new module implements a fairly simple Perl destination, with which
one can write destination modules in Perl. The module will call three
functions: init, deinit and queue (the name of all three are
configurable, of course). The first two receive no arguments, the queue
method receives a hash map of key-value pairs, selected by
value-pairs().

It does some type hinting (int and string supported only, so far), and
does not support sub-hashes yet.

This fixes #21.

Requested-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
python: Add a python destination module

This works in a very similar way to the Perl destination, except that it
is for python, and supports an imports() argument too, which can list
modules to pre-load before the script.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>