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:
- Use the CLI. See Use the CLI, later in this topic.
- Edit the file directly. See Edit deploymentclient.conf, later in this topic.
- For Windows universal forwarders only: Configure a Windows forwarder as an agent during the installation process. See the following topics in the Universal Forwarder manual:
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:
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:
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 |
n/a |
For a complete list of deploymentclient.conf attributes, see the deploymentclient.conf specification file in the Admin manual.
Example
Here is a typical agent configuration:
[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.