Header background

Host group reconfiguration is now easier than ever

Host groups are a helpful Dynatrace feature, especially in larger and growing environments. The primary value of host groups is that they allow for the grouping of hosts into manageable sets. Host groups are currently in a Beta release phase, but they’ve already proven useful to many customers.

Imagine a situation where you have 1,000 hosts to monitor. Regardless of how awesome the default settings are, at some stage, you’ll want to change the configuration of some of the hosts. For example, you might decide to change the auto-update or anomaly-detection settings of your deployed OneAgents. Or you might want Dynatrace to treat a group of hosts in a load-balancer environment as a single virtual host. All of this is possible with the improved host groups feature, through simple yet powerful mechanisms.

You’ll find lots more information about this on the Host groups help page.

Host group reconfiguration without OneAgent reinstallation

One of the known limitations of our past approach is the fact that host groups can only be defined during initial OneAgent installation on hosts. This is particularly cumbersome in cases where the growth of an environment requires that you configure host groups only following the deployment of several OneAgents. Therefore, we’ve removed the requirement that you must reinstall each OneAgent in order to configure host groups.

Here’s how it works. You must invoke a command-line tool called oneagentctl, which is located in

  • Linux or AIX:
    /opt/dynatrace/oneagent/agent/tools
    You need root privileges.
  • Windows:
    C:\Program Files\dynatrace\oneagent\agent\tools
    You need administrator privileges. If you try to run oneagentctl in a non-admin Windows console, Windows will display a User Account Control pop-up and fail.

The tool accepts the following parameter for host group assignment:

$ oneagentctl --set-host-group=<host group name>

The value of the<host group name> parameter is the host group that the OneAgent is to be associated with.

All host group changes require that you first stop OneAgent. Start OneAgent after you run the command. Then, you’ll also need to restart all the services monitored on the host. Learn how to stop OneAgent on Linux, Windows, or AIX and how to start OneAgent on LinuxWindows, or AIX.

Following invocation of the command, the OneAgent will be assigned to this host group. The specified name can’t exceed 100 characters and can only consist of alphanumeric characters, hyphens, underscores, and dot characters. Host groups names can’t begin with the string .dt.

To remove OneAgent from a host group, provide an empty string as the parameter value.

Once you’ve invoked the oneagentctl command and changed the settings, you’ll be informed about the next required steps, specifically the need to restart OneAgent.

Note: Changing host group assignments results in recalculation of process group IDs, which impacts data aggregation. To read more about the impact of host group changes on process group detection, see host groups in Dynatrace Help.

Other functions of the oneagentctl command

The oneagentctl command can also retrieve the host group name and return it to standard output. This allows for a certain amount of scripting and automation to be built on top of this feature.

$ oneagentctl --get-host-group

For more information about the oneagentctl command, see OneAgent configuration via command-line interface in Dynatrace Help.

What’s next

Note that we’ve identified other areas of potential improvement related to the host groups feature. We will address these issues in upcoming Dynatrace releases.

Start a free trial!

Dynatrace is free to use for 15 days! The trial stops automatically, no credit card is required. Just enter your email address, choose your cloud location and install our agent.