[syslog-ng] dbtype in SQL logging
Zoltán Pallagi
pzolee at balabit.hu
Tue Feb 22 09:48:19 CET 2011
Hi,
It depens on your sql database server. dbtype mean "character
varying(30)" or "boolean" and so on in case of postgresql. But the types
(and the names of the types) of columns are different for all database
types (for example: varying in case of pgsql, but varchar for mysql and
so on...)
Syslog-ng does not try to understand the column type, just will use it
as a "plain" text in a sql insert. So that there are no restrictions,
but if it is not a valid type for the given sql server, the sql server
will rejected it.
anyway, here is the documentation about existing column types:
http://www.postgresql.org/docs/7.4/static/datatype.html
and here is an example for pgsql:
columns("a1 character varying(30)", "a2 bigserial", "a3 bit", "a4 bit
varying(8)", "a5 boolean", "a6 box", "a7 bytea", "a8 bigint", "a9
character(30)",
"b1 cidr", "b2 circle", "b3 date", "b4 double precision", "b5
inet", "b6 integer", "b7 interval(10)", "b8 line", "b9 lseg",
"c1 macaddr", "c2 money", "c3 numeric(1,1)", "c4 path", "c5
point", "c6 polygon", "c7 real", "c8 smallint", "c9 serial",
"d1 text", "d2 time", "d3 timestamp")
On 2011-02-22 08:55, Hendrik Visage wrote:
> Hi there,
>
> found the following entry in the Administrator's guide(s):
>
> <quote>
>
> columns
> Type: string list
> Default: "date", "facility", "level", "host", "program", "pid",
> "message"
>
> *Description:* Name of the columns storing the data in /|fieldname
> [dbtype]|/ format. The /|[dbtype]|/ parameter is optional, and
> specifies the type of the field. By default, syslog-ng creates
> /|text|/ columns. Note that not every database engine can index text
> fields.
>
> </quote>
>
> So now before I go search the source code for answers, what types of
> "[dbtype]" is supported/handled by syslog-ng 3.2.2?
>
> More precisely, I'm running on HP-UX 11.31 and preference is using
> PostgreSQL
>
> Thank you
>
> HEndrik
>
>
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20110222/2cf2168c/attachment-0001.htm
More information about the syslog-ng
mailing list