AppDynamics is an Application Performance Management company that offers solutions to monitor a variety of applications running on public clouds or in private data centers. App Dynamics is excited to support Pivotal’s Cloud Platform by making it easy to monitor Java apps running on Cloud Foundry and Pivotal’s Web Services.
Monitor Apps on Pivotal Web Services
The AppDynamic Java agents are included in the default Java buildpack for Cloud Foundry, so if you have AppDynamics monitoring running, the Cloud Foundry DEA will auto-detect the service and enable the agent in the buildpack. If you start the AppDynamics monitoring for an app already running, just restart the app and the DEA will autodetect the new service.
In the future, Pivotal Web Services will include the AppDynamics SaaS APM services, so you’ll only need to signup for Pivotal Web Services and it will automatically create an AppDynamics account. But for now, don’t forget to signup signup for AppDynamics because you need both accounts!
2) Download the Cloud Foundry CLI (Command Line Interface)
Pivotal Web Services has both a web based GUI as well as a full featured linux style command line interface (CLI). Once you have a PWS account, you can download a Mac, Windows or Unix CLI from the “Toosl” tab in the PWS dashboard or directly for OSX, Linux, and Windows.
3) Sign-in With Your Pivotal Web Services Credentials
Using the CLI, log into your Pivotal Web Services account. Remember to preface all commands given to Cloud Foundry with
cf. Individual Cloud Foundry PaaS clouds are identified by their domain API endpoint. For PWS, the endpoint is api.run.pivotal.io. Cloud Foundry will automatically target your default org (you can change this later) and ask you to select a space (a space is similar to a project or folder where you can keep a collection of apps).
$ cf login
Monitoring Apps on Pivotal Web Services
1) Clone the Spring Trader demo application
The sample Spring Trader app is provided by Pivotal as a demonstration. This can be used to show how monitoring works. First git clone the app from the Github repository.
$ git clone https://github.com/cloudfoundry-samples/rabbitmq-cloudfoundry-samples
2) Create a user provided service to auto-discover the AppDynamics agent
$ cf create-user-provided-service demo-app-dynamics-agent -p "host-name,port,ssl-enabled,account-name,account-access-key"
Tip: Find out more about deploying on PWS in the Java build pack docs.
3) Use the Pivotal Web Services add-on marketplace to add a cloud based AMQP + PostgreSQL database instance
$ cf create-service elephantsql turtle demo-db $ cf create-service cloudamqp lemur demo-amqp
4) Bind PostgreSQL, AMQP, and AppDynamics services to the app
$ git clone https://github.com/cloudfoundry-samples/rabbitmq-cloudfoundry-samples $ cd rabbitmq-cloudfoundry-samples/spring $ mvn package $ cf bind-service demo-app demo-app-dynamics-agent $ cf bind-service demo-app demo-amqp $ cf bind-service demo-app demo-db
5) Push the app to production with the CLI Upload your app with the
cf push command, or (as in the example below) you can specify additional parameters including memory, number of app instances, name and the exact app path.
$ cf push demo-app -i 1 -m 512M -n demo-app -p target/rabbitmq-spring-1.0-SNAPSHOT.war
Spring AMQP Stocks Demo App
Pivotal Web Services Console
Production Monitoring with AppDynamics Pro
To get more out of your app monitoring, signup for an AppDynamic Pro account with enhanced features and code level visibility into application performance problems.