← Back to all products

Azure Cost Guardian Toolkit

$59

Comprehensive Azure cost management toolkit covering the entire data platform. 50+ API queries, anomaly detection, RI calculator, and FinOps playbook.

📁 15 files🏷 v1.0.0
PythonJSONMarkdownTerraformAzureDatabricks

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 15 files

azure-cost-guardian/ ├── README.md ├── guides/ │ └── finops_playbook.md ├── notebooks/ │ ├── cost_anomaly_detection.py │ └── reserved_instance_calculator.py ├── policies/ │ ├── budget_alerts.json │ └── tagging_enforcement.json ├── queries/ │ └── cost_management_queries.py ├── scripts/ │ ├── advisor_automation.py │ ├── idle_resource_detector.py │ └── storage_lifecycle_manager.py ├── templates/ │ ├── chargeback_report.md │ └── monthly_finops_review.md └── terraform/ └── cost-management/ ├── main.tf └── variables.tf

📖 Documentation Preview README excerpt

Azure Cost Guardian Toolkit

By [Datanest Digital](https://datanest.dev) | Version 1.0.0 | $59


Overview

The Azure Cost Guardian Toolkit is a comprehensive, production-ready collection of scripts,

queries, policies, notebooks, and templates designed to give engineering and FinOps teams

complete visibility and control over Azure cloud spend.

Whether you are a platform engineer implementing cost guardrails, a FinOps practitioner

building chargeback models, or a team lead trying to eliminate waste, this toolkit provides

the building blocks to operationalize cloud cost management from day one.

What's Included

ComponentDescription
Cost Management Queries50+ Python functions wrapping Azure Cost Management APIs for programmatic spend analysis
Budget Alert PoliciesReady-to-deploy budget alert configurations at subscription, resource group, and tag levels
Tagging Enforcement PoliciesAzure Policy definitions to enforce consistent resource tagging across your organization
Cost Anomaly Detection NotebookDatabricks notebook for daily cost anomaly detection with configurable alerting thresholds
Reserved Instance CalculatorDatabricks notebook for RI sizing analysis and break-even calculations
Idle Resource DetectorScript to find and report unused disks, unattached NICs, stopped VMs, and other waste
Storage Lifecycle ManagerAutomated storage tier management (hot -> cool -> archive) based on access patterns
Advisor AutomationScript to fetch, filter, and act on Azure Advisor cost recommendations
Terraform ModulesInfrastructure-as-code for budget alerts, action groups, and cost management resources
FinOps Review TemplatesMonthly executive review and chargeback/showback report templates
FinOps PlaybookComprehensive guide covering crawl-walk-run FinOps adoption

Prerequisites

  • Python 3.9+
  • Azure SDK for Python (azure-mgmt-costmanagement, azure-mgmt-consumption, azure-identity)
  • Terraform 1.5+ (for infrastructure modules)
  • Databricks Runtime 13.x+ (for notebooks)
  • Azure subscription with Cost Management Reader (minimum) role

Quick Start

1. Install Dependencies


pip install azure-identity azure-mgmt-costmanagement azure-mgmt-consumption \
    azure-mgmt-resource azure-mgmt-compute azure-mgmt-network azure-mgmt-storage \
    azure-mgmt-advisor azure-mgmt-monitor pandas numpy scipy requests

2. Authenticate


from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()

3. Run Your First Query



*... continues with setup instructions, usage examples, and more.*

📄 Code Sample .py preview

notebooks/cost_anomaly_detection.py # Databricks notebook source # MAGIC %md # MAGIC # Cost Anomaly Detection # MAGIC # MAGIC **Azure Cost Guardian Toolkit** by [Datanest Digital](https://datanest.dev) # MAGIC # MAGIC This notebook performs daily cost anomaly detection using statistical methods # MAGIC (Z-score and rolling averages). It queries Azure Cost Management APIs, identifies # MAGIC anomalous spending patterns, and sends alerts via webhook or email. # MAGIC # MAGIC **Schedule:** Run daily via Databricks Jobs (recommended: 08:00 UTC). # COMMAND ---------- # MAGIC %pip install azure-identity azure-mgmt-costmanagement requests # COMMAND ---------- from __future__ import annotations import json import logging from dataclasses import dataclass, field, asdict from datetime import datetime, timedelta from typing import Any, Optional import numpy as np import pandas as pd import requests from scipy import stats from azure.identity import DefaultAzureCredential from azure.mgmt.costmanagement import CostManagementClient from azure.mgmt.costmanagement.models import ( QueryAggregation, QueryDataset, QueryDefinition, QueryTimePeriod, ) logging.basicConfig(level=logging.INFO) logger = logging.getLogger("cost_anomaly_detection") # COMMAND ---------- # MAGIC %md # MAGIC ## Configuration # COMMAND ---------- # ... 550 more lines ...
Buy Now — $59 Back to Products