Postgres Syslog

Поиск
Список
Период
Сортировка
Искать

Postgres Syslog

От:
"Delao, Darryl W" <ddelao@ou.edu>
Дата:
I am trying to setup the postgres.conf to send all postgres messages to a
syslog server.  However, in the conf file there is no place to define the
host.  I will be sending to an external host.  How do I tell the conf file
to send syslogs to an outside host?

Thank you,
Darryl

Re: Postgres Syslog

От:
Steve Crawford <scrawford@pinpointresearch.com>
Дата:
That's a syslog issue, not a PostgreSQL issue. Read your syslog.conf man 
pages. For many versions of syslog you use:
local3.*@host
instead of
local3.*/var/log/mylogfile

I just used local3 as an example - substitute the syslog facility name to 
which you are routing your postgresql messages.

Remember that syslog expects tabs, not spaces between the facility/priority 
and the destination (at least in all the syslogs I have used - check your man 
pages).

Also be sure that the host is accepting remote syslog messages - most default 
setups don't allow this. You will probably need to set a flag to allow remote 
message logging.

Cheers,
Steve


On Friday 28 March 2003 8:26 am, Delao, Darryl W wrote:
> I am trying to setup the postgres.conf to send all postgres messages to a
> syslog server.  However, in the conf file there is no place to define the
> host.  I will be sending to an external host.  How do I tell the conf file
> to send syslogs to an outside host?
>
> Thank you,
> Darryl
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: Postgres Syslog

От:
"Delao, Darryl W" <ddelao@ou.edu>
Дата:
How about sending log messages to a single file.  I see a file under var/log
called pgsql, but it has nothing in it.  What do I need to enable in the
postgreql.conf to start logging to a local file?

Thanks,
Darryl

-----Original Message-----
From: Steve Crawford [mailto:scrawford@pinpointresearch.com] 
Sent: Friday, March 28, 2003 3:41 PM
To: Delao, Darryl W; 'pgsql-novice@postgresql.org';
'pgsql-general@postgresql.org'
Subject: Re: [NOVICE] Postgres Syslog

That's a syslog issue, not a PostgreSQL issue. Read your syslog.conf man 
pages. For many versions of syslog you use:
local3.*@host
instead of
local3.*/var/log/mylogfile

I just used local3 as an example - substitute the syslog facility name to 
which you are routing your postgresql messages.

Remember that syslog expects tabs, not spaces between the facility/priority 
and the destination (at least in all the syslogs I have used - check your
man 
pages).

Also be sure that the host is accepting remote syslog messages - most
default 
setups don't allow this. You will probably need to set a flag to allow
remote 
message logging.

Cheers,
Steve


On Friday 28 March 2003 8:26 am, Delao, Darryl W wrote:
> I am trying to setup the postgres.conf to send all postgres messages to a
> syslog server.  However, in the conf file there is no place to define the
> host.  I will be sending to an external host.  How do I tell the conf file
> to send syslogs to an outside host?
>
> Thank you,
> Darryl
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] Postgres Syslog

От:
Devrim GUNDUZ <devrim@gunduz.org>
Дата:
Hi,

On Mon, 31 Mar 2003, Delao, Darryl W wrote:

> How about sending log messages to a single file.  I see a file under var/log
> called pgsql, but it has nothing in it.  What do I need to enable in the
> postgreql.conf to start logging to a local file?

Start PostgreSQL with -l parameter:

pg_ctl .... -l /var/log/pgsql

If you are using an rpm-based installation; edit the init script of 
PostgreSQL (usually under /etc/init.d) and add -l parameter to start line,

i.e.

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -l /var/log/pgsql -D 
$PGDATA -p /usr/bin/postmaster start  > /dev/null 2>&1" < /dev/null

Regards,
-- 
Devrim GUNDUZ
devrim@gunduz.org				devrim.gunduz@linux.org.tr 
			http://www.gunduz.org

Re: [GENERAL] Postgres Syslog

От:
Alvaro Herrera <alvherre@dcc.uchile.cl>
Дата:
On Fri, Mar 28, 2003 at 10:26:40AM -0600, Delao, Darryl W wrote:
> I am trying to setup the postgres.conf to send all postgres messages to a
> syslog server.  However, in the conf file there is no place to define the
> host.  I will be sending to an external host.  How do I tell the conf file
> to send syslogs to an outside host?

You don't.  Rather, you tell it to send to some specific facility, and
the configure your syslogd to send it to a remote host.

-- 
Alvaro Herrera ()
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living fuck out of me." (JWZ)

Re: [GENERAL] Postgres Syslog

От:
Lamar Owen <lamar.owen@wgcr.org>
Дата:
On Monday 31 March 2003 09:02, Delao, Darryl W wrote:
> How about sending log messages to a single file.  I see a file under
> var/log called pgsql, but it has nothing in it.  What do I need to enable
> in the postgreql.conf to start logging to a local file?

You do this in the _syslog_ configuration, not in the PostgreSQL 
configuration.  That is just the way syslog works: PostgreSQL contacts the 
local syslogd, and logs its message using the syslog facility you define in 
postgresql.conf.  What syslog does with that message is determined by 
/etc/syslog.conf.  That could be any one of all sorts of things, including, 
but not limited to, logging to a single file, logging to a remote syslog 
server, logging to the system console, logging to a printer, etc.....and it's 
all controlled in /etc/syslog.conf.  So 'man syslog.conf' and see what you 
need to do.
-- 
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

FAQ