[syslog-ng]Feature Request

Chad C. Walstrom chewie@wookimus.net
Tue, 27 Mar 2001 18:37:30 -0600


--iJXiJc/TAIT2rh2r
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 27, 2001 at 05:37:15PM -0600, Chad C. Walstrom wrote:
> On Wed, Mar 28, 2001 at 09:23:35AM +1000, Andrew Fort wrote:
> > the 1.5 development releases allow you to specify what fields to go
> > the output for some destinations.  i've attached a previous post of
> > mine with the field list inside, and quoting Balazs' original
> > feature announcement.  you may be able to use this in conjunction
> > with other facilities, a log watcher, the program destination,
> > whatever, to achieve your goal.
>=20
> SWEEEET!  Thanks for the reference!  I'll try it out!

That's all I needed! Thanks!  Here's my config and output to show she
worked well:

---------------------------------------------------------------------
destination sql_file {
    file("/tmp/syslog.sql"
    owner("root") group("adm") perm(0640)
    template("INSERT INTO mytable ( host, facility, priority, level, tag, d=
ate, time, program, msg) VALUES( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL=
', '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n"=
));           =20
    };
log{ source(src); destination(sql_file); };
---------------------------------------------------------------------

Its output was beautiful SQL. ;-)

---------------------------------------------------------------------
INSERT INTO mytable ( host, facility, priority, level, tag, date,
time, program, msg ) VALUES( 'skuld', 'syslog', 'notice', 'notice',
'2d', '2001-03-27', '18:27:01', 'syslog-ng', 'syslog-ng[16935]:
syslog-ng version 1.5.4 starting' );
INSERT INTO mytable ( host, facility, priority, level, tag, date,
time, program, msg ) VALUES( 'skuld', 'user', 'notice', 'notice',
'0d', '2001-03-27', '18:27:28', 'chewie', 'chewie: this is a another
test' );
---------------------------------------------------------------------

Thank you VERY much for your help. ;-)

--=20
Chad Walstrom <chewie@wookimus.net>                 | a.k.a. ^chewie
http://www.wookimus.net/                            | s.k.a. gunnarr
Key fingerprint =3D B4AB D627 9CBD 687E 7A31  1950 0CC7 0B18 206C 5AFD


--iJXiJc/TAIT2rh2r
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6wTJKDMcLGCBsWv0RArYuAKCMDsuq4+7519Y1TCINBjadSo+2QgCgvSv3
Nd6dWcHqCEZuaEI8/1xR3Mc=
=4sJJ
-----END PGP SIGNATURE-----

--iJXiJc/TAIT2rh2r--