SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Forward Logs and Container Metrics

Understand the various ways logs and container metrics are forwarded so that they can be consumed by the user.

Overview

🎓 beginner 15 min. SAP BTP Cloud Foundry Runtime And EnvironmentBeginnerCloud

You will learn

  • โœ”What a drain is
  • โœ”How the Log Cache API and Plugin work
  • โœ”What the Loggregator Firehose is and how nozzles work
  • โœ”How logs and metrics reach the SAP Application Logging service
Beyhan Veli B Beyhan Veli April 13, 2026
Created by October 28, 2021
Contributors

Prerequisites

Steps

Intro

This tutorial assumes you’ve completed the Create a Service Instance and Bind it to Your App tutorial and have a working knowledge of the SAP Application Logging service.


Step 1 Drains and how they work
โ€”

Drains, also referred to as syslog drains, serve as a place for your logs to flow into. When you bind a drain to your application you are telling Cloud Foundry’s logging system to forward the application’s logs to whatever service the drain references. This can be a service already in your Cloud Foundry marketplace or it can be a third-party log management service, or even an application you have created yourself. You can even have multiple drains to handle different types of logs. The main purpose of using a drain is to allow your logs to persist for as long as you need, rather than being overwritten when the Cloud Foundry log buffer gets too full. This way you can access your data over a longer period of time and get more useful analytics.

Custom metrics sent to Cloud Foundry’s logging system are also treated as logs, and will be forwarded when you set up a drain. Container metrics are not forwarded when you set up a drain.

To drain your logs to third-party log management service, you will need:

  1. A properly configured log management service
  2. A syslog drain service to bind to your application. This can be done with the cf cli which is explained in the section below.
  3. Restage of your application

Cloud foundry has several service-specific instructions for setting up drains as well.

For your Log Management Service to work properly with the SAP BTP CF platform you may need to allow communication from the CF platform to the Log Management Service. This is accomplished by configuring your Log Management Service to allow access from the IP addresses within your corresponding region.

Step 2 Set up a Drain using the CF CLI
+
Step 3 The Log Cache
+
Step 4 The Loggregator Firehose and nozzles
+
Step 5 The SAP Application Logging service
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Drains and how they work 2. Set up a Drain using the CF CLI 3. The Log Cache 4. The Loggregator Firehose and nozzles 5. The SAP Application Logging service

Learn more →