Using PCF Metrics

This topic describes how to log in to, use, and interpret data from Pivotal Cloud Foundry (PCF) Metrics.

PCF Metrics stores logs, metrics data, and event data from applications running on PWS for the past two weeks. It graphically presents this data to help developers better understand the health and performance of their apps. PCF Metrics includes the following data views:

  • Container metrics: CPU, memory, and disk usage percentages
  • Network metrics: requests per second, HTTP errors per second, and request latency
  • App events: create, update, start, stop, and crash
  • Logs: searchable application logs from the past two weeks

For example, if you see a crash in the events view, you can zoom in on that time and view the corresponding container and network metrics. To help you troubleshoot, you can also see log output for that same time period.

View an App in PCF Metrics

In your browser, navigate to PCF Metrics and choose an app for which you want to view metrics. You can view any app for which you are a Space Developer.

Search for an app

PCF Metrics provides you with a graphical representation of application data for a given time frame, along with the corresponding application logs. See the sections below to Toggle the Data Views and Change the Time Frame. See the Interpret Metrics section for more information on each data view.

Metrics UI

Toggle the Data Views

There are four data views: Container Metrics, Network Metrics, Logs, and Events. Select which views you want to see using the toggles in the upper left.

Toggle

Change the Time Frame

The data views show time along the horizontal axis. You can change the time frame for all the data views by using the dropdown at the top of the page. Use the refresh button to update all views with the most current data.

time

Zoom: From within any data view, you can also zoom in on areas of interest by clicking and dragging within the graph. This adjusts all of the views, including Logs, to show data from that time period.

Metric zoom

Drag: From underneath the x-axis of any data view, you can drag left or right to view data for an earlier or later time.

Interpret Metrics

PCF Metrics displays the following data. You can hover over each view to see data for a specific time.

Container Metrics

The Container Metrics view displays CPU, Memory, and Disk usage:

Container View

  • A spike in CPU might point to a process that is computationally heavy. Scaling app instances can relieve the immediate pressure, but investigate the app to better understand and fix the root cause.
  • A spike in memory might mean a resource leak in the code. Scaling app memory can also relieve the immediate pressure, but look for and resolve the underlying issue so that it does not occur again.
  • A spike in disk might mean the app is writing logs to files instead of STDOUT, caching data to local disk, or serializing huge sessions to disk.

Network Metrics

The Network Metric view displays HTTP Requests and Errors and Latency:

Network View

  • A spike in latency means your users are waiting longer to use your app. Scaling app instances can spread that workload over more resources and result in faster response times.
  • A spike in HTTP errors means one or more 5xx errors have occurred. Check your app logs for more information.
  • A spike in HTTP requests means more users are using your app. Scaling app instances can reduce the higher latency that may result.

Events

The Events view shows the following app events: Create, Update, Start, Stop, and Crash. You can change which events you see using the checkboxes in the upper right.

Events

See the About Starting Applications and Troubleshooting Application Deployment and Health topics for more information about app events.

Logs

Logs displays application log data ingested from the firehose. See the Application Logging in Cloud Foundry topic for more information.

Logs

PCF Metrics lists all logs by default, and the histogram displays log frequency for the current time frame. You can refine the list and histogram with the following:

  • Filter: Perform a keyword search. The histogram updates with blue bars based on the filter. Hover over a histogram bar to view the amount of logs for a specific time based on your filter.
  • Highlight: Enter a term to highlight within your search. The histogram updates with yellow bars based on the results. Hover over a histogram bar to view the amount of logs for a specific time that contain the highlighted term.
  • Sources: Choose which sources to display logs from.
  • Order: Modify the order in which logs appear.

You can also click the Download button to download a file containing logs for the current search.

Was this helpful?
What can we do to improve?
View the source for this page in GitHub