Configuring updates of dynamic host agents
The dynamic host agents in Instana automatically update to new versions of bundles, such as agent, sensors, and discoveries. You can control this updates as you require, by setting a preferred update schedule, by pinning a version, or by disabling the updates altogether.
The automatic updates of the dynamic host agents update only the agent bundles. To update the agent bootstrap, you must reinstall the agent manually. You are suggested to periodically reinstall the agent to make sure that you get the necessary bootstrap changes. See the Planned updates to the agent section plan your manual updates to avoid risks.
Setting sensors version update controls
Dynamic agents check for new sensors versions (called "agent versions" before release 321) every day between 4:15 AM and 4:45 AM by default. You can schedule this automatic check to run at a specific frequency, time, and days. You can also disable it if you do not want the agent to check for updates. Additionally, the agents run their version check and updates randomly over a specified period to avoid congesting the network with synchronized requests. You can modify this period by using the jitter setting and set the time range in which the agent restarts.
You can also configure the agent to use a specific pinned sensors version to minimize the risks in the production environment during the agent updates. This approach ensures full control over version updates. By using a pinned sensors version update strategy, you can keep the agent's capability to update itself at a specific time without manually reinstalling the agent. This approach is suggested for critical production environments.
The processes to control the agent updates and pin versions depend on whether the agent is deployed on a host or a containerized environment.
- Disabling automatic updates is not suggested. If you disable the automatic updates, the agent still updates to the latest sensors version when it is restarted. In Kubernetes and Red Hat OpenShift environments, every pod restart pulls the latest sensors version.
- You are suggested to avoid pinning sensors versions for longer than 6 months to ensure access to the latest updates and fixes.
Control updates in host agents
To schedule the automatic check in host agent deployments, open the etc/instana/com.instana.agent.main.config.UpdateManager.cfg file and modify the settings as required. See the following example:
# Instana Update Manager configuration.
# AUTO for automatic updates with given schedule. OFF for no automatic updates.
mode = AUTO
# DAY for daily, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
every = DAY
# Time is hh:mm in 24 hours format.
at = 04:30
# Spread updates randomized over 30 minutes around the configured time
jitter = 30
To pin a version for the agent and stop all future updates, open the *instanaAgentDir*/etc/instana/com.instana.agent.bootstrap.AgentBootstrap.cfg file before startup and add the following configuration:
version = <sha or tag>
where sha is the SHA value of the sensors version commit in the Agent Updates Git repository, and tag is the release identifier of the sensors version as given in the Agent Updates - tags page.
Control updates in containerized agents
To schedule the automatic check in host agent deployments, you must use the following environment variables:
-
INSTANA_AGENT_UPDATES_FREQUENCY: Specifies the frequency of version check and update. Valid values areDAY(for daily updates),MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAYorSUNDAY. You can add multiple options separated by a colon. -
INSTANA_AGENT_UPDATES_TIME: Specifies the time at which the version check and update is run.
To pin a sensors version for the agent and stop all future updates, use the INSTANA_AGENT_UPDATES_VERSION environment variable and specify the SHA value of the sensors version commit in the Agent Updates Git repository.
For more information on these environment variables, see Environment variables for host agent.
To configure the environment variables, use either of the following methods:
-
Save your environment variable configurations under
spec.agent.envin the agent custom resource fileinstana-agent.customresource.yamland apply the changes by running the following command:kubectl apply -f instana-agent.customresource.yaml -
Specify the configuration on the command line directly by using the flag
--set agent.env.<ENVIRONMENT_VARIABLE>=<value>.
Retrieving the current version
The following host agent API endpoint provides the version of the host agent's components:
curl localhost:42699/version