Specify the agent management server

On each agent, you must specify the agent management server it will connect to. You do this by configuring the deploymentclient.conf file of the agent. Each agent must have a unique network hostname.

There are three ways to configure this file:

Important: Exercise caution when using agent management to push deploymentclient.conf updates to agents. Doing so is supported and common, but a misconfiguration or serious agent management issue can lead to situations where agents lose the intended deploymentclient.conf and consequently their ability to contact agent management.

Use the CLI

On the agent, run the following CLI commands:

CODE
splunk set deploy-poll <IP_address/hostname>:<management_port>
splunk restart

Use the IP_address/hostname and management_port of agent management you want the agent to connect with.

For example:

CODE
splunk set deploy-poll deploymentserver.splunk.mycompany.com:8089
splunk restart

Edit deploymentclient.conf

You can also directly create and edit a deploymentclient.conf file in $SPLUNK_HOME/etc/system/local.

Syntax

The deploymentclient.conf file requires two stanzas:

Stanza What it's for
[deployment-client] Configures a number of attributes, including where to find new or updated content. You do not usually need to change the default values for this stanza.
[target-broker:deploymentServer] Specifies the location of agent management for this agent. deploymentServer is the default name for agent management. You must specify agent management under this stanza.

This file has a large number of optional attributes, but for most deployments, you only need to set the targetUri attribute under the [target-broker:deploymentServer] stanza. This attribute specifies the agent management of an agent. Here's the attribute syntax:

Attribute What it's for Default
targetUri Specifies the agent management connection information.

Set to <deployment_server_URI>:<management_port>. The management port is typically 8089.

n/a

For a complete list of deploymentclient.conf attributes, see the deploymentclient.conf specification file in the Admin manual.

Note: You must restart the agent for the change to take effect.

Example

Here is a typical agent configuration:

CODE
[deployment-client]

[target-broker:deploymentServer]
targetUri = deploymentserver.splunk.mycompany.com:8089

As is usually the case, this example accepts the default values for nearly all attributes. The one attribute that you must set, the location of the agent management, has the value of deploymentserver.splunk.mycompany.com:8089.

Use the REST API to reload and restart

You can use the REST API to reload and restart after configuring an agent. For more information, see deployment/client/{name}/reload in the REST API Reference Manual.