Install the Database Agent container image as follows:
You can install Database Agent as a non-root user. |
You can obtain the container image in one of the following ways:
Navigate to the directory where you unzipped the file and run this command:
docker build -t <image-name> . |
Pull the latest Database Agent container image from the Docker hub:
docker pull appdynamics/db-agent:latest |
(Optional) Tag the image:
docker tag appdynamics/db-agent:latest <image-name> |
If you want to run the image on Docker, set certain environment variables:
docker run -e APPDYNAMICS_CONTROLLER_HOST_NAME="" -e APPDYNAMICS_CONTROLLER_PORT="" -e APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY='' -e APPDYNAMICS_AGENT_ACCOUNT_NAME="" -e APPDYNAMICS_CONTROLLER_SSL_ENABLED="" -e APPDYNAMICS_DB_AGENT_NAME="DatabaseAgent" -e APPDYNAMICS_DB_PROPERTIES="-Ddbagent.telemetry.enabled=true" -d <image-name> |
The environment variables specified in the preceding command are examples. You can set more environment variables as per your need. See Database Agent Configuration Properties for more details. |
To add more properties to the APPDYNAMICS_DB_PROPERTIES
parameter, add the property separated by a space.
For example:
APPDYNAMICS_DB_PROPERTIES: "-Ddbagent.telemetry.enabled=true -Dretry.on.auth.failure=false" |
Perform these steps to deploy the Database agent:
Update the following fields in the yaml files:
YAML File | Field |
---|---|
accessKey.secret.yaml |
|
dbagentProperties.configMap.yaml | APPDYNAMICS_CONTROLLER_HOST_NAME APPDYNAMICS_CONTROLLER_PORT APPDYNAMICS_CONTROLLER_SSL_ENABLED APPDYNAMICS_DB_AGENT_NAME APPDYNAMICS_AGENT_ACCOUNT_NAME |
dbagent.deployment.yaml | spec.template.spec.containers.image |
Perform these steps to deploy the Database Agent:
Navigate to the k8s-deploy
directory.
Create the configMap for db-agent properties:
kubectl create -f dbagentProperties.configMap.yaml --save-config |
Create the secret for account access-key:
kubectl create -f accessKey.secret.yaml --save-config |
Create the logs configMap:
kubectl create -f logs.configmap.yaml --save-config |
Create the deployment for db-agent:
kubectl create -f dbagent.deployment.yaml --save-config |
You can edit the selectors and labels in the Do not overlap the selectors or labels with other Controllers (including other Deployments and StatefulSets). Kubernetes do not stop you from overlapping. Hence, if multiple Controllers have overlapping selectors, then the Controllers might conflict and behave unexpectedly. |
appd-db-agent-properties
appd-db-agent-log-config
Reapply the configMap:
kubectl apply appd-db-agent-properties |
kubectl apply appd-db-agent-log-config |
Rollout and restart the db-agent
deployment:
kubectl rollout restart deployment <deployment-name> |
|
By default, the db-agent
deployment uses a secret for the account access key.
However, if you want to pass the account access key as a parameter, perform these steps:
Add the APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY
property in appd-db-agent-properties
configMap.
Do not encode the property. |
Reapply the appd-db-agent-properties
configMap.
kubectl apply appd-db-agent-properties |
spec.template.spec.containers.envFrom.secretRef
section in the dbagent.deployment.yaml
file.Reapply the db-agent
deployment:
kubectl apply -f dbagent.deployment.yaml |