cacti
cacti copied to clipboard
Set Log size Limit/Truncate same entries to log
Hey Guys
One feature that would be very useful is a cacti.log size limit the idea would be that after a certain size cacti starts writing to a new file
A situation could rise where an issue can flood the log which can make the UI interface slow or crash as the httpd/apache proccess tries reading and writing to the file
Scenario that led me to this was in my lab I have the following error flooding the log
DBCALL ERROR: SQL Save on table 'poller_resource_cache': Table does not exist, unable to save!
This was a quick fix on my end but also lead to the UI very sluggish the log file was almost 400MB once I corrected the issue and created a fresh log file everything is running fine now
-rw-r--r-- 1 apache apache 42K Aug 2 16:32 cacti.log -rw-r--r-- 1 apache apache 469M Aug 2 15:04 cacti.log.1
If there was a size limit before rotating the logs the sluggishness would have been avoided with the only side effect being multiple log files
Another option would be to reduce how many times the same event is written to the log so that a log flood does not happen
As always thanks guys !
This one is way down the list without a pull request, but thanks. Marking as a feature enhancement.