Log Retention

Is there a global setting for log retention for all of the various logs under the analytics and loader services?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Ryan Sather -- not at this time.  Please see this other post for detail how to manually manage log file rotation.  https://community.incorta.com/t/y7njzh/how-to-rotate-your-tomcat-catalina-out-log-file

  • Ryan Sather You can also create a cron job to remove the log files older than number of days, like 15 days, adjust it according to your needs

    find . -type f -mtime +15 -name '*.log' -execdir rm -- '{}' \;
  • Okay, thank you. I just wanted to make sure there wasn't something already existing before I created it. On a side node I ran into a permission problem with the catalina log file rotation. I had to put the user/group in the logrotate config file for it to work.

  • Using what Incorta support provided, I created this script to clean up some logs.  I extended it beyond support's command line as I had a ton of files eating up 10GB or more. 

    You will have to set the "INC_HOME" to your install folder.


    INC_ANA_SID=`cat $INC_HOME/services/services.index | grep analytics | cut -d "=" -f2 | sed 's/\s//'`
    INC_LOAD_SID=`cat $INC_HOME/services/services.index | grep loader | cut -d "=" -f2 | sed 's/\s//'`

    if [ ! -z $INC_ANA_SID ]; then
            echo Analytics Service Found
            sh -c "find $INC_HOME/services/$INC_ANA_SID/logs/kafka -mtime +5 -type f -name '*.log' -delete"
            sh -c "find $INC_HOME/services/$INC_ANA_SID/logs/incorta -mtime +15 -type f -name '*.log' -delete"
            sh -c "find $INC_HOME/services/$INC_ANA_SID/logs/ -maxdepth 1 -mtime +15 -type f -name 'localhost*.txt' -delete"

    if [ ! -z $INC_LOAD_SID ]; then
            echo Loader Service Found
            sh -c "find $INC_HOME/services/$INC_LOAD_SID/logs/kafka -mtime +5 -type f -name '*.log' -delete"
            sh -c "find $INC_HOME/services/$INC_LOAD_SID/logs/incorta -mtime +15 -type f -name '*.log' -delete"
            sh -c "find $INC_HOME/services/$INC_LOAD_SID/logs/ -maxdepth 1 -mtime +15 -type f -name 'localhost*.txt' -delete"

    Note: the kafka log files are set to 5 days instead of 15 as we do not use it currently.

    I also want to get some type of rotation in place and maybe compress the older files. Maybe something for the future.



Like1 Follow
  • 5 mths agoLast active
  • 4Replies
  • 44Views
  • 4 Following

Product Announcement

We are happy to
announce Incorta 4.8 !!!