Skip to content

About dynamic logfilename #3661

Closed Answered by sebres
albenard asked this question in Q&A
Discussion options

You must be logged in to vote

Each day postgres create a new file for log with this pattern : 'postgresql-%Y-%m-%d_%H%M%S.log'

Normally it'd not do that for current file, only for rotated files (in daily case)...
This way it is justified for windows possibly, but not for linux where every distro has a proper central mechanism for log-rotation.

So i can use cron for programming a restart

It is not advisable to do that.

but I would like if there is a way for forcing fail2ban to detect the new(s) file(s).

One can use reload ?jail? (which would read the config and built a new config stream, so it'd contain:

set jail dellogpath '/old/path/to/log'
set jail addlogpath '/new/path/to/log'

(and one could simply use this …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sebres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants