You can enable log rotation for pgpool logs on postgres clustered VMware Workspace ONE Access installed using VMware Aria Suite Lifecycle.

Problem

The combined disk usage shown with du -hsc /var/log/pgService/pgService* is more than 50 percent of total disk capacity of /dev/sda4 as indicated in the output of the command df -h.

Solution

  1. When running the command find /etc/logrotate.d -iname pgservicelog, if the response is /etc/logrotate.d/pgservicelog, then run the following commands:
    1. touch /etc/cron.d/rotatePgserviceLogs
    2. echo "*/45 * * * * root /usr/sbin/logrotate /etc/logrotate.d/pgservicelog" > /etc/cron.d/rotatePgserviceLogs
    3. For VMware Workspace ONE Access 3.3.2: /etc/init.d/cron restart

      For VMware Workspace ONE Access 3.3.3 or later: systemctl restart crond

  2. When running the command find /etc/logrotate.d -iname pgservicelog, if there is no response, then run the following commands:
    1. touch /etc/cron.d/rotatePgserviceLogs
    2. touch /etc/logrotate.d/pgservicelog
    3. echo "/var/log/pgService/pgService.log {

      copytruncate

      rotate 6

      compress

      missingok

      size 50M

      }" > /etc/logrotate.d/pgservicelog

    4. echo "*/45 * * * * root /usr/sbin/logrotate /etc/logrotate.d/pgservicelog" > /etc/cron.d/rotatePgserviceLogs
    5. For VMware Workspace ONE Access 3.3.2: /etc/init.d/cron restart

      For VMware Workspace ONE Access 3.3.3 or later: systemctl restart crond