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]. Blocklisting it. [Agent-Scheduler-1] 28 Nov 2013 13:13:55,435 ERROR SigarMinuteTask - Error fetching disk i/0 statistics for interface [eth0:17]. Blocklisting 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.