vRealize Log Insight 8.x
Aria Operations for Logs 8.x
find /storage/var/loginsight
-maxdepth 1 -mount -mtime +1 -type f -regex ".*[\._]log.+" -exec echo {} \; -exec rm {} \; 2>&1 | tee /tmp/deleted_logs.txt
find apache-tomcat/logs -maxdepth 1 -mount -mtime +1 -type f -exec echo {} \; -exec rm {} \; 2>&1 | tee /tmp/deleted_tomcat_logs.txt
LogName.date.log
and it's hard determine if it's an already rotated log file or the one currently in use. Thus, we are deleting all the files that has modification date greater than 1 day (the -mtime +1 option).
Impact/Risks:
Important: It is recommended to take a snapshot of the Aria Operations for Logs VM(s) before proceeding. Please remember to delete the snapshots within ~72 hours to prevent performance issues