Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 4 for HPE GreenLake Flex Capacity > Working in Cloud Cruiser > Configuring and Administering Azure > Onboarding Azure FC Customers > Configuring a New CREST Endpoint

Configuring a New CREST Endpoint

The CREST API collector is configured by default to collect from a single CREST endpoint.  However, multiple endpoints can be collected from by modifying the Spring Batch XML job entitled CREST_collect_usage and CREST_collect_tier_rates.  The CREST Collector Overview provides an explanation of how the process works, but the following steps explicitly walk through the process of adding another endpoint (e.g., adding a North American endpoint to the existing European endpoint).

Configuring the Collector Properties

Before You Begin

By default, the CREST collector uses ${env.usageDir}/Azure as the base usage directory.  However, when adding a new collection endpoint, another base directory must be created to prevent the regions from interfering with one another.  It needs to be relative to ${env.usageDir} and can be titled whatever is desired.  For example, it could be AzureNA for North America, or it could simply have an index added to it like Azure1.

Creating the New Collector Properties File

In order for the new collection to be able to hit the corresponding endpoint, the collection.properties file needs to contain the relevant information.

  1. Create a file entitled collection.properties at the location determined in the Before You Begin section (e.g., ${env.usageDir}/Azure1/collection.properties).
  2. Enter the following values in the file (screen capture for reference purposes only):
  • clientId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx, which corresponds to App ID in the API section of Partner Center
  • clientSecret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, which corresponds to the Key value in the Key Management portion of the API section of Partner Center
  • resellerDomainPrefix=xxxxxxxx, which is the domain of the HPE CSP that takes the form of <domain name>.onmicrosoft.com
  • resellerTenantId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx, which corresponds to Account ID in the API section of Partner Center
  • resellerCustomerId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx, which corresponds to Commerce ID in the API section of Partner Center
  • partnerOfferId=MS-AZR-0145P, which is the offer ID for Partner Center rates)
  • retailOfferId=MS-AZR-0003P, which the offer ID for Pay-as-You-Go rates)
  1. Save the file.

Configuring the CREST Usage Collection

Before You Begin

The collection.properties file must be created and populated according to the steps in Configuring the Collector Properties.

Creating the New Collection

The collections against the CREST API will be done sequentially so the Spring Batch XML will be edited directly to create a new collection to execute after those that already exist.

  1. Click Data > Processing > Advanced Job Maintenance.
  2. Expand Production Jobs and click CREST_collect_usage.
  3. Copy lines 12 through 31.
  4. Paste them after the last </batch:step> line.
  5. Set the copied <batch: step id="collect"> to <batch:step id="collect-x"> where x corresponds to an index (e.g., 1, 2, 3, etc.) depending upon how many endpoints have been added thus far.
  6. Set the preceding <batch: step id="collect"> to <batch: step id="collect" next="collect-x"> where x corresponds to the value in the preceding step.
  7. Set the copied <property name="command" value="./CollectUsage.sh ${env.scriptsDir} ${env.selectDate} ${env.usageDir}/Azure"/> to <property name="command" value="./CollectUsage.sh ${env.scriptsDir} ${env.selectDate} ${env.usageDir}/Azurex"/> where x corresponds to the new directory created in the Configuring the Collector Properties section.
  8. Click Save.

Configuring the Workbook CREST Usage Collection

Before You Begin

The CREST_usage_collect Spring Batch XML job should be configured for the new endpoint per the Configuring the CREST Usage Collection section.

Adding the New Collection

  1. Click Data > Workbooks.
  2. Select the _Azure Workbook.
  3. Click Collections > List.
  4. Select the CREST_usage collection and click Copy.
  5. Set the name to CREST_Usagex where x corresponds to an index (e.g., 1, 2, 3, etc.) depending upon how many collections have been added thus far or to a region, if desired.
  6. Click Create New for the Data Source.
  7. Set the name to CREST_Usagex where x corresponds to an index (e.g., 1, 2, 3, etc.) depending upon how many collections have been added thus far or to a region, if desired. 
  8. Set the Source to Command.
  9. Enter the information in the text fields as follows:
  • File Name: ${env.usageDir}/Azurex/usage/${env.selectDate}_assemble.csv where x corresponds to the directory created in Configuring the Collector Properties
  • Command: ${env.scriptsDir}/assemble_crest_usage.sh ${env.scriptsDir} ${env.usageDir}/Azurex/usage ${env.selectDate} where x corresponds to the directory created in Configuring the Collector Properties
  • Timeout: 300000
  1. Click Apply.

It may display an error reading "Fetching sample data failed".  This is expected so just click Yes.

  1. Click Finish.
  2. Double-click the Import Collections step in the CREST_Usage Sheet.
  3. Add the created collection to Collections.
  4. Click OK.
  5. Click Save.
  6. Click Data > Processing > Scheduling.
  7. Double-click the _Azure (Daily) Schedule.
  8. Check the box next to the Collection created in the Workbook Components section.
  9. Click OK.
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.

 (c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP