Cumulocity IoT Usage Statistics Application - Major Update!

Introduction

About a year ago, we released the Usage Statistics Application as part of the Blueprints functionality offered in Cumulocity IoT. You can quickly download and install this application to get a per-tenant view of your usage consumption, including billable metrics such as Device Classes.

We are very excited to introduce the next version of the Usage Statistics Application that incorporates your feedback. We heard your comments - aggregating metrics across tenants and having a month-to-day view of your consumption are important features. So, we’ve built a microservice to support exactly that!

Wherever you deploy the microservice, be it on a parent tenant or the management tenant, it will find all subtenants and aggregate metrics across all of those tenants. If you do not deploy the microservice, the Usage Statistics App will continue to display per-tenant data.

The microservice is available to you at no additional charge. :smiley:

Disclaimer
The Usage Statistics Application should be used for indicative purposes only. The metrics can be different from billing metrics due to various reasons, the largest of which being if tenants are deleted.

Application Highlights

With the microservice running, the Usage Statistics Application has the following features:

  1. Monthly Snapshot - displays a summary of the metrics across all tenants for both the previous month and the current month (to-date).
  2. Device Statistics - provides you with the per-tenant or aggregated Device Class information
  3. Microservice Statistics - shows the per-tenant or aggregated resources used for each deployed custom microservice
  4. Tenant Statistics - displays all other metrics relating to tenant consumption for each tenant or aggregated

The user can select a month and a tenant to view or choose to view the aggregated statistics across all available tenants.

Installation Guide

The microservice and webapp are available on Cumulocity’s public GitHub repo. Make sure to download the latest version.

On Cumulocity environment [RECOMMENDED]

If you are on a Cumulocity environment that is connected to Cumulocity’s central GitHub repository (e.g. public cloud deployments), you can deploy the Usage Statistics Application directly from the Administration Application:

  1. Navigate to the Administration Application
  2. In the left rail, select Ecosystem → Extensions
  3. Find and select the Usage Statistics Application blueprint
  4. Review the package overview and hit Deploy Application
  5. Your tenant will now have the Usage Statistics Application (but not the backend)

You will still need to download and install the microservice separately. Once you have downloaded it from the link above (e.g. metrics-aggregator-1.1.14), follow these steps:
Once you have both downloaded:

  1. On your parent or management tenant, navigate to the Administration Application
  2. Return to the Administration Application, and select Ecosystem → Microservices
  3. HIt Add microservice, drag in the ZIP file for the microservice (e.g. metrics-aggregator-1.1.14), and go through the prompt. The microservice is now on your tenant!

Note: Please do not deploy metrics-aggregator in a basic tenant without subtenants, it will serve no purpose. You can use the statistics app on basic tenants without the microservice. Hence not necessary there will be no aggregation option.

On private instance

If you are not on an instance that is connected to Cumulocity’s central GitHub repository, you will need to install the extension. At the link above, download the ZIP file for the extension (e.g. usage-statistics-app-1.1.14). Then follow these steps:

  1. In the left rail, select Ecosystem → Extensions
  2. In the top right, hit Add extension package
  3. Drag in ZIP file for the Application (e.g. usage-statistics-app-1.1.14.zip) and hit “Done” when it is finished uploading.
  4. Find the Usage Statistics extension in the list of Extensions and click on it.
  5. Hit the Deploy Application button and go through the prompt. Once you hit Deploy, the Application will be added to your tenant
  6. You should find the Usage Statistics Application available in your app switcher within Cumulocity

Note: On first load, it may take a few seconds until the data is available. The microservice is running through all subtenants and calculating the metrics. It shouldn’t take too long, and once this initial calculation is done, the data will be cached for you to return to later! Also make sure that users that will be using the app have the following roles assigned:

ROLE_TENANT_STATISTICS_READ
ROLE_TENANT_MANAGEMENT_READ

Screenshots

Monthly Snapshot

Device Data (Per-Tenant)

Device Aggregation

Microservice Aggregation

Tenant Data

Feedback

If you have ideas on how to improve the Usage Statistics Application or backend microservice, please create an issue or idea on the GitHub repo repo. It is maintained by Marco Stoffel as the primary architect behind the current version of the Usage Statistics App and it is thanks to him that we have such a great update!

Legal Notice

The Usage Statistics Application is provided as-is and is without warranty or support. It does not constitute part of the Cumulocity product suite.

8 Likes