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

Overview of Cloud Foundry Application Container Metrics

Gain a broad understanding of application container metrics.

Overview

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

You will learn

  • โœ”What container metrics are
  • โœ”How to understand memory, disk, and CPU metrics
  • โœ”How to view container metrics using the cf cli and log cache plugin

Prerequisites

Steps

Intro

This tutorial assumes you have completed the tutorials within the Create Your First App on Cloud Foundry group and you have a working cf-nodejs application.


Step 1 Metrics Overview
โ€”

Application metrics can generally be divided into two main categories

  • Metrics for the container itself
  • Metrics generated by your application (usually unique to the application and they are known as custom app metrics)

Every container managed by Cloud Foundry emits a set of metrics that can be viewed and analyzed to understand what is going on within the container; these are known as the container metrics.

Remember: a container is where an application runs once you’ve deployed it with cf push.

Container metrics are generally very simple, and mostly provide information about resource utilization. They are averaged and emitted about every 15 seconds. Container metrics include, but may not be limited to, the following by default:

MetricDescription
cpuHow much CPU an application instance uses as a percentage of a single core
cpu_entitlementHow much CPU an application instance uses as a percentage of its CPU entitlement.
memoryAmount of memory used by the application instance
memory_quotaTotal amount of memory available for the application instance
diskDisk space used by the application instance
disk_quotaTotal amount of disk space available for the application instance
container_ageAge of the container in nanoseconds

To see the complete list and more detailed information on these metrics you can check out the official page on Diego Container Metrics.

What if you need more detailed information, like what parts of your app are using how much memory each, for example? That’s where custom app metrics come in. Custom metrics are beyond the scope of this tutorial, but you can check the tutorial Overview of Custom Metrics for more information.

Step 2 Memory and Disk Metrics
+
Step 3 CPU Metrics
+
Step 4 View container metrics with the cf cli
+
Step 5 View metrics with the log cache plugin
+

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. Metrics Overview 2. Memory and Disk Metrics 3. CPU Metrics 4. View container metrics with the cf cli 5. View metrics with the log cache plugin

Learn more →