You can use logging and metrics in VMware Tanzu Application Service for VMs (TAS for VMs). Learn about logs and metrics sources, and transport systems. It also lists products for viewing logs and metrics.

Accessing metrics

You must use a Cloud Foundry Command-Line Interface (cf CLI) plug-in to access and view metrics directly from the command line. You can use either the Firehose plug-in or the Log Cache plug-in.

Accessing metrics using the Log Cache CLI plug-in

To access metrics with the Log Cache plug-in:

  1. Log in to the cf CLI by running:

    cf login -a API-URL -u USERNAME -p PASSWORD
    

    Where:

    • API-URL is your API endpoint.
    • USERNAME is your username.
    • PASSWORD is your password.
  2. Install the Log Cache CLI plug-in by running:

    cf install-plug-in -r CF-Community "log-cache"
    

    For more information, see log-cache in cf CLI plug-ins on the Cloud Foundry website.

  3. Run:

    cf query 'METRIC-NAME{source_id="SOURCE-ID"}'
    

    Where:

    • METRIC-NAME is the name of the metric you want to view.
    • SOURCE-ID is the source ID of the component for which you want to view metrics.
    To find the source ID and metric name of the metric you want to view, see Key Performance Indicators and Key Capacity Scaling Indicators.

Accessing metrics using the Firehose plug-in

To access metrics using the Firehose plug-in:

  1. Log in to the cf CLI by running:

    cf login -a API-URL -u USERNAME -p PASSWORD
    

    Where:

    • API-URL is your API endpoint.
    • USERNAME is your username.
    • PASSWORD is your password.
  2. Install the Firehose cf CLI plug-in by running:

    cf install-plugin -r CF-Community "Firehose Plugin"
    

    For more information, see Firehose plug-ins in cf CLI Plug-ins on the Cloud Foundry website.

  3. Run:

    cf nozzle -no-filter | grep SOURCE-ID | grep -i METRIC-NAME
    

    Where:

    • METRIC-NAME is the name of the metric you want to view.
    • SOURCE-ID is the source ID of the component for which you want to view metrics.

    For example:

    cf nozzle -no-filter | grep bbs | grep -i ConvergenceLRPDuration
    

    Because metrics are scraped at different intervals, it might take up to fifteen minutes for the Firehose to receive all metrics for the component. Run cf nozzle again until you have received a complete set of metrics for a component. For more information, see Firehose Architecture in Loggregator Architecture.

    To find the source ID and metric name of the metric you want to view, see Key Performance Indicators and Key Capacity Scaling Indicators.

For more information about nozzles, see Nozzles in Logs, Metrics, and Nozzles in the Tanzu Operations Manager Tile Developer Guide.

Sources for logs and metrics

The following sources are for TAS for VMs logs and metrics:

  • TAS for VMs platform components, such as a Diego Cell, MySQL Server, or Cloud Controller
  • Apps and app containers deployed on TAS for VMs

The following table describes the data included in logs and metrics from each source:

Source Logs data Metrics data
Platform components Logs from TAS for VMs components
  • Health metrics from BOSH-deployed VMs1
  • Platform metrics from TAS for VMs components. For example, Diego Cell capacity remaining and Gorouter throughput.
  • Metrics for any service tile that self-publishes to the Loggregator Firehose. For example, Redis and MySQL.
Apps and app containers Logs from apps2
  • Container metrics3
  • Custom app metrics4

1For more information about using the BOSH Health Monitor to collect health metrics on VMs, see Configuring a Monitoring System.

2For more information about app logging, see App Logging in TAS for VMs.

3For more information about container metrics, see Container Metrics.

4For more information about configuring an app to stream custom metrics to Loggregator, see Metric Registrar and Custom App Metrics.

Transport Systems for logs and metrics

The following transport systems deliver logs and metrics from their source to an observability product for viewing:

  • Loggregator: Loggregator is the transport system for both logs and metrics on apps deployed on TAS for VMs, as well as metrics on TAS for VMs platform components.

For more information about the Loggregator system, including Loggregator architecture and components, see Loggregator Architecture and for the types of envelopes being transported in Loggregator, see Envelope Types.

  • rsyslogd on TAS for VMs component VMs: rsyslogd is the transport system for TAS for VMs component logs. Users can configure rsyslogd to transport component logs to a third-party syslog server.

The following table lists the transport system for logs and metrics on TAS for VMs platform components and apps:

Source Logs transport system Metrics transport system
Platform components rsyslogd on TAS for VMs component VMs Loggregator
Apps Loggregator Loggregator

Viewing logs and metrics

The following table lists the products and tools for viewing TAS for VMs logs and metrics:

Source Products and tools for viewing logs Products and tools for viewing metrics
Platform components To view system logs from TAS for VMs components, configure rsyslogd to transport logs to a third-party product. You can use the following products or tools to view platform component and VM metrics:
Apps You can use the following products or tools to view app logs: You can use the following products or tools to view app metrics:
check-circle-line exclamation-circle-line close-line
Scroll to top icon