Search This Blog

Thursday, January 6, 2011

Haproxy PostgreSQL health check patch

I have written a small patch to enable a correct PostgreSQL health check
It works similar to mysql-check with the very same parameters.

E.g.:
listen pgsql 127.0.0.1:5432
mode tcp
option pgsql-check user pgsql
server masterdb pgsql.server.com:5432 check inter 10000

The patch has been commited to 1.5 tree.
You can use it against 1.4 tree without any problems.
Moreover, I have submitted the FreeBSD PR to 1.4 port in ports tree as well.


Audit ports in jail on FreeBSD

The modified metaportaudit.sh script to perform a ports security audit in jails on FreeBSD from here .
This script audit only base jails not the cloned ones. You can grab it here.

Do not forget to edit /usr/local/etc/periodic/security/*.portaudit on about line 55
you'll want to change:

echo
echo /usr/local/sbin/portaudit -a |
su -fm "${daily_status_security_portaudit_user:-nobody}" || rc=$?

to

echo
echo /root/bin/metaportaudit.sh -a |
su -fm "${daily_status_security_portaudit_user:-nobody}" || rc=$?