Installing PCF Metrics

This document describes how to install and configure Pivotal Cloud Foundry (PCF) Metrics.

To use the Custom Metrics feature of the PCF Metrics tile, you must have the Metrics Forwarder tile installed. However, the PCF Metrics tile can be installed without the Metrics Forwarder tile.

For information about the components deployed as part of this install procedure, see PCF Metrics Product Architecture.

Upgrade from v1.4.x to v1.6.x

This section describes upgrading from PCF Metrics v1.4.x to v1.6.x.

Overview

PCF Metrics version 1.6 includes new data storage solutions that were introduced in version 1.5:

  • For logs, versions 1.5 and 1.6 use PostgreSQL instead of ElasticSearch.
  • For metrics, versions 1.5 and 1.6 use Percona instead of MariaDB.

There is no effective upgrade path from ElasticSearch to PostgreSQL for logs data. For this reason, the upgrade Procedure is different from previous versions.

Procedure

To upgrade to PCF Metrics v1.6 from 1.4.x, Pivotal recommends that you follow this procedure:

  1. Upload and install the PCF Metrics v1.6 tile alongside the v1.4 tile. Follow the instructions in the Install PCF Metrics section below.
    PCF Metrics v1.6 supports running both the v1.6 and v1.4 tiles simultaneously. You can install v1.6 manually or automate the installation with a deployment pipeline. PCF Metrics 1.4 and v1.6 installed in Ops Manager
  2. Keep both tiles installed and running for the duration of the logs and metrics retention window you configured in v1.6. This allows data to propagate to the new version.

    • During this time, you can access both dashboards. However, you can no longer access historical metrics and logs data on the v1.4 dashboard after the duration of the logs and metrics retention window you configured in v1.6 has passed.
      • For v1.4: Go to metrics-previous.YOUR-SYSTEM-DOMAIN.
      • For v1.6: Go to metrics.YOUR-SYSTEM-DOMAIN. You can also click View Metrics in Previous Versions on the v1.6 dashboard to see metrics for the current app on the v1.4 dashboard. View Metrics in Previous Version link
  3. Uninstall PCF Metrics v1.4.

Upgrade from v1.5.x to v1.6.x

As both 1.5 and 1.6 use the same datastore solutions, you can use standard manual or automated upgrade paths to upgrade from PCF Metrics 1.5.x to 1.6.x.

New Install of PCF Metrics

This section describes how to install the PCF Metrics tile.

Add the PCF Metrics Tile to Ops Manager

To add the PCF Metrics tile to Ops Manager, do the following:

  1. Download the latest PCF Metrics v1.6 tile from Pivotal Network.
  2. Upload the PCF Metrics file to your Ops Manager installation.
  3. Click Add next to the uploaded product description in the Available Products view to add PCF Metrics to the Ops Manager Installation Dashboard.

Configure the PCF Metrics Tile

This section describes how to configure the PCF Metrics tile.

Note: The following procedures offer a standard configuration. To customize PCF Metrics for high capacity, see Sizing PCF Metrics for Your System.

  1. From the Installation Dashboard, click the PCF Metrics tile.
  2. Follow the procedures below to configure the PCF Metrics tile:

Assign Availability Zones (AZs) and Networks

To configure the Assign AZs and Networks pane, do the following:

  1. Click Assign AZs and Networks.
  2. Select an Availability Zone under Place singleton jobs.
    Ops Manager runs Metrics jobs with a single instance in this Availability Zone.
  3. Select one or more Availability Zones under Balance other jobs.
    Ops Manager balances instances of Metrics jobs with more than one instance across the Availability Zones that you specify.
  4. Use the drop-down menu to select a network.
    PCF Metrics should be installed on the same network the Pivotal Application Service (PAS) tile uses. However, if you do select a different subnet network, then refer to the table below when you configure the subnet network in the PAS tile to make sure that you have the ports needed for each of the PCF Metrics data services.

    Service Port
    PostgreSQL (Logs Data) 5524
    MySQL (Metrics Data) 3306
    Redis (Data Caching and Aggregation) 6379
  5. Click Save.

Configure Metrics Components

To configure the Metrics Components Config pane, do the following:

Metrics App Components Settings

  1. Click Metrics Components Config.
  2. Review the MySQL Metrics Queue Count value. You can increase this instance count at any time to accommodate higher levels of inbound metrics traffic.
  3. Review the PostgreSQL Logs Queue Count value. You can increase this instance count at any time to accommodate higher levels of inbound log traffic.
  4. Review the Ingestor Count value. You can increase this instance count at any time to accommodate higher levels of Loggregator Firehose traffic.
  5. Review the Metrics API server instance count value. You can increase this instance count at any time to accommodate deployments with more apps, metrics, and logs.
  6. Review the Metrics Retention Window value. You can set number of days to retain metrics data from 1 to 14 days. PCF Metrics adds one buffer day to your configured value to prevent pruning within your desired retention window. The retention window begins at UTC±00:00 of the current day and goes back the amount of days you enter in this field, plus the one buffer day added by PCF Metrics.
  7. Review the Logs Retention Window value. You can set number of days to retain logs data from 1 to 14 days. PCF Metrics adds one buffer day to your configured value to prevent pruning within your desired retention window. The retention window begins at UTC±00:00 of the current day and goes back the amount of days you enter in this field, plus the one buffer day added by PCF Metrics.
  8. Review the Logs Max Retention Percentage value. As a preventative measure, you can set the percentage of disk capacity used before triggering automatic log pruning to prevent Postgres failures. The default is 85.
  9. Review the Logs Disk Size Pruning Interval value. You can set the length of time between checking the Postgres disk capacity for automated pruning operations. Default is 1 hour.
  10. Review the Log level for push apps value. You can set the log level for the push-apps errand to suit your troubleshooting needs. The options are error, warning, info, debug, or trace. Default level is error.
  11. Click Save.

Configure Resources

To configure the Resource Config pane, do the following:

  1. Click Resource Config.
  2. Review the resource configurations. By default, the settings match the instance types that are best suited for each job. For reference, the following table shows the default resource and IP requirements for installing the PCF Metrics tile:

    Resource Instances Persistent CPU RAM Ephemeral Static IP Dynamic IP
    PostgreSQL Logs Storage 1 (Not configurable) 500 GB 4 16 GB 32 GB 1 0
    Redis 1 (Not configurable) 100 GB 2 4 GB 8 GB 1 0
    MySQL Metrics Storage 1 (Not configurable) 500 GB 4 16 GB 32 GB 1 0
    If you expect a high level of use, you might need to increase the disk resources available to your instances. For more information, see Sizing PCF Metrics for Your System.

    Note: For Ops Manager v1.9, if you configure a job with persistent disk larger than 2 TB, you might experience disk partitioning issues with the BOSH Director.

  3. Click Save.

Optional: Forward PCF Metrics Logs to a Syslog Endpoint

Operators can configure PCF Metrics to forward its process and VM logs to a logging solution through a syslog endpoint.

Note: Ops Manager 2.4 or later is required to configure PCF Metrics to forward logs to a syslog endpoint. For information about upgrading Ops Manager, see PCF Ops Manager 2.4 Release Notes.

To configure PCF Metrics to forward logs to a syslog endpoint, do the following:

  1. In the PCF Metrics tile, click Settings, then click Syslog. Syslog Settings

  2. For Do you want to configure Syslog forwarding?, select Yes. Enable Syslog Form

  3. For Address and Port, enter the address and port of the syslog server. For Transport Protocol, select the desired transport protocol. Syslog Config

  4. (Optional) Select the Enable TLS checkbox to enable TLS. If you enable TLS, enter the Permitted Peer and SSL Certificate. Syslog TLS Settings

  5. For Queue Size, enter the number of log messages the syslog server buffer holds before dropping messages. By default, the queue size is 100000.

    Note: Pivotal recommends a queue size of 100000 or less. A queue size larger than 100000 may cause performance issues.

    Syslog Queue Settings

  6. Click Save.

  7. Navigate to the Ops Manager Installation Dashboard and run the PCF Metrics errands to apply your changes.

Import Stemcell

To import the correct stemcell, follow the procedure in Importing and Managing Stemcells.

Note: PCF Metrics 1.6 requires the Xenial stemcell line.

Deploy PCF Metrics

To deploy PCF Metrics, do the following:

  1. If you are using Ops Manager v2.3 or later, click Review Pending Changes. For more information about this Ops Manager page, see Reviewing Pending Product Changes.
  2. Click Apply Changes to install the service. If the smoke tests fail, see Smoke Test Errors in Troubleshooting PCF Metrics.

For more information on how to log in, use, and interpret data from PCF Metrics, see Monitoring and Troubleshooting Apps with PCF Metrics.