logo

Are you need IT Support Engineer? Free Consultant

Deploy Grafana on SAP BTP Cloud Foundry in 5 Minutes

  • By sujay
  • 15/08/2026
  • 37 Views

Previous Article : Monitoring SAP Cloud Foundry Applications with Prometheus and Python

Monitoring is a critical part of any cloud-native application landscape. While SAP BTP provides built-in observability capabilities, many teams prefer Grafana for creating rich dashboards and visualizing metrics from multiple data sources.

Prerequisites

Before starting, ensure you have:

  • An SAP BTP subaccount with Cloud Foundry enabled
  • Cloud Foundry CLI installed
  • Space Developer role in your Cloud Foundry space
  • Docker Hub access (optional for custom images)
  • Logged in to Cloud Foundry

 

Create manifest.yml


applications:
– name: grafana-test
memory: 1512M
disk_quota: 5G
docker:
image: grafana/grafana:latest
env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin

Cloud Foundry manifests provide a repeatable deployment configuration and are the recommended approach for application deployment.

Push Grafana to SAP BTP

Deploy the application.

cf login -a api.cf.<region>.hana.ondemand.com –sso

cf push

Cloud Foundry will:

  1. Pull the Grafana Docker image
  2. Create the application
  3. Start the container
  4. Map the route
  5. Expose Grafana

The deployment lifecycle includes upload, staging, and startup phases managed automatically by Cloud Foundry

Optional: Install Popular Plugins

Add plugin installation through environment variables.

env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: Welcome123!
GF_INSTALL_PLUGINS: grafana-piechart-panel
Grafana supports plugin installation through Docker image environment configuration

Optional: Use User-Provided Service for Secrets

Instead of storing passwords in the manifest:

cf cups grafana-config -p ‘{“adminPassword”:”StrongPassword”}'

Bind the service:

cf bind-service grafana grafana-config
cf restage grafana

 Bonus Manifest.yaml


applications:
– name: grafana-prod
memory: 2G
disk_quota: 2G
instances: 2

docker:
image: grafana/grafana:latest

env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: ChangeMeImmediately
GF_USERS_ALLOW_SIGN_UP: “false”

health-check-type: port

routes:
– route: grafana-prod.cfapps.<region>.hana.ondemand.com

 

Conclusion

Deploying Grafana on SAP BTP Cloud Foundry is surprisingly simple. Using the official Grafana Docker image, a lightweight manifest.yml, and a single cf push, you can have a fully functional Grafana instance running in minutes. This approach is ideal for PoCs, internal monitoring solutions, and dashboarding applications while leveraging the scalability and operational simplicity of SAP BTP Cloud Foundry

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

Chat with us on WhatsApp!