Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    166
    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).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. phoenixweb

    phoenixweb Well-Known Member

    Joined:
    Jun 3, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. phoenixweb

    phoenixweb Well-Known Member

    Joined:
    Jun 3, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice