(Deprecated) Installing and Configuring AppDynamics APM (v1.x)

This topic explains how to install and configure AppDynamics APM for VMware Tanzu through a VMware Tanzu service broker. Service brokers allow Cloud Foundry applications to bind to and consume the services from the Apps Manager console or command line.

The AppDynamics Machine Agent extension is a separate application that can consume management metrics (exposed via JMX MBeans) and expose it on the AppDynamics management dashboard.

The VMware Tanzu tile for AppDynamics installs the AppDynamics Service Broker as an application, registers it as a Service Broker on Cloud Foundry, and exposes its service plans on the Marketplace. It also installs the Machine Agent Extension.


Install the AppDynamics Tile

  1. Download the product file from the AppDynamics Product page on the Pivotal Network.

  2. Log in to VMware Tanzu Ops Manager.

  3. Click Import a Product and import the AppDynamics product file. Import product

  4. Select the AppDynamics Service Broker. Select appdynamics

  5. Click Add on the AppDynamics Service Broker tile to add this product to your staging area.

  6. Click the newly added tile to review any configurable options. For more information, see Configuring the AppDynamics Tile. Configure appdynamics

  7. Click Apply Changes to apply the configuration.

Configure the AppDynamics Tile

  1. From the Ops Manager Installation Dashboard, click the AppDynamics Service Broker tile. Select

  2. Select Service Broker Application. Default

    1. Before creating Service Plans, you must collect the license keys from the AppDynamics Dashboard.
      1. Log in to your AppDynamics account and click the gear icon in the upper right corner of the page.
      2. Select License.
      3. Record the details of the license access key and controller. Details
    2. Click Add on the far right of the Service Plan screen to create a new service plan.
    3. Enter the Account Name and Account Access Key from the license page along with controller binding credentials (ip, port, ssl-enabled). The plan name and plan description are user-defined. Create plan
    4. (Optional) Create additional service plans for the same account key.
    5. Complete the database fields.
    6. Click Save to save the information for this plan.
  3. Select Machine Agent Extension.

    1. Ensure that the Pivotal Ops Metrics/JMX Bridge tile has been installed and JMX VM is running.

      Note: In VMware Tanzu v1.7 and later, Pivotal Ops Metrics is renamed JMX Bridge.

    2. Give a user-defined Application Name. This name should be unique across multiple VMware Tanzu installations.
    3. Complete the AppDynamics Controller, Account Name, and Account Access Keys fields. Machine agent
    4. If you do not want to override the default configuration, select Disable. If you want to override the default configuration, select Enable and specify the metrics that you want to pull in from JMX Bridge in your Cloud Foundry config.yml file. Use this template to override the config.yml file. Overridejmx
    5. Fill in the JMX Bridge Server IP and Port (default: 44444). Jmx bridge
    6. Fill in the credentials to connect to the server. Select the JMX Authentication checkbox.
    7. The AppDynamics tile does not support communication with JMX Bridge over SSL. In the JMX Provider section of the JMX Bridge tile, uncheck the Enable SSL checkbox. Disabledjmxbridge
    8. Disable SSL in the AppDynamics tile. Disabledssl
    9. Click Save.
  4. Select Analytics Agent.

  5. Select Web Proxy Configuration. ProxyServerConfig

  6. To use a proxy server between your VMware Tanzu instance and the AppDynamics Controller, select Enable and complete the following fields:

    • Web Proxy Host Name/IP: Enter the IP address or host name of the proxy server.
    • Web Proxy Port: Enter the port number on which the proxy server listens.
    • HTTP Web Proxy Auth Enabled: If your proxy server requires authentication, check this checkbox and complete the following fields:
      • Web Proxy Username: Enter the username for authenticating with the proxy server. The default for no authentication is _none_.
      • Web Proxy Password: Enter the password for authenticating with the proxy.
  7. Click Save.

  8. If relevant for your version of VMware Tanzu, set the correct Collector instance count in the Elastic Runtime tile Resource Config pane:

    • VMware Tanzu v1.7 or earlier: Ensure that the Collector count is to 1 and click Save if changed.
    • VMware Tanzu v1.8: Ensure that the Collector count is set to 0 and click Save if changed.
    • VMware Tanzu v1.9 or later: No action is needed. VMware Tanzu v1.9 and later have no Collector component.
  9. When finished configuring the AppDynamics tile and any other tile changes, return to the Ops Manager Installation Dashboard and click Apply Changes.

Create and Bind a Service Instance

  1. For new applications, use the cf push command to deploy your application, using the appropriate language buildpack.

    • Java:
      $ cf push APPNAME -b  https://github.com/appdynamics/java-buildpack
    • PHP:
      $ cf push APPNAME -b  https://github.com/appdynamics/php-buildpack
  2. Log in to Apps Manager and navigate to the Services Marketplace. Marketplace

  3. View AppDynamics Service Plans. Plans

  4. Bind the AppDynamics Service to an application. Bind

  5. In a terminal window, use the cf restage command to make the changes effective.

      $ cf restage APPNAME

  6. Confirm that your application node is reporting to the Controller by logging in to AppDynamics. Your application should appear in the Applications list or as a node in the Application Dashboard:


  7. Select Top Business Transactions, Network Dashboard, and Transaction Snapshots to display other views of the AppDynamics Application Dashboard. Dashboard2 Dashboard3 Dashboard4

  8. To check VMware Tanzu Ops Metrics, check for an application named AppDynamicsVMware TanzuOpsMetrics in the controller UI. The Application Dashboard for this application should be empty, since it only reports metrics of VMware Tanzu. To see the metrics, select Home > AppDynamicsVMware TanzuOpsMetrics > Metric Browser > Application Infrastructure Performance > MachineAgentTier > Custom Metrics > CF. This lists all underlying components of VMware Tanzu such as CloudController and Router. View12.2.1

Configuration with HTTP Proxy

If the Cloud Foundry environment needs to use an HTTP(S) proxy for external outbound communication, the Service Broker itself does not need to know anything about the HTTP proxy, as it just relays the license keys to the consumer apps. The consumer application should specify the http\_proxy or https\_proxy as an environment variable for the agent to communicate externally with non-Java applications, and use JAVA_OPTS for Java applications.

  • Specify using http\_proxy for the AppDynamics non-Java application agent to talk to its controller through the proxy.

    $ cf set-env APPNAME http_proxy ‘http://user:password@proxy-server.customer.com:8080'
    $ cf set-env APPNAME https_proxy ‘http://user:password@proxy-server.customer.com:8080'

  • Specify using JAVA_OPTS for the AppDynamics Java application agent to talk to its controller through the proxy.

    $ cf set-env APPNAME JAVA_OPTS "
    -D test.value=barbar
    -D appdynamics.http.proxyHost=proxy.customer.com
    -D appdynamics.http.proxyPort=8080 "

  • If a Java application also needs to talk through a proxy, provide standard Java HTTP arguments.

    $ cf set-env APPNAME JAVA_OPTS "
    -D test.value=barbar -D appdynamics.http.proxyHost=proxy.customer.com
    -D appdynamics.http.proxyPort=8080  -D http.proxyHost=proxy.customer.com
    -D http.proxyPort=8080 -D https.proxyHost=proxy.customer.com
    -D https.proxyPort=8080  "

Whenever making changes to Cloud Foundry environment variables, you must restage your app(s) to make the changes effective.

  $ cf restage APPNAME

You can set these environment variables either individually per app, or with environment variable groups set for all apps as part of staging, running environments, etcetera using the cf CLI.

Environment Variable Groups

  • running-environment-variable-group, revg: Retrieve the contents of the running environment variable group

  • staging-environment-variable-group, sevg: Retrieve the contents of the staging environment variable group

  • set-staging-environment-variable-group, ssevg: Pass parameters as JSON to create a staging environment variable group

  • set-running-environment-variable-group, srevg: Pass parameters as JSON to create a running environment variable group

Use the JAVA_OPTS environment variable to specify AppDynamics Agent-specific environment variables in the Staging environment group so the Java Buildpack can use that and push it in the correct place. Specifying JAVA_OPTS in the Runtime environment variable group will not yield anything, as the buildpack will not know about it.


  $ cf ssevg '{ "JAVA_OPTS" : " -Dtest.value=barbar
  -Dappdynamics.http.proxyPort=8080 -Dhttp.proxyHost=proxy.customer.com
  -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.customer.com
  -Dhttps.proxyPort=8080 -Dspring.profiles.active=dev ", "test_env_profile" :
  "Staging" }'

Machine Agent

If the machine agent does not expose any metrics in the AppDynamics dashboard:

  • If you are using VMware Tanzu v1.7 or earlier, check the Elastic Runtime tile Resource Config pane to ensure that you are running a Collector job with an instance count of 1.
  • Ensure the JMX Bridge tile is installed and verify the admin credentials, IP address, and port of the Metrics instance.
  • If a proxy exists, the machine agent might not be able to reach out. Add the following environment variable parameters to the “AppDynamicsVMware TanzuOpsMetrics” app in the AppDynamicsVMware TanzuOpsMetrics-related Org and Space:
  $ cf set-env AppDynamicsVMware TanzuOpsMetrics JAVA_OPTS "
  -Dappdynamics.http.proxyPort=8080 -Dhttp.proxyHost=proxy.customer.com
  -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.customer.com

Edit the above values as needed for IP addresses, passwords, proxy host, and port.

Further Reference

For more information, see the following topics: