Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Prometheus on MindSphere CloudFoundry

Tested Environment

$ cf version
cf version 6.38.0+7ddf0aadd.2018-08-07

$ go version
go version go1.10.1 darwin/amd64

$ yarn --version


The following environment variables are recognized by the prometheus server:

Variable Description Required
PROM_EXTERNAL_URL External Prometheus URL yes

Deploy to MindSphere

Prometheus is deployed from its github sources. Since Prometheus is a Golang project and we require some custom configuration files to be uploaded when deploying to cloudfoundry, a script is provided that copies the relevant files into the checked out sources.

  1. Copy and adapt conf/prometheus.yml.sample to conf/prometheus.yml, specifically:

    • targets of todo job, point to the internal address of the todo app
  2. Follow the instructions on the devopsadmin readme and copy and adapt the cf vars file with the required configuration

  3. Download the prometheus source code. This will save the code to your ${GOPATH} (typically ~/go or ~/.go)

    go get
  4. Checkout the latest tested version (v2.5.0 at the time of writing):

    cd ${GOPATH}/src/
    git checkout v2.5.0
  5. The manifest will bind itself to a LogMe (ELK) service to gather all logs, make sure you have created it in advance:

    cf create-service logme logme-xs devopsadmin-logme
  6. Ensure you are in the right CloudFoundry space and push to MindSphere. The command will also copy the required configuration files to the prometheus source before push:

    CF_VARS_FILE="<path>" \
    PROM_CONF_FILE="<path>" \

The param CF_VARS_FILE is your CloudFoundry adapted vars file.

The param PROM_CONF_FILE points to your adapted configuration file.

Local Build and Execution

In case you want to build & run locally the prometheus distribution:

cd "$(go env GOPATH)/src/"
make build

./prometheus --config.file=your_config.yml


This project is licensed under the MIT License

You can’t perform that action at this time.