Agent Repositories

Note: This section applies only to dynamic host agents, as opposed to static ones. For more information on the difference between static and dynamic agents, refer to the Host Agent Types documentation.

Dynamic host agents are capable of updating themselves from the Instana agent repository, or from a mirror thereof. This documentation covers how to set up a mirror of the Instana agent repository.

For more information on how to configure dynamic host agent updates, refer to the Updates of Dynamic Host Agents documentation.

Setting up an agent repository mirror

This documentation shows how to set up an agent repository mirror with Sonatype Nexus. In order to leverage the mirror, the agents must be configured as shown in the host agent configuration section.

Running Nexus

If you do not have Sonatype Nexus running, probably the easiest way to get started is to use it in a docker container (the WebUI appears on http://localhost:8081/, and the default credentials are admin/admin123):

docker run -d -p 8081:8081 --name nexus sonatype/nexus3

nexus setup

If the corresponding machine running the Nexus is only allowed to access the Internet via a HTTP proxy, you can find the form to fill in credentials when you click "HTTP" to the right.

http

Configuring Nexus

In order to proxy data between the Instana Backend and the Instana Agent, two repositories are required:

  1. agent-release
  2. shared

Agent-release repository

public png

Shared repository

shared png

Host agent configuration

Note: The configurations shown in this setup are necessary only if you are running a mirror of the Instana agent repository.

There are two, mutually exclusive ways to configure an Instana host agent to use a mirror of the Instana agent repository:

  1. configuring the mirror, or
  2. changing the repository location

Configuring the mirror

Note: This setup is mutually exclusive with the one shown in the changing the repository location section.

The configuration for the agent repository and how to authenticate with it, is specified in the file <agentfolder>/etc/mvn-settings.xml.

To use your agent repository mirror, uncomment the prepared section in this file:

<mirrors>
  <mirror>
    <id>agent-release</id>
    <url>http://192.168.69.3:8081/repository/agent-release</url>
    <mirrorOf>features</mirrorOf>
  </mirror>
  <mirror>
    <id>instana-shared</id>
    <url>http://192.168.69.3:8081/repository/instana-shared</url>
    <mirrorOf>shared</mirrorOf>
  </mirror>
</mirrors>

Should you require authentication for that repository, this can be configured in the same file:

<server>
  <id>agent-release</id>
  <username>myuser</username>
  <password>mypassword</password>
</server>
<server>
  <id>instana-shared</id>
  <username>myuser</username>
  <password>mypassword</password>
</server>

Changing the repository location

Note: This setup is mutually exclusive with the one shown in the configuring the mirror section.

Package-based Host Agent

When installing the host agent using the One-Liner or a package-based installer, the location from which the host agent downloads updates and sensors is specified in the file <agentfolder>/etc/org.ops4j.pax.url.mvn.cfg.

To use your agent repository mirror, please replace the line containing org.ops4j.pax.url.mvn.repositories with your specific settings. An example configuration for the above mentioned Nexus setup on the host 192.168.69.3 on port 8081 would look as follows:

org.ops4j.pax.url.mvn.repositories=http://192.168.69.3:8081/repository/agent-release@id=features@snapshots@snapshotsUpdate=always,http://192.168.69.3:8081/repository/instana-shared@id=shared@snapshots@snapshotsUpdate=always

Docker-based Host Agent

The Docker images for the host agent support setting via the INSTANA_MVN_REPOSITORY_URL, INSTANA_MVN_REPOSITORY_SHARED_PATH and INSTANA_MVN_REPOSITORY_FEATURES_PATH environment variables the location from which the host agent downloads updates and sensors. The following example is equivalent to that displayed in the Package-based Host Agent section:

INSTANA_MVN_REPOSITORY_URL=http://192.168.69.3:8081/repository
[email protected][email protected]@[email protected]=always
[email protected][email protected]@snapshotsUpdate=always