Using an Environment Variable

You can monitor an application by using an environment variable.

Procedure

  1. Create a manifest.yml in the same directory where the application EAR file is exported.
  2. Set the environment variable to bind monitoring service. Add BW_APP_MONITORING_CONFIG" <url> as environment variable in manifest.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 the manifest.yml file.
  3. In cf CLI, execute the command cf push to deploy the application on the Cloud Foundry.
  4. After the application is deployed successfully, you can see the application running on the Cloud Foundry management web UI.