Community

Get real-time billing insights from your Bluemix account

Share this post:

I’m a Cloud technical sales in SPGI and so I meet current and future Bluemix customers regularly. One of the main questions that usually comes to the forefront during these meetings is how to organize and administrate their BX accounts. Besides, they don’t have a clear process to do the mapping between their company structure and Bluemix Account Hierarchy.

Bluemix Administration

In case you are not familiar with Bluemix administration, let me introduce its components first. A BX account has a two level hierarchy: organizations and spaces. Organizations are divided into spaces and each of these spaces puts a group of services and applications together.

You can get an overview of Bluemix administration at https://myadmin.mybluemix.net

 

Bluemix Account Hierarchy

Bluemix Console: Current Situation

Here is when the customer questions come up since organizations and spaces don’t have the same administration possibilities and there are also different user roles for each level of hierarchy. Throughout this article, I would like to address one of the most frequent questions:

‘I need to manage how my teams use Bluemix and I have already defined one space for each of my team’s projects, so How can I get the billing information by space?’

Today the Bluemix console only shows applications and service usage by organizations. That’s why I decided to create “My Billing App” based on the following customers’ requirements:

  • Users needs to check services and applications costs by spaces and not only by organizations
  • They want to export usage information and share it with other teams of their companies
  • They also need to do a quick usage comparison among spaces using a chart

Technologies

I developed ‘My Billing’ app server-side using NodeJS technology and AngularJS, Bootstrap and ChartJS in the client-side. In order to get the authorization token and the billing information I used the CF REST APIs that also bring users great possibilities of creating customized consoles and processes for Bluemix administration.

Capabilities

As I mentioned before I have developed ‘My Billing’ app based on customer requirements and it has the following capabilities:

  • The application is accessible for IBM and NON IBM users.

Non IBMers login form

To get the authorization token for NON IBM users I send the username and password to the UAA server. (https://api.<region>.bluemix.net/oauth/token)

IBMers login form

To get the authorization token for IBMers I send the IBM SSO passcode to the UAA server. (https://api.<region>.bluemix.net/oauth/token)

  • Users can check monthly applications and services usage for each space within an organization

  • It shows information about which services and applications have been deployed in every space and their usage.

To get the billing information I used the following API https://rated-usage.<regionID>.bluemix.net/v2/metering/organizations/<region>:<orgUID>/usage/yyyy-mm

  • Monthly usage comparison data is displayed in a single chart
  • Data can be exported to a CSV or EXCEL file

Access and Download My Billing App

I have deployed ‘My Billing’ app in Bluemix and it is available here.

In case you want to deploy your own instance of ‘My Billing app’,  you can download or fork the project from GitHub.

IBM Cloud IT Specialist

More Community stories

Announcing Data Virtualization (Federation) for Db2 on Cloud

IBM is happy to announce Db2 Data Virtualization features for Db2 on Cloud. Sometimes called “federation”, this feature lets our customers access data from multiple different databases with a single query. With this latest addition, users will now be able to access data that is located on any of their Db2 or Informix data sources including both cloud and on premises system. This functionality is supported on all versions of Db2 on Cloud, except for the free Lite plan (However, users can use the Lite plan as a target that you can pull data from).

Continue reading

IBM Content Delivery Network improves user experience worldwide

This blog shows how much the IBM Content Delivery Network (CDN) can improve the performance of your cloud applications, globally. We tested some specific use cases, and we wanted to share what we learned!

Continue reading

Now available: Veeam on IBM Cloud price reductions + new licensing options + free trial

We are excited to announce that we have reduced the price of our existing Veeam Availability Suite Enterprise Plus and Veeam Physical Agent solutions, as well as launched a new Veeam License, Veeam Backup and Replication. The new prices and options are now available in our IBM Cloud Portal: Veeam Availability Suite Enterprise Plus for […]

Continue reading