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

  1. Stop the Machine Agent.
  2. Disable the JavaHardwareMonitor:
    1. Locate and edit monitor.xml from <machine_agent_home>/monitors/JavaHardwareMonitor/.
    2. Change the value <enabled>true</enabled> to <enabled>false</enabled>.
    3. Save the file.
  3. Enable the HardwareMonitor for the OS you want to monitor:
    1. Edit monitor.xml from <machine_agent_home>/monitors/HardwareMonitor/.
    2. Change <enabled>false</enabled> to <enabled>true</enabled>.
    3. Save the file.
  4. 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:

  1. Open <machine_agent_home>/monitors/HardwareMonitor/config.sh.
  2. Set REPORT_MEMORY_FREE_AS_MEMORY_AVAILABLE to 1.
  3. Restart the agent.