Download PDF
Download page Machine Agent Metric Collection.
Machine Agent Metric Collection
The Machine Agent collects hardware metrics using default extensions appropriate to specific operating systems. The following table lists the metric collection extension and its supported OS information. In some limited cases, you may want to change the default collection extension. The table also lists the most common reasons for changing the default extension.
Supported environments, observation rates, configurability, some metric names, and definitions depend on the extension.
OS | Default Metric Collection Extension | Metrics Collected | Reason to Change the Default Extension | Supported Environments |
---|---|---|---|---|
Microsoft Windows |
|
|
| Machine Agent Requirements and Supported Environments |
Linux | ServerMonitoring |
| To Customize Metrics for Virtual Disks and External Network Traffic | Machine Agent Requirements and Supported Environments |
Solaris / SunOS |
|
| To Customize Metrics for Virtual Disks and External Network Traffic | Machine Agent Requirements and Supported Environments |
AIX | JavaHardwareMonitor | Basic Metrics | SIGAR (System Information Gatherer And Reporter) is not supported for your OS or Linux Distribution | SIGAR |
HP-UX | JavaHardwareMonitor | Basic Metrics | SIGAR is not supported for your OS or Linux Distribution | SIGAR |
Mac OS X | JavaHardwareMonitor | Basic Metrics | SIGAR is not supported for your OS or Linux Distribution | SIGAR |
Solaris |
|
| To Customize Metrics for Virtual Disks and External Network Traffic | Machine Agent Requirements and Supported Environments |
Java Hardware Monitor
The JavaHardwareMonitor is based on SIGAR (System Information Gatherer And Reporter). SIGAR is a legacy method of collecting basic hardware metrics and is used in pre-4.1 versions and for machines running operating systems that are not supported by the ServerMonitoring extension. The following sections list scenarios where you might want to change the extension used to collect the machine metrics.
Customize Metrics for Virtual Disks and External Network Traffic
By default, the Machine Agent reports metrics for network-mounted and local disks only. Additionally, only the external network traffic is aggregated (to ensure backward compatibility with previous versions of AppDynamics). For operating systems using the ServerMonitoring extension, you can change to the JavaHardwareMonitor to configure specific disks and network interfaces to be monitored. See Configure Metrics for Virtual Disks and External Network Traffic - JavaHardwareMonitor Extension Only to customize the behavior of the JavaHardwareMonitor metrics
Metric Observation Rate
The JavaHardwareMonitor takes observations of metrics in two distinct ways:
- For disk and network metrics: One observation per minute. When you view the count for these metrics in the Metric Browser, you see the count of 1 per minute. If you select a 15-minute interval, the count would be 15 times 1 = 15 and so on.
- For CPU and memory metrics: One observation every two seconds. When you view the count for these metrics, you see the count of 30 per minute. If you select a 15-minute interval, the count would be 15 times 30 = 450 and so on.
Collect Basic Metrics Using JavaHardwareMonitor
Linux and Windows machines use the ServerMonitoring extension by default to report basic metrics. However if you have Server Visibility enabled, falling back to the JavaHardwareMonitor only affects the collection of the basic hardware metrics. The extended Server Visibility metrics are still collected correctly by the ServerMonitoring extension.
How to Change from ServerMonitoring to JavaHardwareMonitor
- Stop the Machine Agent.
- Disable basic ServerMonitoring:
- Edit the
ServerMonitoring.yml
file from<machine_agent_home>/extensions/ServerMonitoring/conf/
. - Change the value of
basicEnabled
to "false
".
ThebasicEnabled
setting controls whether the Machine Agent reports basic hardware metrics through the ServerMonitoring extension. Setting this tofalse
enables the JavaHardwareMonitor to report the basic hardware metrics using the legacy SIGAR-based reporting. - Save the file.
- Edit the
- Enable JavaHardwareMonitor:
- Edit
monitor.xml
from<machine_agent_home>/monitors/JavaHardwareMonitor/
.- For Linux, remove this line:
<enable-override os-type="linux">false</enable-override>
. - For Windows, remove this line:
<enable-override os-type="windows">false</enable-override>
.
- For Linux, remove this line:
- Save the file.
- Edit
- Restart the Machine Agent.
Hardware Monitor
The HardwareMonitor extension is a collection of OS-specific scripts. SunOS and Solaris machines use this extension by default. For the operating systems that use the JavaHardwareMonitor by default, you may want to switch to an OS-specific monitor. You can switch to the OS-specific monitors when the JavaHardwareMonitor fails to report statistics and you see error logs similar to the following:
[Agent-Scheduler-1] 28 Nov 2013 13:13:55,435 ERROR SigarMinuteTask - Error fetching network statistics for interface [eth0:17]. Blacklisting it. [Agent-Scheduler-1] 28 Nov 2013 13:13:55,435 ERROR SigarMinuteTask - Error fetching disk i/0 statistics for interface [eth0:17]. Blacklisting it.
Collect Basic Hardware Metrics using HardwareMonitor
How to Change from JavaHardwareMonitor to an OS-Specific Monitor
- Stop the Machine Agent.
- Disable the JavaHardwareMonitor:
- Locate and edit
monitor.xml
from<machine_agent_home>/monitors/JavaHardwareMonitor/
. - Change the value
<enabled>true</enabled>
to<enabled>false</enabled>
. - Save the file.
- Locate and edit
- Enable the HardwareMonitor for the OS you want to monitor:
- Edit
monitor.xml
from<machine_agent_home>/monitors/HardwareMonitor/.
- Change
<enabled>false</enabled>
to<enabled>true</enabled>
. - Save the file.
- Edit
- Restart the machine agent.
Modify Free Memory Metric Configuration
If your Machine Agent installation is using an OS-specific HardwareMonitor for metric collection, then by default the agent reports free memory as the memory that is not used by any process nor in an I/O buffer or cache. It is more useful for the free memory metric to include memory that is in an I/O buffer or cache but can be available for new processes.
To include the memory in I/O buffers or cache that can be made available to new processes, modify the HardwareMonitor configuration:
- Open
<machine_agent_home>/monitors/HardwareMonitor/config.sh
. - Set
REPORT_MEMORY_FREE_AS_MEMORY_AVAILABLE
to 1. - Restart the agent.