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".
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.
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.
<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
update-rc.d, depending on your distribution.
<DT_HOME> directory is one of the following:
/opt/dynatrace-7.2for full install package.
/opt/dynatrace-agent-7.2for Agent-only installer.
These are default options. Actual directory is prompted during the installation.
Configuration must be done by editing the
<DT_HOME>/agent/conf/dthostagent.ini. The following configuration options are available:
|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
|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.|
|usessl||false||Enables SSL encryption between the Agent and the Collector. Encrypted communication uses the same port as non-encrypted. To enable SSL you need to set this parameter as
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, using the SSL connection.
Name host Server dtcollector.localdomain.com:9998 usessl true
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.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
.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