Azure Cost Monitor: Daily Spending Reports – a first résumé

A couple of days ago, on January 17th, the new Daily Spending Report Feature of the Azure Cost Monitor went live.

We are very pleased that the reports were adopted so well. We got some nice feedback from our users appreciating the new functionality.

spending-report-demo

This feature has been build to reflect what our users told us they need – a simple way of tracking all Azure cloud costs on a daily basis and transparency for every stakeholder in the company.

The daily spending reports make it easy for the Operations Department to track the cloud spendings and react upon this data immediately.

Controllers of the Finance Department need to understand what the company is spending throughout the month. Azure Cost Monitor reports give them a convenient way to have a good overview on a daily basis.

Managers always need to be aware about the most important KPIs within the company. The new daily spending reports of the Azure Cost Monitor give them the freedom to always have a quick and precise overview on the company’s cloud spendings.

Whenever you’ve got any questions, wishes or further ideas please don’t hesitate and let us know by leaving a message or request them in our feedback portal.

Stay up to date – Azure Cost Monitor starts sending daily spending reports via mail

The azure cost monitor team is pleased to announce the launch of the daily spending mail reports starting January 17th. This great feature has been crafted to reflect what our users told us they need and it also builds upon new technology capable of addressing future needs:

spending-report-demo

The report will be send once a day, at about 03:00 AM CET. If – for any reason – you do not wish to get the daily reports, it’s of course possible to disable the reports in the new notifications section of the Azure Cost Monitor portal:

notifications

We hope this feature brings more transparency in your Azure Cloud Spendings and makes it much easier for you to manage and control all costs.
Any questions, wishes or ideas? Try our feedback portal or drop a mail to tickets@azurecostmonitor.uservoice.com.

Cache Fighters Part 3 – A real life example combined with grunt-ng-constant

In the last two parts of this article series, the caching behaviour of AngularJS applications was described and a solution for all issues in a typical app was delivered.
The last part now is focussed on developing a real life example which demonstrates the authors favourite solution.

When following this tutorial Yeoman should be installed on the machine. In addition the angular generator of Yeoman is required.

Generate a simple application
Yeoman initially generates a skeleton of a AngularJS application. Firing the following command starts the generation process:

yo angular testapp

All this should be done in a directory called testapp because Yeoman is not generating a subdirectory automatically. During the process Yeoman asks some details which need to be answered as follows:

yeoman-answers

Integrate ngHelperDynamicTemplateLoader
The dynamic template loader is the base component in AngularJS applications to handle the caching issues for views and partials. It can be installed with the following command line:

bower install ng-helper-dynamic-template-loader –save

After that the http request interceptors need to be registered which can be done by adding the following lines in the configuration section of the application, typically implemented in the app.js file:

'use strict';

angular
  .module('testappApp', [
    'ngAnimate',
    'ngCookies',
    'ngResource',
    'ngRoute',
    'ngSanitize',
    'ngTouch',
    'ngHelperDynamicTemplateLoader'
  ])
  .config(function ($routeProvider, $dynamicTemplateLoaderProvider) {

    $dynamicTemplateLoaderProvider.registerInterceptors();

    $routeProvider
      .when('/', {
        templateUrl: 'views/main.html',
        controller: 'MainCtrl'
      })
      .when('/about', {
        templateUrl: 'views/about.html',
        controller: 'AboutCtrl'
      })
      .otherwise({
        redirectTo: '/'
      });
  });

Generate a deployment UUID
The custom caching strategy will be based on a deployment UUID. Whenever the deployment UUID is changed, the system will change the URI for the views & partials. There are two additional modules which are required. grunt-ng-constant is responsible for generating an individual build-related configuration file. The node-uuid module is able to generate a new deployment UUID whenever it is required. The modules can be installed via npm as follows:

npm install grunt-ng-constant –save-dev
npm install node-uuid –save-dev

After that a new grunt task is available and the following grunt configuration needs to be generated in the configuration file. The config section is building an app-env.js file during every build which contains the needed deployment UUID:

ngconstant: {
  options: {
    dest: '<%= yeoman.app %>/scripts/app-env.js',
    wrap: '"use strict";\n\n {%= __ngModule %}',
    name: 'app.env'
  },
  dist: {
    constants: {
      envDeployment: {
        deploymentUUID: uuid.v4()
      }
    }
  },
  serve: {
    constants: {
      envDeployment: {
        deploymentUUID: uuid.v4()
      }
    }
  }

}

Don’t forget to require the uuid module somewhere at the start of the existing grunt file:

var uuid = require('node-uuid');

Last but not least the grunt-ng-constant task needs to be added in the build-, test- and serve-tasks to ensure that a config file is generated:

grunt.registerTask('build', [
  'clean:dist',
  'ngconstant:dist',
grunt.task.run([
  'clean:server',
  'ngconstant:serve',

grunt.registerTask('test', [
  'clean:server',
  'ngconstant:serve',

When executing the configuration a module which is called “app.env” is generated and needs to be added in the dependency list of the AngularJS application:

angular
  .module('testappApp', [
    'app.env',

Additionally the “app-env.js” needs to be registered in the index.html so that it will be loaded during application start:

<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app-env.js"></script>

Build a custom caching strategy
Everything is settled for the deploymentUUID based caching strategy. In the ngHelperDynamicTemplateLoader every caching strategy is implemented as a specific service.

yo angular:service CustomTemplateCaching

The following service should be added to the application to ensure that the generated deploymentUUID is used:

‘use strict’;

angular.module(‘testappApp’).service(‘CustomTemplateCaching’, [‘envDeployment’, function(envDeployment) {
var self = this;
self.processRequest = function(requestConfig) {
if (requestConfig.url.indexOf(‘?’) === -1) {
requestConfig.url = requestConfig.url + ‘?v=’ + envDeployment.deploymentUUID;
} else {
requestConfig.url = requestConfig.url + ‘&v=’ + envDeployment.deploymentUUID;
}
return requestConfig;
}
}]);

The service can be assigned to the template loader as a caching strategy in the run region of the application

.run([ '$dynamicTemplateLoader', 'CustomTemplateCaching', function($dynamicTemplateLoader, CustomTemplateCaching) {
  $dynamicTemplateLoader.setCachingStrategyService(CustomTemplateCaching);
}]);

Finally after starting the application with the command:

grunt serve

the browser will load all of the templates with a special version parameter in the url. The version parameter contains the deploymentUUID which means the system is using the cache as long as nothing has changed but after an update the system is using a new uncached version of the views.

caching

The illustrated caching provider can be improved when using a grunt task which is building hash keys for every HTML file. The hash keys can then be used in the request so that HTML files would be reloaded from the server when the specific view has changed which is a more granularly approach.

The solution stays with the eager loading approach of views & partials which works good in bigger applications. For smaller and midsize applications compiling everything in a single javascript file feels ok as well.

This article should help to solve the views and partial caching issues in all AngularJS applications. The described approach is successfully used in production applications, e.g. Azure Cost Monitor over the last weeks. The sample application developed in this article can be found here.

Understand your service types in the Azure Cost Monitor

The Azure Cost Monitor is able to analyse and manage every existing Azure service. In the past sometimes the different service types could have become unclear, especially for people with big subscriptions and a lot of services. This was because the Azure Cost Monitor was only using an icon to explain the service type:

nontooltip

Starting today the Azure Cost Monitor also offers a tool tip with a clear explanation of the the service type, whenever a user moves the mouse over the icon. It also works on tablets or smartphones, whenever users touch the icon on a specific service.

tooltip

This little feature should really help to reduce service type confusion in the Microsoft Azure Cloud.

Website Launch Announcement: azure cost monitor launches new site

The azure cost monitor team is pleased to announce the launch of their newly designed Web site, which goes live today, and is located at the same address: https://costs.azurewebsites.net.

It has been crafted to reflect what our users told us they need and it also builds upon new technology capable of addressing future needs. The azure cost monitor now enables our users to analyse and manage their Microsoft Azure Costs even more intuitively:

More modern and user-friendly design
The new site design, aside from being aesthetically pleasing, is more agile, interactive, and is easier to scan, read and navigate.
It is now using a responsive design, which means that you’ll see essentially the same design optimized for your smart phone, tablet and desktop.

Azure Cost Monitor

Improved and re-designed landing page
We know that landing pages are very important so we have decided to totally re-design and re-organise ours. Our new landing page now displays all important information like features, screenshots, a contact form and log-in possibilities.

Azure Cost Monitor Landing Page

 

We hope you will visit the new website at https://costs.azurewebsites.net and acquaint yourself with the new design. And while you’re there, don’t hesitate and let us know what you think by leaving a message. In the coming months, we hope to continue improving the site, so that it best serves all of your Azure cloud cost monitoring needs.

Azure Cost Monitor: X-Mas Update

The time around christmas gave us the time to fix a couple of small issues which are annoying but not critical in the day by day business. With this article I would like to highlight the small but important changes in the Azure Cost Monitor:

HTTPs enforced
The Azure Cost Monitor is now available via https only. Every access to the http url will be redirected to the secure endpoint. This should prevent accidental unsafe usage of sensitive data via http.

No more hashbangs
In the past the Azure Cost Monitor used URLs with hashbangs in it,  which are unreadable and not easy to remember. As the hashbangs aren’t used in the urls anymore, please update your bookmarks.

Remove Contracts
Are you a customer with multiple EA contracts or a service provider who is working for several EA customers? If so, this feature is for you. Users with multiple contracts now can see a little trash icon in the contract dropdown, which allows to remove a non-active contract from the system. This should give everybody the option to stay clean with his data.

Daily Sync
The Azure Cost Monitor now syncs the data of the current month automatically every night. As soon as a new contract comes into the system, also the existing historic data will be synced. So the manually triggered action for data sync isn’t needed anymore and it will be removed in the next weeks.

Last Sync Time
The last sync time for every month is now visible in the report sheet. This should give everybody more transparency and control about the automated processes in the backend. Whenever you recognize a last sync time higher than 24 hours, please open a ticket.

Screen Shot 2014-12-29 at 10.39.20

We hope these little improvements will help everybody to get a much better experience with the Azure Cost Monitor. If you have any other wishes, feel free to request them in our feedback portal.

Clear cost control based on service types

The Microsoft Azure Cloud offers many different resources, e.g. virtual machines, cloud services or websites. Some of these resources produce comprehensible costs e.g. virtual machines, but some resources produce costs that are indirect and hard to analyse, like costs for “Data Traffic”, “Visual Studio Online” or “Data Management”.

Screen Shot 2014-12-06 at 12.11.51

To solve this problem and facilitate the cost control, all service types are now visible in the Azure Cost Monitor. The new category for grouping this service types helps to identify the cost drivers in different subscriptions and projects.

Azure Cost management with resource tagging

Starting with Microsoft Azure teams or small departments often begin with one subscription. When time goes by the subscription contains more and more resources without a simple option to migrate them into new project specific subscriptions. Managing costs for this kind of subscription is not easy. Because of that the Azure Cost Monitor now offers a new feature which should really help to stay in control.

The new “Cost Tags” feature is an easy and comfortable way to categorize services. These tags can easily be used to visualize costs per responsible person, department, project or cost center. This allows cost management on a very granular level and aligned to the individual existing organisational structure.

The following screenshots show some best practices:

ScreenProjects
Categorize your services by project groups that are responsible for the costs

ScreenTypes
Categorize your services by resource type, e.g. storage or compute

This should really help to bring more control and transparancy into the Azure EA agreement. If you see any other requirements or needs feel free to drop the idea in our feedback portal.

BTW: As soon as Microsoft Azure delivers the new Azure resource tagging we will allow to mix up our custom tags and the Azure resource tags. There will be no need to do something manually from your side.

Azure Enterprise Agreement: Freedom & cost control

Microsoft offers a very lucrative deal for Azure customers: When your company is willing to do an upfront investment it’s possible to get an enterprise agreement. Besides dramatical price reduction this agreement gives your engineers the freedom to consume azure services as much as they need, the operations team is able to assign subscriptions for every team and your company gets an invoice that is compliant to local financial regulations.

But what about your financial controllers? How can they keep track of the costs to ensure that the the limits are not exceeded?

Here are some best practices that Microsoft offers to partly achieve this:

  1. Check your EA reports on a weekly basis
    Microsoft delivers weekly consumption report that need to be checked on a regular basis. A second important source is the monthly delivered summary e-mail about the monetary commitment balance.
  2. Assign your teams, business units or projects to different subscriptions
    Microsoft allows to create as many subscriptions as needed, this means it’s possible to give every team or project a separate subscription payed from the enterprise agreement. By that access rights and roles can be modelled.

After working with these two options I recognised that not all of my requirements to manage our costs efficiently were totally fulfilled:

  1. Multiple usage of the same service should be cumulated in one report entry.
  2. Analysing costs on subscription level without using a complex pivot table.
  3. Tagging different resources helps to manage multiple projects in a subscription.
  4. Cost-Prediction based on the data of the past months.
  5. Cost-Alerts when specific limits are exceed for enabled EA customers.

So I decided to build a little service based on the Azure platform, called Azure Cost Monitor:

The service is able to process the CSV files from the EA portal and gives a graphical overview including subscription drill down. It is based on modern cloud technologies exclusively e.g. Azure Table Store, Azure WebSites and Azure WebJobs. That’s why the Azure Cost Monitor scales as good as Azure scales and I would like to invite all of you to join this service (https://costs.azurewebsites.net).

login

Login with your existing Azure Account or LiveId. After that enter your EA number to start analysing your data. An useful report about the cost consumption of your subscriptions will be shown. If you don’t want to enter your personal data right now, feel free to check the demo mode by adding the demo EA number:

Screen Shot 2014-10-18 at 21.44.52

I would like to extend this service aligned to the requirements you bring from the field, so please visit the feedback portal of the Azure Cost Monitor and enter your ideas or vote and comment for existing ones.