The Cloud Ninja Metering Block is an extensible and reusable software component designed to assist software developers with the metering of tenant resource usage in a multi-tenant solution on the Windows Azure platform.
The need to meter and monitor resource usage at the tenant level is a common requirement for multi-tenant solutions. This metering data is commonly used to enforce quotas, set pricing, understand solution cost breakdown by tenant, generate alerts, or identify tenants which may be abusing the solution. Regardless of how this data is used, a core requirement is to be able to capture and store this data in a form that it can be utilized for the purposes.Metering Block
The metering block ships as a hostable runtime component that can be deployed and hosted in an on-premise windows services, console application; or to Windows Azure either in it's own role or as part of another role for an existing solution. The metering block comes with a number of providers for collecting metering data from existing logs, and can be extended with custom providers for collecting metering data from other sources, such as custom logs, views, etc...Metering Providers
- Database Size
- Database Bandwidth
- W3C Logs (Bandwidth / Requests)
- Storage Size
- Storage Bandwidth
The Cloud Ninja metering block utilizes a storage provider implementation for writing metering data to a metering repository. The current metering block ships with an OData storage repository provider for writing the metering data to an OData service secured with HMAC authentication scheme. The solution also includes a data service project that exposes an OData metering service to the metering block and utilizes SQL Azure as the persistent store. Additional storage providers can be implemented to support peristence of metering data to other repositories.
NuGet makes is easy to install the prerequisites for the metering block. In order to build the metering block and run the OData repository and dashboard application you will need the following:
Tenant ViewPowerpivot DashboardTenant List View (Sorted by Total Weighted Usage)