Installing App Metrics

Page last updated:

Prerequisites

Before you install App Metrics:

Note: App Metrics v2.0 requires Metric Store as its metrics datastore. You will need to install this tile before installing App Metrics.

  • If upgrading from the Metrics v1.x line: The App Metrics tile will install as a seperate tile and will not install over the v1.x version of the Metrics tile. There is no data migration from the v1.x line to the v2.x line of the product. To maintain historical data please install both tiles side-by-side for two weeks before uninstalling the Metrics v1.x line.

    Note: App Metrics will take over the metrics.YOUR-SYSTEM-DOMAIN. Please turn off the Push PCF Metrics Components Errand for the Metrics v1.x tile to avoid install errors. Metrics v1.x will be accessible at metrics-previous.YOUR-SYSTEM-DOMAIN.

Download App Metrics

  1. After you have installed the Metric Store tile in Ops Manager, download the App Metrics 2.0 product file from VMware Tanzu Network.
  2. Navigate to the Ops Manager Installation Dashboard and click Import a Product to upload the product file.
  3. Under the Import a Product button, click + next to the version number of App Metrics. This adds the tile to your staging area.

Configure AZs and Networks

To start using App Metrics, you need to configure the App Metrics tile by performing the following steps:

  1. Click the App Metrics tile on the Ops Manager Installation Dashboard.
  2. Navigate to Assign AZs and Networks and do the following:
    • Select an Availability Zone (AZ) for placing singleton jobs.
    • Select one or more AZs for balancing other jobs. (Note: To create a highly available environment, VMware recommends selecting multiple AZs.)
    • Select Network for installing App Metrics.

(Optional) Configure App Metrics to Use an HTTP or SOCKS Proxy

You can configure App Metrics to use your HTTP, HTTPS, or SOCKS proxy server for Slack or webhook alerts.

Enable an HTTP or HTTPS Proxy Server

Enable a HTTP or HTTPS Proxy Server through the cf CLI.

  1. Log in to the cf CLI by running:

    cf login -a API-URL -u USERNAME -p PASSWORD -o system -s app-metrics-v2
    

    Where:

    • API-URL is your API endpoint.
    • USERNAME is your username.
    • PASSWORD is your password.
  2. Update the HTTP_PROXY or HTTPS_PROXY environment variable by running:

    cf set-env appmetrics HTTP_PROXY "http://PROXY-HOST:PROXY-PORT"
    

    or

    cf set-env appmetrics HTTPS_PROXY "https://PROXY-HOST:PROXY-PORT"
    

    Where:

    • PROXY-HOST is the hostname of your HTTP or HTTPS proxy.
    • PROXY-PORT is the port that your HTTP or HTTPS proxy is listening on.

    The HTTP proxy environment variables must be uppercase. For more information on setting system-wide environment variables, see Environment Variable Groups in the Cloud Foundry Documentation.

Enable a SOCKS Proxy Server

Start by enabling an HTTP or HTTPS proxy using the cf CLI, then switch it to a SOCKS protocol in the Ops Manager UI.

  1. Click the App Metrics tile on the Ops Manager Installation Dashboard.
  2. Navigate to the App Metrics Components Config pane.
  3. Click Enable Socks Proxy. This checkbox sets the USE_SOCKS_PROXY environment variable, which overrides the protocol for the proxy to use SOCKS instead of HTTP or HTTPS.

  4. Even though the HTTP or HTTPS proxy will be overriden, you must set it first. To do so, log in to the cf CLI by running:

      cf login -a API-URL -u USERNAME -p PASSWORD -o system -s app-metrics-v2
    

    Where:

    • API-URL is your API endpoint.
    • USERNAME is your username.
    • PASSWORD is your password.
  5. Update the HTTP_PROXY or HTTPS_PROXY environment variable:

      cf set-env appmetrics HTTP_PROXY "http://PROXY-HOST:PROXY-PORT"
    

    or

      cf set-env appmetrics HTTPS_PROXY "https://PROXY-HOST:PROXY-PORT"
    

    Where:

    • PROXY-HOST is the hostname of your HTTP or HTTPS proxy.
    • PROXY-PORT is the port that your HTTP or HTTPS proxy is listening on.

    The HTTP proxy environment variables must be uppercase. For more information on setting system-wide environment variables, see Environment Variable Groups in the Cloud Foundry Documentation.

(Optional) Configure App Metrics Features

Here you can configure the settings for App Metrics components, including Log Store.

  1. Click the App Metrics tile on the Ops Manager Installation Dashboard.
  2. Navigate to the App Metrics Components Config pane.
  3. To disable the Logs Drawer on the App Metrics dashboard, deselect the “App Metrics Enable Logs” checkbox (enabled by default).
  4. Set the App Metrics Logs Prune Threshold disk capacity percentage (set to 80% by default). This is the disk percentage at which Log Store will start to prune the oldest logs first.
  5. Set the App Metrics Logs Prune Interval (set to two minutes by default). This is the frequency at which Log Store will check the disk capacity to make the pruning decision.

(Optional) Configure Syslog Forwarding

App Metrics supports forwarding syslog to an external log management service such as Papertrail, Splunk, or a custom enterprise log sink. You may find the VM logs useful for debugging problems in the system.

To enable remote syslog forwarding for Healthwatch, do the following:

  1. Click the App Metrics tile on the Ops Manager Installation Dashboard.
  2. Navigate to the Syslog pane.
  3. Select Yes without encryption or Yes with TLS encryption to enable syslog forwarding.
  4. For External Syslog Host, enter the address of syslog server where you want logs sent, such as [logs.example.com].
  5. For External Syslog Port, enter the port of your syslog server, such as [29279].
  6. For External Syslog Protocol, select the protocol for sending the logs.
  7. (TLS only) For External Syslog Permitted Peer, enter the fingerprint or name of the remote peer, such as [*.example.com].
  8. (TLS only) For External Syslog TLS CA Certificate, enter the CA certificate of the syslog destination.

(Optional) Configure Metric Registrar for Spring Boot Metrics

In order for Metric Registrar to accurately report Spring Metrics, the configuration for Metric Registrar must be updated in the VMware Tanzu Application Service for VMs (TAS for VMs) or Pivotal Application Service (PAS) tile.

To update the Metric Registrar configuration, do the following:

  1. Click the TAS for VMs or PAS tile on the Ops Manager Installation Dashboard.
  2. Navigate to the Metric Registrar pane.
  3. Update the Blocked tags list and remove the id tag from the list of Blocked tags.

Perform this step if the View in App Metrics does not appear in Apps Manager and App Metrics is deployed with one the following versions of TAS for VM or PAS:

  • TAS for VMs v2.10.x
  • TAS for VMs v2.9.x
  • PAS v2.8.4 or later
  • PAS v2.7.10 or later
  • PAS v2.6.16 or later

The View in App Metrics link may not appear in Apps Manager if your deployment has restrictive networking policies around request proxying.

To resolve this issue and enable the App Metrics link in Apps Manager:

  1. Log in to the cf CLI by running:

    cf login -a API-URL -u USERNAME -p PASSWORD -o system -s system
    

    Where:

    • API-URL is your API endpoint.
    • USERNAME is your username.
    • PASSWORD is your password.
  2. Update the no_proxy environment variable for the search-server app to include your system domain.

    cf set-env search-server no_proxy '*.SYSTEM-DOMAIN'
    

    where SYSTEM-DOMAIN is the system domain configured for your deployment. For example:

    cf set-env search-server no_proxy '*.example.com'
    

  3. Restage the search-server app.

    cf restage search-server