aouyar/PyMunin — Issue #13: pymunin-pgstats cannot connect to PostgreSQL
Author: cwells
Created: 2012-02-27 05:12:39+00:00
State: open

Scientific Linux 6.1
munin installed via EPEL repo.
pymunin installed via pip.

pg_hba.conf is set to "trust" all local connections.

Running the module from the command line works fine:

```
$ user=freeswitch ./pymunin-pgstats
multigraph pg_connections
freeswitch.value 3
postgres.value 0
template0.value 0
template1.value 0
total.value 3
max_conn.value 1000

multigraph pg_diskspace
freeswitch.value 3896710928
postgres.value 5537796
```

(output trimmed)

However, munin-node log shows the following:

```
2012/02/26-21:10:07 [2877] Error output from pymunin-pgstats:
2012/02/26-21:10:07 [2877] EXCEPTION: could not connect to server: Permission denied
2012/02/26-21:10:07 [2877] Is the server running locally and accepting
2012/02/26-21:10:07 [2877] connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
2012/02/26-21:10:07 [2877] Service 'pymunin-pgstats' exited with status 1/0.
```

I've tried using localhost/port rather than the unix domain socket with the same result.