View Issue Details

IDProjectCategoryView StatusLast Update
0000570Pgpool-IIBugpublic2020-04-14 13:06
Reportersivapgpool89Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionopen 
PlatformLinuxOSRedhatOS Version7.1
Product Version3.7.11 
Target VersionFixed in Version 
Summary0000570: Log rotation is not working
DescriptionHi,

Good Morning.

We are using pgpool-3.7.11 and configured logging as per the documentation .
Seems log rotation is not working .
please find our configurations.

 #------------------------------------------------------------------------------
# LOGS
#------------------------------------------------------------------------------
# - Where to log -
log_destination = 'stderr,syslog'
                                   # Where to log
                                   # Valid values are combinations of stderr,
                                   # and syslog. Default to stderr.
>>>>
# - Syslog specific -
syslog_facility = 'LOCAL1'
                                   # Syslog local facility. Default to LOCAL0
syslog_ident = 'pgpool'
                                   # Syslog program identification string
                                   # Default to 'pgpool'
>>>>>
$ cat /etc/rsyslog.conf | grep pgpool
#pgpool log
local1.* /var/log/pgpool/pgpool.log

>>>>
$ ls -l /etc/logrotate.d/syslog
-rw-r--r-- 1 root root 251 Oct 5 21:18 /etc/logrotate.d/syslog

>>>>>
$ cat /etc/logrotate.d/syslog | grep pgpool
/var/log/pgpool/pgpool.log

>>>>>
$ ls -tlrh /var/log/pgpool/pgpool.log
-rwxrwxrwx 1 root root 14G Jan 2 10:39 /var/log/pgpool/pgpool.log

Could you please suggest how to resolve this issue.

Thanks.
Siva.
TagsNo tags attached.

Activities

nglp

2020-01-02 23:42

reporter   ~0003034

Maybe im wrong, but i think you should rotate using system tools, pgpool will not be able to do if you use syslog facility

For ex, you can add /var/log/pgpool/pgpool.log to /etc/logrotate.d/syslog

sivapgpool89

2020-01-03 14:04

reporter   ~0003035

Thanks nglp.

i have added already added /var/log/pgpool/pgpool.log to /etc/logrotate.d/syslog.But still log rotation is not happening.

Thanks for update.

nglp

2020-01-03 17:05

reporter   ~0003036

Hi Siva,

Check your crontab settings, logrotate is executed by cron in redhat systems (check /etc/cron.daily/logrotate)

Also, you can force logrotate manually to try settings, ex: 'logrotate -vf /etc/logrotate.conf' or 'logrotate -v /etc/logrotate.d/syslog'

I recommend you to check man page of logrotate command to see all options available

Best regards, Guille

sivapgpool89

2020-01-03 22:49

reporter   ~0003037

Thanks for update nglp.

administrator

2020-01-16 09:49

administrator   ~0003066

If you have resolved this issue, may I close this one?

Issue History

Date Modified Username Field Change
2020-01-02 14:33 sivapgpool89 New Issue
2020-01-02 23:42 nglp Note Added: 0003034
2020-01-03 14:04 sivapgpool89 Note Added: 0003035
2020-01-03 17:05 nglp Note Added: 0003036
2020-01-03 22:49 sivapgpool89 Note Added: 0003037
2020-01-16 09:49 administrator Note Added: 0003066
2020-02-03 10:52 pengbo Status new => resolved
2020-04-14 13:06 administrator Status resolved => closed