Windows Azure Pack, Usage and Billing
Usage & Billing Update 7: Usage Collector Extends to C# and PowerShell
Injecting non-WAP Usage details into billing pipeline using our C# based extensibility module
With the Update 7 release of Cloud Assert Usage & Billing solution for Windows Azure Pack, we are delighted to announce this key enhancement: C# and PowerShell based Usage Extensibility. You are no more limited with just the resources exposed by WAP (and especially System Center). You can now fill the gaps, add more meters and attach monetary values all with-in the awesome Usage and Billing solution from Cloud Assert for Windows Azure Pack.
For instance, many of our customers had requested for billing their Tenant's usage of System Center VM Networks, VPN and specifically VM Networks that have NAT enabled. System Center does not expose those Usage information currently, through the WAP pipeline, so there is no way to monetize or report on those imporant resource usage. Now with Cloud Assert Usage and Billing extensibility module, those details can be easily captured from System Center (via simple Powershell scripting) and injected into Cloud Assert Billing pipeline. (Sample Powershell scripts attached with this blog).
Not just the usage from traditional WAP services, you can now get any Usage data from any source, like Domain and SSL usage or for the fun of it, say you sell lime juice, as long as you can write simple PowerShell or C# to retreive that lime juice usage - Cloud Assert Usage and Billing will observe those metrics you send through these simple extensibility mechanisms, aggregate the metrics, provide visibility via WAP Tenant portal to your end users, set price profiles, generate invoices etc., combined with all the other features available.
How it works:
1. Usage & Billing Agent Service reads the UsageExtensionsSettings.json on startup, and initializes the enabled extensions
2. Agent Service periodically invokes each extension. It gives the list of subscription ids or user ids to process, as input to the Extension, for a given hour
3. Agent Service persists the generated Usage Records into RawUsageRecords table
4. If there are any remaining IDs to be processed for that hour, step #2 is repeated
5. Agent Service Aggregators now take care of processing the RawUsageRecords into Hourly, Daily and Monthly records, according to Pricing Profile configuration
Instructions to setup our Extensibility module and scripts:
1. Obtain the Usage Extensibility Module zip file from Cloud Assert
2. Extract and copy the contents in to the deployment location of U&B Billing Agent Windows Service
a. “C:\Program Files\CloudAssertBilling\CloudAssert.WAP.Billing.AgentService”
a. The core functions in the Powershell script are ProcessSubscription and ProcessVMNetworkOfSubscription
b. Change the following lines to suit your needs:
4. Edit the appropriate U&B Pricing Profile in WAP Admin portal and add as many Metered Resource Pricing entries to match the info provided in step #3.b (1 Metered Resource entry per Resource)
5. Place the new Usage Powershell script created in step #3, in the Scripts folder
a. Create the Scripts folder if it does not exist
6. Edit the UsageExtensionsSettings.json file to add a new extension to the pipeline
a. Change the Id, Name, Script Path and PSModulesToImport properties
b. Use double slashes in place of single slash
7. Edit the following lines CloudAssert.WAP.Billing.AgentService.exe.config file:
8. Restart the U&B Billing Agent Service
9. Check the CloudAssertBilling Windows Event Log for any errors
10. If all looks good, check the RawUsageRecords table in CloudAssertBilling Database to see if the new Usage Records come in:
11. If the Pricing Profile is configured is configured appropriately, then Usage will show up in Admin Portal in around 10 mins (once the scheduled Aggregators run in Agent Service).