Using an Environment Variable
You can monitor an application by using an environment variable.
- Procedure
- Create a
manifest.yml
in the same directory where the application EAR file is exported. - Set the environment variable to bind the monitoring service. Add the
BW_APP_MONITORING_CONFIG" <url>
environment variable in themanifest.yml
file.applications: - name: RestBookStoreSample.application memory: 1024M path: tibco.bwce.sample.binding.rest.BookStore.application.ear timeout: 60 buildpack: bw-buildpack env: BW_LOGLEVEL: ERROR BW_APP_MONITORING_CONFIG: "{\"url\":\"http://monitoring.tibcopcf110.com\"}"
Note: The application name displayed on the monitoring dashboard is provided by themanifest.yml
file. - In cf CLI, run the command
cf push
to deploy the application on the Cloud Foundry. - After the application is deployed successfully, you can see the application running on the Cloud Foundry management web UI.