InstrumentationRule Properties

This table describes the properties available to configure auto-instrumentation in an InstrumentationRule.

Parameter Name Default Value Description
analyticsHost N/A

The hostname of the Analytics Agent.

This parameter is required if you require the Node.js Agent or the .NET Core Agent to send the default transaction data to the Analytics Agent.

analyticsPort N/A

The listening port for Analytics Agent.

For example, if the Analytics Agent is listening on port 9090, then the value of this parameter is 9090.

This parameter is required with defaultAnalyticsHost if you require the Node.js Agent to send the default transaction data to the Analytics Agent.

analyticsSslEnabled N/A

This value is based on whether the Analytics Agent port is SSL enabled. If the port is not SSL enabled, specify the value as false

This parameter is required with defaultAnalyticsPort and defaultAnalyticsHost if you require the Node.js Agent to send the default transaction data to the Analytics Agent.

containerMatchString N/A

This is a regex value to choose the containers with the name that satisfies the value. This parameter requires you to use the select option within defaultInstrumentContainer or instrumentContainer.

When the select option is used with this parameter, Cluster Agent instruments the containers that match the regex value.

This parameter overrides the default value specified for defaultContainerMatchString.

customAgentConfigSource N/A

This parameter provides an option to use the custom configuration of the instrumenting agents through ConfigMaps. This parameter requires that you create the required ConfigMaps in the Cluster Agent namespace. This parameter is dynamically configurable from the Cluster Agent YAML file. The changes that you make in the YAML file are updated to all the instrumented agents without restarting the application. Similarly, the changes that you make to the configuration in the ConfigMap is updated to all the instrumented agents without restarting the application.

  • configMapName : Specify the name of the ConfigMap. This allows the agent to use the same custom ConfigMap to update all the instrumented agent namespace.
  • subDir : (Required for Java Agent) Specify the relative path where the ConfigMaps are mounted. For example: /ver20.8.0.3686/conf , where 20.8.0.3686 is the version of the Java Agent. This directory may differ based on the Java Agent version. See Example 6.The absolute mount path for the ConfigMap is <agent home path>/subDir. This ConfigMap replaces any ConfigMap of the same name in the target application's namespace.
Note: If you need to remove a ConfigMap file (used in the rules) from your deployment, then you must first remove this parameter from the Cluster Agent YAML file, and then remove the ConfigMap from the Cluster Agent's namespace.
customSecretName N/A

The custom secret name. This is the same name that is generated when you define the license rule.

customSecretKey N/A

The custom secret key. This is the same key that is generated when you define the license rule.

instrumentContainer

first

This parameter provides an option to choose the container that must be instrumented. You can specify any of these values:

  • first : This is the default value. When you specify this value, Cluster Agent instruments the first container in the pod.
  • all : When you specify this value, Cluster Agent instruments all the containers in the pod.
  • select : When you specify this value, Cluster Agent instruments only those containers with the name that matches a regex specified in the defaultContainerMatchString parameter or the containerMatchString parameter.
language N/A

The language of the application to be instrumented.

These languages are supported:

  • dotnetcore
  • java
  • nodejs
matchString N/A

Regular expression to match on deployment name on which the rule applies.

If you do not specify a value for this parameter, then the Cluster Agent uses the value specified in the defaultInstrumentMatchString,

namespaceRegex "" Regular expression to specify the namespaces that are to be instrumented as part of this rule. You can separate namespaces using the pipe symbol (|)without any spaces.
labelMatch {}A list of key-value pairs of labels to include in this rule. It is sufficient to match any one of the labels. For example:

labelMatch:

  • label1: value1

  • label1: value2

  • label2: value2

If only label1: value2 matches, then instrumentation works as expected.

appName <defaultAppName>

Application name used by the Java Agent to report to the Controller. This overrides defaultAppName

If no value is provided, then the configured defaultAppName is used.

appNameLabel N/A

The value of this label is the Splunk AppDynamics application name.

customAgentConfig N/A

This parameter is specific to Java and Node.js applications.

You can add any custom system property if your application framework requires any specific configuration for instrumentation.This value takes precedence over the default value specified in the defaultCustomConfig parameter.

For Java applications: This value is appended to the env defaultEnv variable as configured with other Java Agent properties.

For Node.js applications: This value is appended to NODE_OPTIONS.

tierName ""

Tier name used by the Java Agent to report to the Controller.

If no tier name is provided, then the deployment name is used as the default if the tier name strategy is manual.

tierNameLabel N/A

The value of this label is the AppDynamics tier name.

nodeName ""This parameter is used to sequentially name a node under a tier. If no node name is provided, then the deployment name is used as the default.For example, consider that there are two nodes used within a tier and your application environment uses the deployment name as abc. If you do not specify the value for the node name in the configuration file, then Cluster Agent takes into account the following node names:
  • abc-1
  • abc-2
reuseNodeName true

This parameter is applicable only for Java Agent.

Set this property to false if you do not require to reuse the node names.

env ""

This parameter is specific to Java applications.

Environment variable to which the App Agent system properties will be added. When specified, this overrides defaultEnv for the deployments matching this instrumentation rule.

If none are provided, it defaults to the defaultEnv (if configured), or to the default env JAVA_TOOL_OPTIONS (if not configured at the default cluster level).

imageInfo
image:  "docker.io/appdynamics/java-agent:latest"
agentMountPath: "/opt/appdynamics"
imagePullPolicy: "IfNotPresent"
dotnetcore:
image: "docker.io/appdynamics/dotnet-core-agent:latest"
agentMountPath: /opt/appdynamics
alpineInitContainerImage: alpine
imagePullPolicy: "IfNotPresent"
nodejs:
image: "docker.io/appdynamics/nodejs-agent:20.8.0-stretch-slimv14"
agentMountPath: /opt/appdynamics
imagePullPolicy: "IfNotPresent"

You can select one of these properties:

  • image : Location of the agent image, and its tag/version.
  • agentMountPath : Location of image artifacts in the image file system. The default is /opt/appdynamics. This configuration is required only if the path differs from the default path.
  • alpineInitContainerImage: Location of alpine image and its tag/version to be used for the .NET instrumentation of init container.
  • imagePullPolicy: The pull policy required for the agent's Docker image. The default is IfNotPresent . You can choose one of these pull policies based on your requirement:
    • Always
    • IfNotPresent
    • Never
    This parameter is used in the init containers that are added during auto-instrumentation.The default value is IfNotPresent .

For the specific language mentioned in this rule, this overrides image-info

You must configure this if you want to override the default cluster-level configuration and use a custom agent version for this specific rule selection.

netvizInfo

bciEnabled: true

port: 3892

To configure the Network Visibility App Agent, netviz Install Infrastructure Visibility with the Kubernetes CLIto install the Network Agent.

By default, netviz netviz

Supported values are:

  1. bciEnabled : Boolean flag denoting whether netviz is enabled.
  2. port : The port the Network Agent is listening on (default is 3892). Override this value only when running the Network Agent on a port other than the default port.

runAsGroup

0

If you configured the application container as a non-root user, provide the groupId of the corresponding group.

This sets the appropriate file permission on the agent artifacts.

This value is applied to all the instrumented resources.

Add this parameter, if you require to override the default value of runAsGroup that is configured for default instrumentation, or if you require a specific value for the resources that satisfy this rule.

runAsUser

0

If you configured the application container as a non-root user, it provides the userId of the corresponding user.

This sets the appropriate file permission on the agent artifacts.

This value is applied to all the instrumented resources.

Add this parameter, if you require to override the default value of runAsUser that is configured for default instrumentation, or if you require a specific value for the resources that satisfy this rule.

securityContext

NA

Specify the required security context constraint parameters. For the list of parameters that can be used within securityContext, seesecurityContext Parameters.

SecurityContext Parameters

You can use the following parameters within the securityContext

Note: For OpenShift version > 4.14, ensure that all the child parameters within securityContext are specified based on the permissible values outlined by the security context constraints (SCCs). See Managing Security Context Constraints in the Red Hat OpenShift documentation. For example, if you want to use RunAsUser property in instrumentation rule then user ID (UID) should be in the permissible range. The SCCs permissible range for UID is 1000 to 9001. Therefore, you can add RunAsUser value within this range only. The same applies for other security context parameters.
Parameter Name Default Value Description

runAsGroup

0

If you configured the application container as a non-root user, provide the groupId of the corresponding group.

This sets the appropriate file permission on the agent artifacts.

This value is applied to all the instrumented resources.

Add this parameter, if you require to override the default value of runAsGroup that is configured for default instrumentation, or if you require a specific value for the resources that satisfy this rule.

runAsUser

0

If you configured the application container as a non-root user, it provides the userId of the corresponding user.

This sets the appropriate file permission on the agent artifacts.

This value is applied to all the instrumented resources.

Add this parameter, if you require to override the default value of runAsUser that is configured for default instrumentation, or if you require a specific value for the resources that satisfy this rule.

allowPrivilegeEscalation NA

To control if a process can get more privileges than its parent process. The value is true when the container runs as:

  • Privileged container
  • CAP_SYS_ADMIN
Note:
  • This parameter is unavailable when spec.os.name is Windows.

  • This parameter is currently available for Deployment and DeploymentConfig mode.

capabilities NA

To add or remove POSIX capabilities from the running containers. This uses the default set of capabilities during container runtime.

Note:
  • This parameter is unavailable when spec.os.name is Windows.

  • This parameter is currently available for Deployment and DeploymentConfig mode.

privileged False

To run container in privileged mode, which is equivalent to root on the host.

Note:
  • This parameter is unavailable when spec.os.name is Windows.

  • This parameter is currently available for Deployment and DeploymentConfig mode.

procMount DefaultProcMount

The type of proc mount to use for the containers.

Note: This parameter is currently available for Deployment and DeploymentConfig mode.
readOnlyRootFilesystem False

To specify if this container has a read-only root filesystem.

Note:
  • This parameter is unavailable when spec.os.name is Windows.

  • This parameter is currently available for Deployment and DeploymentConfig mode.

runAsNonRoot False

To specify if the container must run as a non-root user.

If the value is true, the Kubelet validates the image at runtime to ensure that the container fails to start when run as root. If this parameter is not specified or if the value is false, there is no validation.

Note: This parameter is currently available for Deployment and DeploymentConfig mode.
seLinuxOptions NA

To apply the SELinux context to the container. If this parameter is not specified, the container runtime allocates a random SELinux context for each container.

Note:
  • This parameter is unavailable when spec.os.name is Windows.

  • This parameter is currently available for Deployment and DeploymentConfig mode.

seccompProfile NA

To specify the seccomp options used by the container. If seccomp options are specified at both the pod and container level, the container options override the pod options.

Note:
  • This parameter is unavailable when spec.os.name is Windows.

  • This parameter is currently available for Deployment and DeploymentConfig mode.

windowsOptions NA

To specify Windows-specific options for every container.

Note: This parameter is unavailable when spec.os.name is Windows.This parameter is currently available for Deployment and DeploymentConfig mode.