Grafana on Cloud Foundry
Switch branches/tags
Nothing to show
Clone or download
Latest commit 31434cc Jun 15, 2017
Failed to load latest commit information.
.cfignore Add Jun 15, 2017
.gitignore Add Jun 15, 2017 Update README Jun 15, 2017
manifest.yml Add Jun 15, 2017 Add Jun 15, 2017

Grafana on Cloud Foundry

How to deploy Grafana to Cloud Foundry

git clone
cd cf-grafana
tar -zxvf grafana-4.3.2.linux-x64.tar.gz 
mv grafana-4.3.2 grafana
# In case of Pivotal Web Services
cf create-service cleardb spark grafana-db
# In case of Pivotal Cloud Foundry
cf create-service p-mysql 100mb-dev grafana-db
cf push my-grafana

Go to

If you use free spark plan of cleardb service, you'll get a lot of errors because the number of connections allowed by ClearDb is only 4. You can reload a lot and sometimes get correct responses.

If you don't need to persist dashboards and users, you can use default sqlite3 as follows. This is much better experience than free ClearDB though everything in the instance will disappear when you restart the application.

sed -i -e 's|^http_port = 3000$|http_port = 8080|' ./conf/defaults.ini
cf push my-grafana -b binary_buildpack -c './bin/grafana-server web' -m 64m

(Optional) How to deploy Prometheus to Cloud Foundry

tar -zxvf prometheus-1.7.1.linux-amd64.tar.gz
cd prometheus-1.7.1.linux-amd64
sed -i -e 's|localhost:9090|localhost:8080|' prometheus.yml
# and add scrape_configs for your exporters
cf push my-prom -b binary_buildpack -c './prometheus -web.listen-address=:8080' -m 64m

Go to

This instance uses local storage, so all metrics will be reset when it is restarted.