The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Removing cpanel log rotation through CLI or API

Discussion in 'General Discussion' started by internetfab, Jun 12, 2014.

  1. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Hi,

    I've tried to remove the symlink for cpanel log rotation here:

    /var/cpanel/log_rotation/cp__apache__error_log.cpanellogd

    Which works fine, except that cPanel recreates it during upcp, and then our puppet run removes it again ;)

    Is there a better way to remove cpanel log rotation without using WHM? (we don't want to do that on multiple servers)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    To clarify, do you simply want to disable log rotation through the command line like you would with "WHM Home » Service Configuration » cPanel Log Rotation Configuration", or is there a different goal you have?

    Thank you.
     
  3. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Hi!

    Yes exactly Michael, I wish to disable it since we're doing logrotation by ourselves (using rsyslog to write to both remote syslog and to /usr/local/apache/logs/error_log).
     
  4. phoenixweb

    phoenixweb Well-Known Member

    Joined:
    Jun 3, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    I'm setting up a Central Log Server right now.
    Did you have any reccomandation?

    I'm planning to just copy all the syslog to remote rsyslog server.
    Is it enought or do I have to take special care to some cpanel stuff i don't know?
     
  5. phoenixweb

    phoenixweb Well-Known Member

    Joined:
    Jun 3, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    From what I can tell, you must use the WHM UI to exclude logs from rotation:

    "WHM Home » Service Configuration » cPanel Log Rotation Configuration"

    Please feel free to open a feature request for the ability to manipulate this setting through the command line.

    Thank you.
     
Loading...

Share This Page