Removing cpanel log rotation through CLI or API

internetfab

Well-Known Member
PartnerNOC
Feb 20, 2003
337
1
168
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)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
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).
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.