Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Why is admintools -t logrotate not updating

Hi
I get the following when trying to update logrotate settings via admintools:

[[email protected] ~]$ admintools -t logrotate -d defaultdb -r daily -k 6
Updating logrotate was not successful.

[[email protected] ~]$ cat /opt/vertica/config/logrotate/defaultdb
/vertica/catalog/defaultdb/v_defaultdb_node0002_catalog/vertica.log /vertica/catalog/defaultdb/v_defaultdb_node0002_catalog/UDxLogs/UDxFencedProcesses.log{
compress
size 500M
sharedscripts
weekly
rotate 4
nocreate
missingok
postrotate
kill -USR1 head -1 /vertica/catalog/defaultdb/v_defaultdb_node0002_catalog/vertica.pid 2> /dev/null 2> /dev/null || true
endscript
}
/vertica/catalog/defaultdb/dbLog{
compress
size 500M
weekly
rotate 4
copytruncate
missingok
}

Answers

  • SruthiASruthiA Employee

    @robns : I am able to set it successfully. What is your vertica version?

    [[email protected] ~]$ admintools -t logrotate -d kafkacrash -r daily -k 6
    [[email protected] ~]$

    cat /opt/vertica/config/logrotate/kafkacrash
    /home/dbadmin/kafkacrash/v_kafkacrash_node0001_catalog/vertica.log /home/dbadmin/kafkacrash/v_kafkacrash_node0001_catalog/editor.log /home/dbadmin/kafkacrash/v_kafkacrash_node0001_catalog/UDxLogs/UDxFencedProcesses.log{
    # rotate daily
    daily
    # keep for 6
    rotate 6
    #no complaining if vertica did not startup yet
    missingok
    #compress log after rotation
    compress
    #do not create a new empty log, vertica does that
    nocreate
    #if set, rotate only if log is larger than this
    size 10M
    #delete after this many days, not all logrotate support this

    #signal vertica only once even if we have multiple log files
    sharedscripts
    # signal vertica to reopen and create the log
    postrotate
        kill -USR1 `head -1 /home/dbadmin/kafkacrash/v_kafkacrash_node0001_catalog/vertica.pid 2> /dev/null` 2> /dev/null || true
    endscript
    

    }

    /home/dbadmin/kafkacrash/dbLog /home/dbadmin/kafkacrash/v_kafkacrash_node0001_catalog/MemoryReport.log{
    # rotate daily
    daily
    # keep for 6
    rotate 6
    #no complaining if vertica did not startup yet
    missingok
    #compress log after rotation
    compress
    #created by stdout, so just truncate the file
    copytruncate
    #if set, rotate only if log is larger than this
    size 10M
    #delete after this many days, not all logrotate support this

    }

  • dbadmin=> select version();

    version

    Vertica Analytic Database v10.0.1-8
    (1 row)

  • SruthiASruthiA Employee
    edited June 24

    It is working fine on 10.0.1-8 as well. Not sure if it is specific to your environment. Please open a support case and provide scrutinize

    [[email protected]~$ admintools -t logrotate -d testlogrotate -r daily -k 4
    [[email protected] ~]$ vsql
    Welcome to vsql, the Vertica Analytic Database interactive terminal.

    Type: \h or \? for help with vsql commands
    \g or terminate with semicolon to execute query
    \q to quit

    dbadmin=> select version();

    version

    Vertica Analytic Database v10.0.1-8
    (1 row)

    dbadmin=>

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.