Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-22499

asterisk logrotate configuration prevents queue_log from being updated in some cirumstances

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 53, Sprint 54, Sprint 55, Sprint 56, Sprint 57
    • ToDo:
    • Asterisk Version:
      16
    • Distro Version:
      PBXact Utility 15.0.17.34

      Description

      First of all, I am not sure if this is a FreePBX distro/ PBXact or Asterisk package/rpm issue. 

      The queue_log section in /etc/logrotate.d/asterisk lacks the postrotate setting that signals Asterisk to reload the logger engine. 

      Without that section it might happen that the log file is renamed by the logrotate process to queue_log-YYYYMMDD and Asterisk will keep writing new events on that file, instead of the newly created queue_log that will remain empty at zero bytes until the next logger reload.

      This might not be apparent from the start becuse there is a call to the logger reload command for the other asterisk files, but if timing is just right, then the reload might come before the queue_log rotation, causing the issue.

      This affects any software that reads the queue_log file. Solution is simple, just add the same postrotate section than for the other asterisk log files.

       

       

       

      
      /var/log/asterisk/queue_log {
              daily
              missingok
              rotate 30
              notifempty
              sharedscripts
              create 0640 asterisk asterisk
              su asterisk asterisk
              postrotate
                  /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
              endscript
      }
      

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  fdanard Franck Danard
                  Reporter:
                  asternic asternic
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  11 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    NextupJiraPlusStatus

                    Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.