Hi,

I'd like to store incoming log messages in a postgres db.
Both db server and syslog-ng run in a docker container.
I'm using docker-compose to manage containers. The syslog-ng is depending on the pg container, but... every time I start containers with docker-compose up -d, the syslog-ng starts, but can't connect to database.

I found this in the /var/log/messages on the syslog-ng's container:
err syslog-ng[1]: Error establishing SQL connection; type='pgsql', host='pgsrv.infra-net', port='', username='syslog', database='postgres', error='could not connect to server: Connection refused ...

Is there any way to reconnect automatically or abort syslog-ng if it can't connect to the db?
It is important if I don't want to lose some logs...
(or do I need to forget the SQL backend if I want to operate a log server without loss of data??)


Regards,




Sent with ProtonMail Secure Email.