Note: This article updated on August 30, 2017, to add some billing monitoring information.
I have spent the summer working with a number of different Bluemix and Watson customers, and one question seems to come up quite frequently. It has a lot of variations, but it all boils down to this:
“How much of the Bluemix and Watson services am I using, and how can I monitor this?”
This is pretty simple to do, and you can even automate it yourself. So it’s worthy of a quick blog post. First let’s start with the interactive monitoring of your usage.
Checking Bluemix Usage
First you’ll need to log into the Bluemix platform, using your IBM ID. When the main screen comes up, you’ll see account option up in the upper right of your browser. Click on “Manage”, and your options will look like this:
If you then select “Billing and Usage”, and then select “Billing”, you will be taken to a screen that will show the current status of your Bluemix subscription (if you have one). It will show how much you have already consumed, as well as how much of your subscription remains. It should look like this:
You can scroll down through this report to see more details. You can use this same method and select “Usage” instead of “Billing”, and you can see your current months usage and to see the specific usage on any of the available Bluemix services. There are other things that you may be interested in as well. Check out the Bluemix Docs on Viewing your Usage for more information.
Notification on Your Usage
Bluemix also gives customers with a Bluemix subscription the option of email notifications when their usage hits certain levels. This is all explained in the online help for setting spending notifications. While in your Bluemix browser console, select Manage > Account > Notifications > Spending. You will see something like the screen shown below:
In this screen you can set thresholds for spending. You will receive notifications when you reach 80%, 90%, and 100% of the spending thresholds that you specify. Also keep in mind that you can change each spending notification at any time as your needs change.
While you are here, you should also make sure that you set the notification preferences for setting platform notifications. This will set email notifications for Bluemix incidents and planned maintenance. From the console menu bar, click Manage > Account > Notifications > Platform Notifications to see and update these notifications.
Automating the Process
You can also see usage (although not billing) information by using the Bluemix CLI (Command Line Interface). The two commands that you will be most interested in are “bx billing account-usage” and “bx billing orgs-usage-summary”. A small GitHub project with a command line tool which will dump your account information (using those commands) is called bmxusagetracking. Go out there and grab the code – and then modify it to suit your own needs. The script is simple – it should take no more than 5 minutes to grab it and understand what it is doing and how it is doing it.
I am also looking at creating a Python version of this in the same project area – since I know that some of you would rather do this in Python – so you can manipulate the returned data and make it more useful. I invite anyone who wants to contribute to the project and improve it, to do so.