Azure Usage and Cost Tracker

Sample Azure Native Serverless Cloud Solution, Usage and Cost tracker using Azure Durable Functions(Powershell), Azure Storage, Sendgrid(Email)

Azure Native Usage & Cost Tracking

ScreenShots:

Azure Portal Dashboard:

A Dashboard that You can Extend & Customize

Dashboard

Sample Daily Email Report:

Get a glance of your last 7 days - Daily! not much later. Detect Cost Spikes Sooner

Azure-Cost-Report-Sample

Powered by Serverless Azure Durable Functions for PowerShell

Fully Powered by Azure Native Technologies

AzureDurableFunctions

Better Blob Exports (both JSON & CSV) formats

Blobs are placed in logical YYYY/MM/ path structure with Day.ext format file names, easy to locate and run further ETLs.

DailyBlobExports

Azure Storage Table for Long Term Retention

Records will also be stored in a storage table for curating Daily Reports that covers last 7 days. In order to not hit limits of Azure Billing API, I only extract 1 or 2 days worth of data at a time and use table for retro lookups.

AzureStorageTableLongTerm

Your Data Your Rules, Logs are also Pushed to a Log Analytics Workspace

This is the data backend for the Azure Portal Dashboard Charts. However, once your logs are here possibilities are endless.

AzureLogAnalyticsShortTermAnalytics

You can create Azure Workbooks, Azure Monitor Alerts or just run your custom queries to deep dive into your Azure usage data.

AzureLogAnalyticsShortTermAnalyticsCustomQueries

Project Naming Legend

Project Details
Project Name: Mert Senel Tech Azure Usage Export
Project ShortCode: mstaue

EnvironmentsCode
Developmentdev
Testtst
Stagingstg
Productionprd
Azure ResourcesCode
Function Appfnc
Storage Accountstr
Application Insightsais
Log Analytics Workspaceoms
Azure Portal Dashboarddsh
Azure Sendgridsgd
Project ResourcesName
App Service Plan (Consumption/Serverless){projCode}{env}asp
Function App{projCode}{env}fnc
Function App Storage{projCode}{env}fncstr
Azure Usage Exports Storage{projCode}{env}str
Application Insights{projCode}{env}ais
Log Analytics Workspace{projCode}{env}oms
Azure Usage & Cost Monitoring Dashboard{projCode}{env}dsh
Azure Sendgrid{projCode}{env}sgd

Resources Generated Example: AzureResources

Mert Senel
Mert Senel
Principal Cloud DevOps Engineer - Microsoft Certified Azure Solutions Architect, Azure Administrator & DevOps Expert

Related