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 for Partner Center > Partner Center Collector Overview

Partner Center Collector Overview

In order to collect Azure data, Cloud Cruiser directly accesses the Partner Center API (https://msdn.microsoft.com/en-us/library/partnercenter/mt667943.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.  Additionally, Cloud Cruiser uses the CREST API (https://msdn.microsoft.com/en-us/lib.../dn974944.aspx) to get the Azure list price as the Partner Center API does not support rates other than CSP rates.

Collector Entry Points

The actual Java programs exist at ${env.scriptsDir}/Partner_Center/PartnerCenterUtilities.jar and ${env.scriptsDir}/Partner_Center/CrestUtilities.jar.  Within the first are two main entry points as follows:

  • CollectUsage, which collects the daily usage and the relevant customer details.
  • CollectRates, which collects each day's Partner Center rates to correlate to the usage.

The latter has a single entry point as follows:

  • CollectRates, which collects each day's Pay-As-You-Go rates to correlate to the usage.

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}/AzureX/collection.properties (where X represents the region) 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 tenant 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 Commerce ID in the API section of Partner Center
  • offerId=MS-AZR-0003P, which the offer ID for Pay-as-You-Go rates
  • currency=XXX, which corresponds to a three-letter ISO 4217 code for the currency in which the resource rates are provided, such as "USD".
  • locale=XX-XX, which corresponds to the location and language/region settings, such as "en-US".
  • regionInfo=XX, which corresponds to two-letter ISO 3166 country/region code that indicates the market where the offer is purchased, such as "US".

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 Partner Center collector specific to collections -- CollectUsage and CollectRates -- as well as a single entry point in the CREST collector -- CollectRates.  Each is accessed via a Spring Batch XML job at Data > Processing > Advanced Job Maintenance as follows:

Partner_Center_CollectUsage

The call to the Java collector program is wrapped in Shell script located at ${env.scriptsDir}/Partner_Center/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}/Partner_Center ${env.selectDate} ${env.usageDir}/AzureX

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}/AzureX, which is the AzureX directory within the Cloud Cruiser usage files directory (where X represents the region)

This collection is to be run daily using the Partner Center Usage Collect Schedule at Data > Processing > Scheduling as follows:

Partner_Center_CollectRates

The call to the Java collector program is wrapped in Shell script located at ${env.scriptsDir}/CollectRates.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