[syslog-ng] logging to PostgreSQL database

Sean McAfee smcafee at collaborativefusion.com
Thu Jan 6 14:08:23 CET 2011


On 01/05/11 16:24, Janez Barbič wrote:
> using PostgreSQL 8.4
> contents of pg_hba.conf:
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ...
> #
> # Database administrative login by UNIX sockets
> local   all         all                          trust
>
> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
>
> # "local" is for Unix domain socket connections only
> # local   all         all                               trust
> # IPv4 local connections:
> # host    all         all 127.0.0.1/32          md5
> # IPv6 local connections:
> host    all         all         ::1/128               md5
> # syslog-ng logger
> # host    eneraptordb      eneraptor 127.0.0.1/32
>   trust
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> As far as I understand this configuration file, any user should have full access
> to any database on local machine. At this point, I am not concerned about
> security issues as I plan to address them after I resolve logging problem.

In this context, "local" refers to the Unix socket (typically in /tmp), not a 
TCP/IP socket. This is how the command-line psql connects to the host (unless 
otherwise specified).

You should be able to confirm that it's pg_hba-related by looking in the 
Postgres log file.

I don't know if syslog-ng would take "/tmp" as an address, but you should be 
able to fix it in pg_hba.conf by either:
1. Uncommenting the "eneraptordb" line
2. Uncommenting the line below "IPv4 local connections"

-- 
Sean McAfee



More information about the syslog-ng mailing list