You can customize the default behavior by modifying the auto-generated configuration file, task-template.xml. The task-template.xml file provides information about the current configuration of the Machine Agent. It is created at first startup of the agent and discovers the disks and network hardware the agent can monitor on the machine where it is installed.
This configuration applies to the JavaHardwareMonitor extension only. The ServerMonitoring extension is recommended if you have a Server Visibility license and the monitored system meets the system requirements. For more information, see Server Visibility Requirements and Supported Environments.
To customize default Machine Agent metric collection
- Locate and edit the task-template.xml file.
This file is located in the
<machine_agent_home>/monitors/JavaHardwareMonitor/directory when the Machine Agent starts the first time.
Modify the task-template.xml file as follows:
- To enable aggregation operation for localhost (lo) network metrics, change the value of the aggregate attribute (for the network element "lo") to "true".
- To enable monitoring for a virtual disk, set the value of the enabled attribute to "true" for that disk.
A sample task-template.xml file is shown here:
Rename the task-template.xml file to task.xml or it will be overwritten by the Standalone Machine Agent.
To monitor a special device that is not enabled, add a file named "task.xml" in the
The format of the task.xml file must be exactly the same format as the task-template.xml file.
Not all disks and networks have to be listed in task.xml. If the Machine Agent finds a disk or a network that is not listed in task.xml, default properties are applied.
Restart the Machine Agent.