Re: Log file to sql database

Поиск
Список
Период
Сортировка
От KuroiNeko
Тема Re: Log file to sql database
Дата
Msg-id 3AC87A0D.nailN811TLE3@ed.ed
обсуждение исходный текст
Ответ на Log file to sql database  ("Joseph" <lters@mrtc.com>)
Ответы RE: Log file to sql database  ("Joseph" <lters@mrtc.com>)
Список pgsql-general
> Anyone care  to share suggestions on  getting data from a  running syslog
> into
> postgresql database?

 One way would be adding something like this to syslog.conf:

<facility>.<priority>                |/path/to/insert/routine

 However  that  might  impose  unwanted burden.  Also,  IIRC  syslog  keeps
`routine' loaded so making sure it doesn't waste precious cycles while idle
is up  to you.  This pipe would  be always ready  for reading,  so select()
might fail to work as desired.
 Another approach is to enhance log  rotation program to add the records to
the database. Depends on log rotation program :)
 YMMV, as always and good DB design for syslog is yet to be developed IMHO.
On one hand it has to be normalised enough to eliminate repetitions, on the
other hand,  it needs  to be  simple and flexible  to be  able to  adopt to
various not-so-standard programs that use syslog.
 At least,  facility, priority, timestamp,  hostname and process  (name and
PID) are quite common.


--

 ������������������


В списке pgsql-general по дате отправления:

Предыдущее
От: "Rod Taylor"
Дата:
Сообщение: pg_dump -s puts out SETVAL lines
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: [JDBC] Logging Queries