Deploy apps to agents
The agent management distributes deployment apps to agents.
Agent management deploys apps in the following cases:
- When you create a server class and map a set of agents to one or more apps.
- When you change a server class (for example, by changing its set of apps or agents).
- When you change the content of an app.
- When a new agent joins a server class.
In some cases, it deploys apps automatically. In other cases, you need to manually initiate the deployment. In part, this depends on whether you are using agent management UI or editing serverclass.conf
directly.
For help estimating the time required to deploy apps, see Estimate agent management performance.
Deploy apps to agents in a new or updated server class
After you create or change a server class, the next step is to deploy its apps to the agents qualified by its filters. If you configure the server class through agent management UI, this happens automatically. If you configure the server class by directly editing serverclass.conf
, you must manually initiate the deployment.
When using the agent management interface
When you first create a server class, you map a set of agents to a set of apps. After you specify both the agent filters and the apps, the agent management automatically deploys the apps to the qualifying agents. This process is described in Use agent management UI to define server classes.
When you later edit a server class, changing either its set of apps or its agent filters, the agent management redeploys all server classes. That is, if the content of any app in any server class (not only in the server class you just edited) has changed since it was last deployed, the agent management now deploys the latest version to the qualifying agents.
When editing the serverclass.conf file directly
You can create server classes by directly editing serverclass.conf
. The agent management does not automatically deploy apps in response to direct edits of serverclass.conf
, unlike when you edit through agent management UI. Instead, you must manually reload the agent management to initiate deployments.
To reload, invoke the CLI reload deploy-server
command:
splunk reload deploy-server
After you run reload deploy-server
, the agent management deploys all server classes. That is, if any app in any server class is new or has changed since it was last deployed, the agent management deploys the latest version to the qualifying agents for that server class. Similarly, if you have edited a agent filter since the last time you reloaded the agent management, the agent management ensures, for each server class, that all the currently qualifying agents get the latest set of apps.
For information on creating server classes by directly editing serverclass.conf
, see Use serverclass.conf to define server classes.
Redeploy an app after you change its content
When you update the content of an app, you must reload the agent management in order for the agent management to redeploy the app.
To redeploy an app with updated content:
Agent management then redeploys the app to all agents that it's mapped to.
1. Update the content
The topic Create deployment apps described how to create app directories on the agent management. You can add or overwrite the content in those directories at any time.
2. Reload the agent management
After you edit the content of an app, you must reload the agent management so that the agent management learns of the changed app. It then redeploys the app to the mapped set of agents.
To reload the agent management, use the CLI reload deploy-server
command:
splunk reload deploy-server
The command checks all apps for changes and notifies the relevant agents.
Deploy apps to a new agent
When an agent connects with agent management for the first time, agent management automatically deploys the apps for any server classes that it qualifies for. You do not need to reload agent management in this instance.
An example of this is when you configure a new agent, and that agent has a machine type that an existing server class filters for.