Cloud Cruiser became HPE Consumption Analytics on Nov. 1, 2018. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 4 for HPE GreenLake Flex Capacity > Working in Cloud Cruiser > Configuring and Administering Azure > CREST Collector Overview

CREST Collector Overview

In order to collect Azure data, Cloud Cruiser directly accesses the CREST API (https://msdn.microsoft.com/en-us/lib.../dn974944.aspx) to get usage, rates, and customer information in order to be able to correlate it to HPE FC customers.  This collector is not supported out-of-the-box so a custom collector was developed, and it requires access to the Cloud Cruiser server file system to configure.

Collector Entry Points

The actual Java program exists at ${env.scriptsDir}/CrestUtilities.jar.  Within it are three main access points as follows:

  • CollectUsage, which is the primary use of the program and collects the daily usage and rates as well the relevant customer details.
  • CollectTierRates, which is performed at a monthly cadence to determine the service tier thresholds and corresponding rates, if applicable to each service.
  • DetermineTierDiscounts, which is called from within the processing flow to determine whether or not tier thresholds have been eclipsed, and if so, what discounts should be applied for each customer.

Collector Properties

In order to do any of the preceding tasks, the credentials and other properties must be properly set.  The file at ${env.usageDir}/Azure/collection.properties contains the following properties:

  • 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 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 Account 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)

This file will only need to be modified if any changes are made within Partner Center related to the clientSecret or if an entirely different clientId is to be used.  Otherwise, there is no need to modify this file.

Collections

As stated prior, there are two entry points in the Java-based collector specific to collections -- CollectUsage and CollectTierRates.  Each is accessed via a Spring Batch XML job at Data > Processing > Advanced Job Maintenance as follows:

CREST_collect_usage

The call to the Java collector program is wrapped in Shell script located at ${env.scriptsDir}/CollectUsage.sh.  The specific command is located in the command property of the com.cloudcruiser.batch.ExecuteCommandTasklet bean in the Spring Batch XML as follows:

The command property reads as follows:

./CollectUsage.sh ${env.scriptsDir} ${env.selectDate} ${env.usageDir}/Azure

The following is a description of each of the parameters:

  • ${env.scriptsDir}, which is the Cloud Cruiser scripts directory
  • ${env.selectDate}, which is the date of the desired collection
  • ${env.usageDir}/Azure, which is the Azure directory within the Cloud Cruiser usage files directory

This collection is to be run daily using the CREST Usage Collect (Daily) Schedule at Data > Processing > Scheduling as follows:

CREST_collect_tier_rates

The call to the Java collector program is wrapped in Shell script located at ${env.scriptsDir}/CollectTierRates.sh.  The specific command is located in the command property of the com.cloudcruiser.batch.ExecuteCommandTasklet bean in the Spring Batch XML as follows:

The command property reads as follows:

./CollectTierRates.sh ${env.scriptsDir} ${env.selectDate} ${env.usageDir}/Azure

The following is a description of each of the parameters:

  • ${env.scriptsDir}, which is the Cloud Cruiser scripts directory
  • ${env.selectDate}, which is the date of the desired collection
  • ${env.usageDir}/Azure, which is the Azure directory within the Cloud Cruiser usage files directory

This collection is to be run daily using the CREST Tier Rates Collect (Monthly) Schedule at Data > Processing > Scheduling as follows:

 

Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.

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