Monitoring with AppDynamics


AppDynamics is a leading Application Performance Management (APM) product. It is a tool that monitors your Application Infrastructure and gives you code level visibility. It is supported for all major technologies (Java, . NET, PHP, NodeJs).

It also helps you to monitor your databases, AKS cluster, business transactions and sends alerts based on your configuration.

In this article we will cover :

  • Monitoring of on premise application containers
  • Monitoring of Kubernetes cluster

Note: This article does not cover installation of AppDynamics.


  • Code level visibility
  • Powerful alerting
  • Visibility and control
  • Browser Real-User Monitoring
  • Application performance management
  • Database agents
  • Server Visibility
  • Trend database performance over time
  • Monitor multiple platforms
  • Troubleshoot performance issues

Monitoring of on premise application containers:

This will help us to monitor the host VM including all the services running inside it and the containers.

Steps to configure server and container monitoring:

Configure Machine Agent:

We need the machine agent to send metrics to the AppD controller. Machine agent will read how many containers have java agent running inside them including all the information of your VM instance and send that to the controller.

Follow below guidelines to configure machine agent:

  • Download the files from github:

  • Open controller.env and edit the details:

NOTE: Update controller.env and then start container with ./ only.

Configure Application Containers:

While writing the docker image definition, we need to configure java agent and AppD controller details inside the Dockerfile. That means we will be building our image with application jar as well as java agent jar which is for java applications.

We need to install java agent for java applications only. If you are working on other languages like python or nodeJs than you need pyagent and nodeagent while building your image.

A sample Dockerfile for java application is described below:


FROM openjdk:8-jdk-alpine AS buildRUN mkdir /home/appCOPY . /home/appWORKDIR /home/appRUN javac DockerConnectMySQL.javaFROM openjdk:11-jreUSER $USERRUN mkdir -p /opt/appdynamics && \cd /opt/appdynamics/ && \wget -O /opt/appdynamics/ && \unzip /opt/appdynamics/ && \rm /opt/appdynamics/AppServerAgent- — from=build /home/app/mysql-connector-java-5.1.49.jar mysql-connector-java-5.1.49.jarENV APPDYNAMICS_CONTROLLER_HOST_NAME “ “ENV APPDYNAMICS_CONTROLLER_PORT “8090”ENV APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY “my access key”ENV APPDYNAMICS_SIM_ENABLED “true”ENV APPDYNAMICS_AGENT_APPLICATION_NAME “your application name”ENV APPDYNAMICS_AGENT_TIER_NAME “INT”ENV APPDYNAMICS_AGENT_NODE_NAME “customer1”ENV APPDYNAMICS_DOCKER_ENABLED “true”ENTRYPOINT [“java”, “-XX:+UnlockExperimentalVMOptions”, “-XX:+UseZGC”, “-javaagent:/opt/appdynamics/javaagent.jar”, “-classpath”, “mysql-connector-java-5.1.49.jar:.”, “DockerConnectMySQL”]CMD [“java”, “-classpath”, “mysql-connector-java-5.1.49.jar:.”,”DockerConnectMySQL”]

After building your image, start the container.

Machine agent will be able to track the container, as java agent is running inside it and it will start sending metrics to the AppDynamics controller. Please find below screenshots :

Application Dashboard :

VM Details:

Container details:

Server visibility:

Business transactions:

Tiers and nodes:

App server agent status:

Apart from the above shown metrics, AppD provides a wide variety of other metrics as well for actively monitoring your application.

Monitoring of Kubernetes cluster:

Monitoring for Kubernetes cluster is comparatively easy to configure.


  • Login to the cluster for which you want to set up monitoring.
  • Create a namespace appdynamics
  • Create 2 files- cluster-agent-operator.yaml & cluster-agent.yaml
  • You can find files here:

  • Update the cluster-agent.yaml configuaration as below:
appName: “your application name”controllerUrl: “customer1”
  • Deploy cluster-agent-operator.yaml:
kubectl create -f cluster-agent-operator.yaml
  • Create a secret using below command:
kubectl -n appdynamics create secret generic cluster-agent-secret — from-literal=controller-key=’your-key’
  • Deploy the Cluster Agent:
kubectl create -f cluster-agent.yaml

Now give it 20–30 mins and then you will be able to see all the metrics like pods, containers, CPU details etc.

You can check pods and container metrics as well:


AppDynamics provides in depth visibility of your application in a single dashboard. It is easy to set up and helps to monitor and manage end to end performance of complex and distributed applications.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store