How NA is Managing logs and resetting log levels?

  • KM03631345
  • 30-Mar-2020
  • 26-Apr-2021

Summary

This information explains how to control NA's automatic function of resetting Trace and Debug levels back to Error

Question

The logging that is available in Network Automation is very robust and provides a very high degree of granularity for users and support personal alike to aid in troubleshooting issues that comes up with the application.
These log values are set in the WebUI by clicking on the top menu; Admin -> Troubleshooting. 
We have seen, in some instances, when logging has been set to more verbose levels, that the logs can grow very quickly.  In extreme cases, the logs can use most or all of the disk space or disk partition that NA resides on.
To compound matters, there are two sets of logs that need to be addressed. 
The one that is most often looked at and requested by NA Support is the *NA Home*/server/log/jboss_wrapper.log.   
These logs are limited in size.  By default, each jboss_wrapper.log file rolls over to a historical file after reaching a size of 10 MB. 
 
Also, by default, there are a maximum of 20 jboss_wrapper.log files in the directory. 
After a log file rolls through all 20 positions, it is deleted.  While these values the default for NA, they are configurable within the NA configuration files.
On the other hand, the second set of log files, *NA Home*/server/ext/jboss/server/default/log/server.log are rolled over on a time basis. 
These log files have essentially the same information in them as the jboss_wrapper.log files do.  By default, these files roll over once and hour and there is no practical limit to how many are there.  So these files can get very large and can be the culprit in disk usage. 
 
The server logs are managed by the pruner.  The pruner has a selection to control how many server.log files are kept.  This is configurablein the WebUI by clicking on the top menu; Admin -> Administrative Settings-> Server and scrolling down to the "Database Pruning" section.  In that section, there is an entry named "Log files".  This value defaults to 30 and is the number of days that server logs are kept.  So, as you can see, if there are very many log values set to TRACE in the Troubleshooting page, these files can grow quite large before rolling over in the hour. 
The logging levels of both sets of log files, server.log and jboss_wrapper.log, are controlled by the Troubleshooting page and all logging levels default to "ERROR".
When logging levels is r in the troubleshooting page, they will be automatically reverted from TRACE level by the system back to the default ERROR, so as to mitigate any performance impact and disk usage.
 
Just be careful that you or the end user are prudent with the use of TRACE logs, as setting others to this level forever may impact system performance.  By unclicking the value mentioned above, the files will continue to grow to the value set in Database Pruning and has the possibility of overrunning available disk space.