Machine Agent Metrics
By default, AppDynamics Machine Agent reports metrics for only network mounted and local disks. Also, only the external network traffic is aggregated (to ensure backward compatibility with previous versions of AppDynamics).
However, you can customize this 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.
To customize default Machine Agent metric collection
Step 1: Open the task-template.xml file.
AppDynamics creates this file in the <machineAgent install directory>/monitors/JavaHardwareMonitor/ directory when the Machine Agent starts up for the first time.
Step 2: Modify the task-template.xml file.
A sample task-template.xml file is given below:
- 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.
Step 3: Rename the task-template.xml file to task.xml.
- It is important to rename the task-template.xml file (else it will be overwritten by Machine Agent). The task-template.xml file is automatically generated by Machine Agent.
- If you want the Machine Agent to monitor a special device that is not enabled, add a file named "task.xml" in the <Machine_Agent_Directory>/monitors/JavaHardwareMonitor/ directory. The format of the task.xml file must be exactly the same format aa 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.
Step 4: Restart the Machine Agent.
Restart the machine agent for the changes to take effect.