Agent log files display the total log file count and size with the following default values:
- Log file count: three
- Log file size: 2MB, each
Log file customization
You can modify the size and number of log files using the
config.properties file where you can assign count of log files and assign a specific common size to all. For example, if you have assigned a log file count of four, you can assign 25MB for size. Each log file is assigned the same size. If you want five log files consumming 100MB, assign a size of 20MB. The maximum agent log file size cannot exceed 100MB.
To customize log files:
configuration.propertiesfile in the applicable agent installation directory:
C:\Program Files (x86)\OpsRamp\Agent\conf\configuration.properties
Set the parameters to the values you want. For example:
log_file_count = 4 log_file_size_mb = 25
Enable log debug mode
- The agent is online.
- You have access to the Remote Command function.
- The agent has Remote Command functionality enabled, which can be done when the agent is installed.
Default severity level: Warning
Navigate to Infrastructure.
Select a device, and click the Remote Command icon to display the Commands screen.
From the Commands Name menu, select Enable Agent Log Debug Mode.
From the Duration menu, select the duration option:
- 10 minutes
- 30 minutes
- 60 minutes
Debug log level is enabled for the specified duration, from the time the command is executed. When the duration expires, agent logs revert to the default severity level: Warning.
Click Execute Command and accept the confirmation message.
View agent log files
You can view and copy agent log files directly from the OpsRamp console. To view the agent log files, make sure:
- The agent is online.
- Access is available to the Remote Command function.
- The Remote Command functionality is enabled for the agent, which can be done when the agent is installed.
Go to Infrastructure.
Select a device, and click the Remote Command icon.
From the Command Name menu, select Show Recent Agent Log.
From the Number of Lines menu, select the number:
Available line options:
Based on the number selected, the log files are displayed on the same screen. Then, you can use the clipboard to copy the displayed lines of log files. For example, if you select 200 lines, 200 lines of log files display on the same command screen. Log files may exceed 200 lines. But, this option displays the latest 200 lines only.
Click Execute Command.
The commands screen displays the requested number of lines and provides a copy option.