[syslog-ng] about mysql log

Balazs Scheidler bazsi at balabit.hu
Mon Jul 6 12:41:41 CEST 2009


On Mon, 2009-07-06 at 11:58 +0200, Jacopo Cappelli wrote:
> Hi,
> it's possible to personalize mysql logging?
> actually i have
> $HOST,$FACILITY,$PRIORITY,$LEVEL,$TAG,$YEAR-$MONT-$DAY,
> $HOUR:$MIN:$SEC; $PROGRAM,$MSG
> i want to decompose $MGS in sub-level field because in $MSG i have a
> email-id and i use it to make web research.

with syslog-ng 3.0 you can. 

you can either parse the message using db-parser(), or csv-parser() (see
the related blog posts, google will find them)

once your message is parsed, you can reference custom fields in your sql
destination, thus put any parsed value in a separate SQL column.

-- 
Bazsi




More information about the syslog-ng mailing list