Monitoring environment of applications running on cloud foundry

80 Views Asked by At

Under the env: block within manifest.yml, we mention artifact versions being run on app, before pushing the app(cf push) using manifest.yml

This will help cf user to get the artifact versions running on any app on cloud foundry using cf env <app_name> for each app.


For all apps running in cloudfoundry, Can firehose help us provide environment (cf env) data for each app?

1

There are 1 best solutions below

4
Daniel Mikusa On

For all apps running in cloudfoundry, Can firehose help us provide environment (cf env) data for each app?

It's unnecessary to listen to the firehose. Your app running on CF will have access to any environment variables that you set (i.e. that are visible with cf env) by simply using their language/runtime's ability to read an environment variable.

For example:

  1. I run cf set-env my-cool-app VERSION '1.0.0'.
  2. In my app, I can read VERSION to retrieve the value 1.0.0.

In Java, you'd use System.getenv("VERSION"). In Node you'd use process.env.VERSION. In Python you'd use os.environ['VERSION']. etc...