Using the Pivotal Telemetry Collector CLI

This topic explains how to use the Pivotal Telemetry Collector Command-Line Interface (CLI).

Note: Pivotal recommends installing the Pivotal Telemetry Collector with Concourse. For more information, see Using Telemetry Collector for PCF with Concourse.

Prerequisite

To complete the steps in this section, you must have the Pivotal Telemetry Collector CLI binary that corresponds to your operating system. You can download the binary from Pivotal Network.

Install Manually

To install Pivotal Telemetry Collector manually, complete the following steps:

  1. Add the binary to your $PATH.
  2. Open a terminal window and enter telemetry-collector to verify your installation. If your installation succeeds, the command returns help commands.

Using Pivotal Telemetry Collector CLI

Once you have installed the CLI, follow the procedure below to collect data from your PCF foundation and send it to Pivotal.

Collect

To collect data from your PCF foundations Ops Manager (and optionally Usage Service), use the following command with information from your foundation:

  telemetry-collector collect --url --username --password [or --client-id and
  --client-secret] --usage-service-url --usage-service-client-id
  --usage-service-client-secret --cf-api-url --env-type --output-dir

Where:

  • --url is the Ops Manager URL where the command collects data from.
  • --username is your Ops Manager username.
  • --password is your Ops Manager password.
  • --env-type is the type of environment you are using to collect data. You can enter one the following options:
    • sandbox
    • development
    • qa
    • pre-production
    • production
  • --cf-api-url is the CF API URL for UAA authentication to access Usage Service
  • --usage-service-url is the Usage Service URL (this URL is typically: https://app-usage.YOUR-SYSTEM-DOMAIN)
  • --usage-service-client-id is the Usage Service client id. Note that this client needs to be a member of either the cloud_controller.admin or usage_service.audit group.
  • --usage-service-client-secret is the Usage Service client secret.
  • --output-dir is your local directory where the command writes the output tar file.

Note: Your Ops Manager username and password are not required if you are using client authentication. For more information on the available flags, see Configuration Reference.

Note: If you want to configure the Telemetry Collector to send Usage Service data, you must include information for all 4 flags related to the Usage Service.

If the command succeeds, it returns the following message:

Wrote output to MY-FILE-PATH/FoundationDetails_#######.tar
Success!

After running the command, you can examine the data collected in the FoundationDetails_######.tar file.

Send

To send data to Pivotal from your PCF foundation, run the following command:

telemetry-collector send --path --api-key

Where:

  • --path is the path to the FoundationDetails_######.tar file written by the collect command.
  • --api-key is the Telemetry API key used to authenticate with Pivotal.

Note: You must send the original, unmodified FoundationDetails.tar file for the command to work.

If the command succeeds, it returns the following message:

Success!