In modern cloud-native landscapes, observability is key to ensuring system reliability, performance, and quick troubleshooting. SAP Kyma, built on Kubernetes, offers powerful extensibility and event-driven capabilities for SAP solutions. To effectively monitor these distributed microservices, serverless functions, and infrastructure components, Prometheus is a go-to monitoring and alerting tool.
This article explains how to integrate Prometheus with SAP Kyma, highlighting best practices to gain comprehensive visibility into your Kyma workloads and accelerate operational excellence.
Prometheus is a cloud-native monitoring system widely adopted in Kubernetes environments due to its:
Kyma natively supports Prometheus, making it a natural choice for monitoring SAP extensions, microservices, and serverless functions deployed on Kyma.
Metrics Exporters
Each Kyma component (microservices, functions, Istio proxies) exposes metrics in Prometheus format, typically at /metrics endpoints.
Prometheus Server
Scrapes these endpoints periodically and stores time-series data.
Service Discovery
Prometheus automatically discovers Kyma services using Kubernetes APIs, keeping the monitoring configuration dynamic and up-to-date.
Alertmanager
Sends alerts based on defined thresholds and rules, integrating with email, Slack, or PagerDuty.
Grafana Dashboards
Visualize and analyze metrics to identify bottlenecks and trends.
Kyma comes with Prometheus and Grafana pre-installed in the kyma-system namespace. Verify the Prometheus deployment:
kubectl get pods -n kyma-system -l app=prometheus
If not installed, you can deploy Prometheus using Kyma’s Helm charts or Operator-based installation.
Prometheus discovers services through Kubernetes service annotations:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
Ensure your microservices and functions include these annotations for Prometheus to scrape metrics.
Create Prometheus alert rules, for example, to detect high CPU usage or failed function invocations:
groups:
- name: kyma-alerts
rules:
- alert: HighCPUUsage
expr: sum(rate(container_cpu_usage_seconds_total[5m])) by (pod) > 0.8
for: 2m
labels:
severity: warning
annotations:
summary: "High CPU usage detected on pod {{ $labels.pod }}"
Apply these rules via ConfigMaps in the Prometheus namespace.
Access Grafana dashboards pre-configured in Kyma or create custom ones:
kubectl port-forward -n kyma-system svc/grafana 3000:3000
Navigate to http://localhost:3000 and explore dashboards like “Kyma Runtime Overview” or create specific dashboards for your services.
service, environment, and version to metrics for granular filtering.Consider a Kyma application extending SAP S/4HANA with a custom order processing microservice and event-driven functions.
Integrating Prometheus with SAP Kyma unlocks deep insights into the health and performance of your cloud-native SAP extensions. By following best practices for instrumentation, scraping, alerting, and visualization, you create a proactive monitoring framework that enhances reliability and accelerates issue resolution.
With SAP Kyma’s native support for Prometheus, organizations can confidently scale and operate complex SAP extension scenarios, maintaining business continuity and improving customer experience.