On Fri, 2009-02-13 at 12:25 -0800, Liam Kirsher wrote:
Hi --
I am /almost/ there, logging to Postgres database. However, I've discovered a puzzling and problematic behavior.This is probably just some simple misunderstanding on my part, since this is my first foray into syslog-ng. I am logging to two different db tables. Which table I log to is determined by a regexp filter. The value is either root.ut_access or root.geocode. I can get either one to work, but not both at the same time. If I comment out the log entry for the geocode, then ut_access works. However, if both log entries exist, only the gecocode_access_log table gets a new row. Nothing is logged to the ut_access_log table! (Both messages are logged to d_obsidian destination file, however.) I've attached my config file.
Hmm.. could you post two example messages that should go to one or the other destination? Since you didn't specify flags(final) to either log statements, both should be doing their job, independently from the other. The only thing that should control whether one or the other destination is used is the attached filter. You can get filter debugging by enabling the --debug / --verbose options. Be sure that you run syslog-ng in the foreground if you specify these as these easily generate loops in the configuration unless the internal() source is not present. (use --foreground for that, intenral() messages will be printed on the standard error). Judging the config I can't see an obvious problem, that's why I wanted to test it, but I'd need a sample log message for that. -- Bazsi