Accessing Logs and Metrics on Pivotal Platform

Page last updated:

This topic describes how to access logs and metrics for VMs and app containers on your Pivotal Platform deployment. It includes information about the available logs and metrics for the Pivotal Application Service (PAS) and Enterprise Pivotal Container Service (PKS) runtimes.

Overview

There are different methods for accessing logs and metrics for VMs and app containers depending on if you use the PAS or PKS app runtime for your deployment.

There are also different permissions required to access logs and metrics on PAS and PKS. The sections in this topic explain how to access logs and metrics on your PAS or PKS deployment based on your user role permissions.

Access Platform Director VM Logs

Platform Director logs include logs from the Ops Manager and BOSH Director VMs.

For both PAS and PKS, operators can access platform director VM logs by configuring a syslog drain in the Ops Manager tile. For more information, see the Settings Page section of the Using the Ops Manager Interface topic.

The format for the BOSH Director VM logs is Syslog RFC 5424. For more information, see RFC 5424 - The Syslog Protocol in the Internet Engineering Task Force (IETF) documentation.

The format for the Ops Manager VM logs is Syslog RFC 3164. For more information, see The BSD Syslog Protocol in the IETF documentation.

Access VM Logs

This section describes how to access logs for PAS and PKS VMs.

The format for VM logs is Syslog RFC 5424. For more information, see RFC 5424 - The Syslog Protocol in the IETF documentation.

See one of the following sections below:

Access VM Logs on PAS

PAS VM logs include logs for runtime component VMs and service tile VMs.

The following table describes how to access VM logs on foundations with PAS based on user role and permissions.

Title PAS Role Procedure Notes
Operator Admin Configure system logging in PAS. For more information, see the Configure System Logging section of the Configuring PAS topic. To access logs for service instances, you must also configure syslog in each service tile for which you want logs. For more information, see the documentation for the service tile.
Developer Space Developer Not applicable.

Access VM Logs on PKS

The following table describes how to access VM logs on foundations with PKS based on user role and permissions.

Title Role Procedure Notes
Operator Admin Enable system logging in PKS. For more information, see the Host Monitoring section in the PKS installation topic for your IaaS:
Cluster Admin/Developer Not applicable. Not applicable.

Access VM Metrics

This section describes how to access metrics for PAS VMs and PKS VMs.

See one of the following sections below:

Access VM Metrics on PAS

For PAS deployments, VM metrics include PAS component and service tile VM metrics.

The following table describes how to access VM metrics on foundations with PAS based on user role and permissions.

Title PAS Role Procedure Notes
Operator Admin No additional configuration is required. PAS emits VM metrics through the Loggregator Firehose. For more information, see Loggregator Architecture. The Firehose emits metrics as a gauge or counter Loggregator envelope type. For more information, see the loggregator-api repository on GitHub.
Developer Space Developer Not allowed.

Access VM Metrics on PKS

For PKS deployments, VM metrics include metrics for the master and worker nodes.

Note: VM metrics are available on PKS v1.5 and later.

The following table describes how to access VM metrics on foundations with PKS based on user role and permissions.

Title Role Procedure Notes
Operator Admin Configure an output plugin in the PKS tile. For more information, see Creating Sink Resources in the PKS documentation. Component VM Metrics include the master node only.
Cluster Admin The operator defines the role-based access policy for accessing VM metrics. Configure a ClusterMetricSink in the cluster. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterMetricSink for each new cluster.
  • Component VM Metrics include the worker nodes only.
Developer The operator defines the role-based access policy for accessing VM metrics.

Access App Container Logs

This section describes how to access app logs on Pivotal Platform.

See one of the following sections below:

Access App Container Logs on PAS

App container logs for PAS deployments include logs for apps and service instances.

The following table describes how to access app logs on foundations with PAS based on user role and permissions.

Title PAS Role Procedure Notes
Operator Admin Access logs with one of the following methods:
  • Loggregator Firehose: No configuration required. The Firehose emits logs as text payload. The developer defines the log format. For more information, see the loggregator-api repository on GitHub.
  • Syslog Drain: Requires configuration of Syslog Adapter Drain. For more information, see the Step 2: Create and Bind a User-Provided Service Instance section of the Streaming App Logs to Log Management Services topic.
  • Aggregate Syslog Drain: A syslog drain that sends all app logs to a single destination. Configure the aggregate syslog drain in the PAS tile. For more information, see the Configure System Logging section of the Configuring PAS topic.
  • The Firehose does not emit logs for service instances. To access service instance logs, use the syslog drain or aggregate syslog drain method.
  • Syslog drains emit logs as Syslog RFC 5424.
Developer Space Developer Access logs with one of the following methods:
  • Loggregator Firehose: The Firehose emits logs as text payload. The developer defines the log format. For more information, see the loggregator-api repository on GitHub.
  • Syslog Drain: Requires configuration of Syslog Adapter Drain. For more information, see the Step 2: Create and Bind a User-Provided Service Instance section of the Streaming App Logs to Log Management Services topic.
  • The Firehose does not emit logs for service instances. To access service instance logs, use the syslog drain method.
  • Syslog drains emit logs as Syslog RFC 5424.

Access App Container Logs on PKS

The following table describes how to access app container logs on foundations with PKS based on user role and permissions.

Title Role Procedure Notes
Operator Admin Configure a ClusterSink in the cluster. For more information, see Creating Sink Resources in the PKS documentation.
  • You can send logs from a namespace within a cluster to a log destination by configuring a namespace log Sink. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterSink for each new cluster.
Cluster Admin The operator defines the role-based access policy for accessing app logs. Configure a ClusterSink in the cluster. For more information, see Creating Sink Resources in the PKS documentation.
  • You can send logs from a namespace within a cluster to a log destination by configuring a namespace log Sink. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterSink for each new cluster.
Developer The operator defines the role-based access policy for accessing app logs. Configure a Sink in the PKS tile for a cluster namespace. For more information, see Creating Sink Resources in the PKS documentation.
  • You can send logs from a namespace within a cluster to a log destination by configuring a namespace log Sink. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterSink for each new cluster.
  • You must provide your own access policy.
  • Developers may not have permissions to configure a ClusterSink. Operators must define an access policy that allows developers to create a ClusterSink.

Access App Container Metrics

This section describes how to access app container metrics on Pivotal Platform.

See one of the following sections below:

Access App Container Metrics on PAS

App container metrics on PAS include app metrics and service instance metrics. App container metrics on PAS do not include task metrics. This is because Diego does not emit task metrics.

The following table describes how to access app container metrics on foundations with PAS based on user role and permissions.

Title PAS Role Procedure Notes
Operator Admin Access metrics with one of the following methods:
  • The Firehose emits metrics as a gauge or counter Loggregator envelope type. For more information, see the loggregator-api repository on GitHub.
  • Syslog drains emit logs as Syslog RFC 5424.
Developer Space Developer Access metrics with one of the following methods:

Access App Container Metrics on PKS

The following table describes how to access app container metrics on foundations with PKS based on user role and permissions.

Title Role Procedure Notes
Operator Admin Configure a ClusterMetricSink in the cluster. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterMetricSink for each new cluster.
  • You must provide your own access policy.
Cluster Admin The operator defines the role-based access policy for accessing app metrics. Configure a ClusterMetricSink in the cluster. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterMetricSink for each new cluster.
  • ClusterMetricSink automatically scrapes an annotated /metrics Prometheus endpoint.
Developer The operator defines the role-based access policy for accessing app metrics. Configure a MetricSink in the PKS tile for a cluster namespace. For more information, see Creating Sink Resources in the PKS documentation.
  • You must configure a ClusterMetricSink for each new cluster.
  • ClusterMetricSink automatically scrapes an annotated /metrics Prometheus endpoint.
  • Developers may not have permissions to configure a ClusterMetricSink. Operators must define an access policy that allows developers to create a ClusterMetricSink.