[syslog-ng]macro expansion in program destinations
Nate Campi
syslog-ng@lists.balabit.hu
Wed, 4 Jun 2003 10:02:58 -0700
I might be missing something obvious here, but is there a way to get
macros to expand when used as arguments to external scripts?
ex:
----------------
destination test-script {
program("/tmp/testscript /var/log/HOSTS/$HOST/$YEAR/$MONTH/$DAY/$FACILITY_$HOST_$YEAR_$MONTH_$DAY");
};
log {
source(src);
destination(test-script);
};
----------------
Here's /tmp/testscript:
----------------
#!/bin/sh
echo $1 > /tmp/arg
----------------
# cat /tmp/arg
/var/log/HOSTS/////
I'd like to be able to pass these things, especially message-specific
things like facility. Is there a way and I'm just not seeing it?
--
Nate Campi http://www.campin.net