2 Replies Latest reply on Feb 5, 2019 11:15 AM by Mariusz Cwiklinski

    Truesight Log cleanup

    Anthony Valuikas
      Share This:

      Is there anything in TrueSight that can be set to retain only x days of log files? OR is it a manual process digging all over the place to cleanup the really old log files?

        • 1. Re: Truesight Log cleanup
          Andy Scholebo

          Hi Anthony,

           

          Log retention in TrueSight is handled is by preserving a given number of copies and rotating them when they reach a certain size.

           

          You can control the size and number of files written by modifying the following variables in pw/pronto/conf/pronet.conf or pw/custom/conf/pronet.conf

          log4j.appender.logserver.MaxFileSize=10MB
          log4j.appender.logserver.MaxBackupIndex=3

           

          See KA 000112475 for handling the Apache logs.

           

          If you want to have an 'x number of days' provision, this could be scripted.  That capability isn't provided as an out-of-the-box feature.

           

          Andy

          • 2. Re: Truesight Log cleanup
            Mariusz Cwiklinski

            Hello Andy,

            Updating httpd-proxy.conf with multiple log file locations as instructed in KA 000112475 procedure will tell proxy module to write its log data not only to ajp.log file but to other log files as well (and rotate). This is incorrect Apache log configuration.

             

            In Apache each module writes to its own log. So you need to configure each module separately to implement log rotation in proper way.

             

            In TSIM 11.0.0.1 there are the following Apache log files enabled by default:

            • access_log - httpd.conf should be updated and line for this log configuration should look like this: CustomLog "|/usr/pw/apache/bin/rotatelogs -n 10 /usr/pw/apache/logs/access_log 10M" common
            • deflate.log - httpd.conf should be updated and line for this log configuration should look like this: CustomLog "|/usr/pw/apache/bin/rotatelogs -n 10 /usr/pw/apache/logs/deflate.log 10M" deflate env=!image-request
            • error_log - httpd-ssl.conf file should be updated and line for this log configuration should look like this: CustomLog "|/usr/pw/apache/bin/rotatelogs -n 10 /usr/pw/apache/logs/error_log 10M" combined
            • ssl_request_log – httpd-ssl.conf file should be updated and line for this log configuration should look like this: CustomLog "|/usr/pw/apache/bin/rotatelogs -n 10 /usr/pw/apache/logs/ssl_request_log 10M" \
            • ajp.log – already configured in httpd-proxy.conf

             

            For more information see Apache documentation http://httpd.apache.org/docs/current/logs.html