PTA - Diamond.log configuration
Symptom
Diamond.log File Size and Rolling
Online docs: ( https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PTA/File-Size-and-Rolling.htm )
Log files record all the activities carried out by PTA. By default, when a diamond.log log file reaches 100 MB, a new log file is created and the previous one is compressed and saved in the /opt/tomcat/logs/archive/ directory as a .gz file. Log files are stored in a cycle of 500 files, meaning that when a new log file is created, the current date and a number between one and 500 is added to the name of the file incrementally. For example: diamond-mm-dd-yyyy-1.log.gz). When the 501st log file is created, it replaces the first log file, and so on.
The above log rotation policy could be changed at the configuration file : /opt/tomcat/loggersocket/log4j2.xml
----------------
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" packages="">
<Appenders>
<RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${sys:catalina.base}/logs/diamond.log"
filePattern="$${sys:catalina.base}/logs/archive/diamond-%i.log.gz" immediateFlush="true">
<PatternLayout>
<Pattern>LOG | [%d{yyyy-MM-dd|HH:mm:ss.SSS|zzz}] | %-5p | {aid=%X{aid}} | {sid=%X{sid}} | {rid=%X{rid}} | {tid=%t} | %l - %m%n</Pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="500" compressionLevel="9"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="trace">
<AppenderRef ref="RollingRandomAccessFile"/>
</Root>
</Loggers>
---------------------------
The default number of diamond.log archives kept at PTA server is 500, by changing the DefaultRolloverStrategy max element value above, the number of archives retained by PTA server could be changed accordingly.
The above changes will require a PTA service restart (service appmgr restart).
Environment
11.1;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8
PTA log configuration