Introduction
Agent log files display the total count and size of log files. The following default values are displayed when not customized:
- Log files: 3
- Size: 2 MB each
Log file customization
You can modify the size and number of log files using the config.properties
file
where you can assign desired count of log files and assign a specific common size to all.
The maximum size of agent log file is 100 MB.
For example, if you have assigned 4 as count of Log files, you can assign 25 MB for size. Each log file is assigned the same size. So, if you want to have five log files, then for 100 MB you need to assign 20 MB as size.
To customize the log files:
- Open the configuration.properties file from the Agent installation directory.
- For Windows:
C:\Program Files (x86)\OpsRamp\Agent\conf\configuration.properties
- For Linux:
\opt\opsramp\agent\conf\configuration.propertie
s
- For Windows:
- Modify the numbers as required in the Log section of the configuration.properties file. For example:
log_file_count = 4
log_file_size_mb = 25
Note
If the total size assigned crosses 100 MB, the system automatically reduces the overall size to 100 MB. The config.properties file is updated accordingly with the assigned values.Log debug mode
The default mode for agent logs is Warning. Often, specially when using custom monitors, debug mode for agent logs is required. Debug mode can be enabled using the console.
Prerequisites
- Agent is online.
- You have access to Remote Command function.
- Agent has Remote Command functionality enabled. During agent installation, you can opt to enable multiple functions for an Agent.
Enabling log debug mode
To enable log debug mode,
- Navigate to Infrastructure, select a device, and then click the Remote Command icon.
The Commands screen is displayed. - From the drop-down menu of Commands Name, select Enable Agent Log Debug Mode.
- From the drop-down menu of Duration, select the desired time.
Available options for Duration are: 10, 30 and 60 minutes. Based on the time selected, the debug mode is enabled for that duration.
For example, if you select 30 minutes agent log level changes to debug mode only for 30 minutes from the time of executing command. After the specified duration, the Agent logs revert to the default log level: Warning. - Click Execute Command.
The confirmation message appears on the same screen.
The agent log status changes to Debug mode for the specified duration.
Viewing agent log files
You can view agent log files directly from OpsRamp Console. Viewing log files often helps while working with Custom monitor or for resolving agent-related issues. From the console, you can also copy the agent log files.
to view the agent log files, the following are required:
- The agent is online.
- Access is available to the remote command function.
- The remote command functionality is enabled for the agent.
Note
During agent installation, you can opt to enable multiple functions for an agent.To view (and copy) agent log files,
- Go to Infrastructure, select a device, and click the Remote Command icon.
- From the Command Name drop-down menu, select Show Recent Agent Log.
- From the Number of Lines drop-down menu, select the desired number.
- Available options for lines are: 100, 200, and 500 lines. 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, OpsRamp displays 200 lines of log files on the same commands screen. Log files may run into more than 200 lines. But, this option displays the latest 200 lines only.
- Click Execute Command.
The commands screen displays the latest specified number of lines for the agent log files and provides the option to copy.
Viewing agent version numbers
The release version numbers of the agent for Windows and Linux are different.
With an effort to introduce standard version number,
OpsRamp is using the N-2 policy wherein N
represents the latest release version;
2
indicates two versions prior than N
.
All versions lower than N-2 are considered deprecated.
At present, you can find both the version numbers. The release version number represents the new version number while the Agent version number indicates old version number. You can find the release version numbers from the OpsRamp console.
To view the version number:
- Go to Infrastructure > Resources.
- Select a Device and from the left tab and click Attributes.
The page displays information about the selected device. - Scroll down the page and click More Information.
The Agent Release Version is displayed.
Type of Agent | Agent Version Number | Agent Release Version |
---|---|---|
Linux agent | 5.4.1-1 | 5.4.1(5.4.1-1) |
Windows agent | 6.00.0028 | 5.4.1(6.00.0028) |
Deprecated Linux agent | 5.0.1-1 | Deprecated(5.0.1-1) |
Deprecated Windows agent | 6.00.0006 | Deprecated(6.00.0006) |