Host Monitoring Agent
The Host Monitoring Agent monitors the state of a host machine. For AppMon 6.5 and later, it can also monitor availability of any process running on the host. For further information on process availability monitoring see information on configuration of hosts/host groups on the Infrastructure page.
However, in most cases you don't need this Agent, as almost any active Agent delivers those metrics. The exceptions are:
- The Node.js Agent doesn't deliver host metrics.
- The Web Server Master Agent deliver host metrics only when a slave Agent is connected.
With many Agents on one machine, you may want to switch off delivery of host monitoring data from non-Host-Agents to reduce traffic from Agent to Collector. Contact support to develop the best strategy.
Installation and configuration
Full install package
The Windows full install package installs the Host Agent, but its service is not registered, keeping the Agent inactive, due to the potential redundant Host Agent role, mentioned previously. You can register the Host Agent with "<DT_HOME>\agent\lib\dthostagent" -service install
command. Copy and paste this example to register the 32-bit Host Agent service from a 64-bit AppMon full installation:
"C:\Program Files\Dynatrace\Dynatrace 7.2\agent\lib\dthostagent" -service install
To unregister the Agent service, use this command:
sc delete "dynaTrace Host Agent7.2"
.
Agent-only installer
If you're using the Agent-only installer, you should select the Custom installation option during the process, and manually select the Host Agent for installation. This lets the Agent auto-start, which is useful for monitoring the machine with no other Agent running on it.
Installation
Use these commands:
cd /opt
java -jar <DownloadDir>/<dynatrace(Agent)Installer.jar>
The installer defaults to the current directory and asks if you want to change the destination. Make sure you have the correct permissions for installation and to write to the target location.
The <DT_HOME>/init.d/dynaTraceHostAgent
shell script should be copied to or referenced in (link) /etc/init.d
and added to the system boot by using something similar chkconfig
or update-rc.d
, depending on your distribution.
The <DT_HOME>
directory is one of the following:
/opt/dynatrace-7.2
for full install package./opt/dynatrace-agent-7.2
for Agent-only installer.
These are default options. Actual directory is prompted during the installation.
Configuration
Configuration must be done by editing the <DT_HOME>/agent/conf/dthostagent.ini
. The following configuration options are available:
Key | Default | Description |
---|---|---|
Name | host | Agent name, can be used to map an Agent to a specific Agent Group. |
Server | localhost:9998 | A standalone or embedded Collector to which this Agent should connect.
The argument name Server stems from past releases when the Collector was Server-integrated. Most licenses allow only standalone Collectors, except for testing.
|
Loglevel | info | Defines log level. |
ConsoleLoglevel | info | Defines console log level. |
LogfilePath | <agent location>/log | Specifies a custom log file. |
OverrideHostname | <not set> | Specifies a custom hostname. If set the Agent is unable to detect the host name automatically. |
Example basic dthostagent.ini
The following is an example of the <DT_HOME>/agent/conf/dthostagent.ini
file. This file configures the Host Monitoring Agent named host (default) to connect to the AppMon Collector with the fully qualified name dtcollector.localdomain.com on port 9998.
Name host
Server dtcollector.localdomain.com:9998
Agent bulk installation
To monitor a large number hosts, you can automate the Host Agent deployment.
Perform a custom installation with the full or Agent-only .msi
, or use dthostagent.exe
, dtagentcore.dll
, and dthostagent.ini
in the directory structure.
If you use the installer with msiexec /passive /i <path>\<dynaTraceInstallerFileName>.msi ADDLOCAL="HostAgent"
, then Host Agent registers as an auto-starting service with the default settings from dthostagent.ini
. You can rewrite dthostagent.ini
and un/register the service with the new arguments.
If you just use the .exe
and .dll
, you can write your own dthostagent.ini
and register the service to auto-start with <DT_HOME>\agent\dthostagent.exe -service install
.
#extract dthostagent and libdtagentcore.so from agent/lib64/ in the jar
#extract init.d/dynaTraceHostagent from the jar
#mimic Agent directory structure on the host
mkdir dynatrace-agent-7.2.0
mkdir dynatrace-agent-7.2.0/agent
mkdir dynatrace-agent-7.2.0/agent/lib64
mkdir dynatrace-agent-7.2.0/agent/conf
#copy dthostagent and libdtagentcore.so to agent/lib64/
#write a basic dthostagent.ini (see previous) to agent/conf
#copy dynaTraceHostagent shell script to /etc/init.d
#be sure the Name specified in dthostagent.ini is mapped in some tier to avoid an error message
#try the Agent before you add it to boot
#/etc/init.d/dynaTraceHostagent start
chkconfig add dynaTraceHostagent