Installing the Agent on Docker

The Instana agent requires Docker version 1.11 or higher.

The Instana agent can be executed as a privileged container via the following command:

sudo docker run \
  --detach \
  --name instana-agent \
  --volume /var/run:/var/run \
  --volume /run:/run \
  --volume /dev:/dev \
  --volume /sys:/sys \
  --volume /var/log:/var/log \
  --privileged \
  --net=host \
  --pid=host \
  --ipc=host \
  --env="INSTANA_AGENT_KEY={{ put your Instana agent key here }}" \
  --env="INSTANA_AGENT_ENDPOINT={{ the monitoring ingress endpoint }}" \
  --env="INSTANA_AGENT_ENDPOINT_PORT={{ the monitoring ingress endpoint port }}" \
  --env="INSTANA_DOWNLOAD_KEY={{ (optional) Instana download key here }}" \
  --env="INSTANA_AGENT_ZONE={{ (optional) the name of the zone of the host }}" \
  --env="INSTANA_AGENT_TAGS={{ (optional) comma separated list of host tags }}" \
  --env="INSTANA_AGENT_MODE={{ (optional) either APM, INFRASTRUCTURE, or AWS }}" \
  --env="INSTANA_AGENT_PROXY_HOST={{ (optional) hostname/address of a proxy }}" \
  --env="INSTANA_AGENT_PROXY_PORT={{ (optional) port of a proxy }}" \
  --env="INSTANA_AGENT_PROXY_PROTOCOL={{ (optional) proxy protocol (e.g. http }}" \
  --env="INSTANA_AGENT_PROXY_USER={{ (optional) username of the proxy auth }}" \
  --env="INSTANA_AGENT_PROXY_PASSWORD={{ (optional) password of the proxy auth }}" \
  --env="INSTANA_AGENT_PROXY_USE_DNS={{ (optional) boolean if proxy also does DNS }}" \

Please adapt the INSTANA_AGENT_KEY, INSTANA_AGENT_ENDPOINT and INSTANA_AGENT_ENDPOINT_PORT variables to your setup. The others (setting Zone, Tags, Proxy) are optional. Please see Agent Configuration for details.

Once running, the agent log will be available via docker logs instana-agent. The main configuration files can be mounted into the /root directory, and will be copied in place once the agent tarball is unpacked.

It is possible to swap out agent configuration files via the Docker volume feature. For instance, to change the artifact repository endpoint, add the following parameter:

--volume /opt/instana-agent/etc/org.ops4j.pax.url.mvn.cfg:/opt/instana/agent/etc/org.ops4j.pax.url.mvn.cfg

You can also swap the agent configuration.yaml the same way.

--volume /opt/instana-agent/etc/instana/configuration.yaml:/opt/instana/agent/etc/instana/configuration.yaml

One other use case would be to have a configuration-mysql.yaml for the MySQL credentials and add this configuration file during the container start.


# Mysql
  user: 'mysqlAdmin'
  password: 'mysqlSecretPassword'

docker run volume mount

--volume /opt/instana-agent/etc/instana/configuration-mysql.yaml:/opt/instana/agent/etc/instana/configuration-mysql.yaml