Skip to content

Azure-native cloud monitoring and observability stack, with IaC deployment, Application Insights, Log Analytics, custom workbooks, and proactive cost alerts.

License

Notifications You must be signed in to change notification settings

nenad0707/CloudMonitorSuite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌩️ CloudMonitorSuite - Azure Monitoring Solution for MovieCraft

Azure KQL Bicep AppInsights Build Status

CloudMonitorSuite is a cloud monitoring and observability platform built for tracking, analyzing, and troubleshooting the behavior of cloud-based applications like MovieCraft. This solution leverages Azure Application Insights, Log Analytics, Azure Workbooks, and Kusto Query Language (KQL) to provide real-time telemetry, performance monitoring, and diagnostics capabilities.

πŸ” Live Monitoring Dashboard & Application

CloudMonitor Dashboard MovieCraft App

⚠️ Note: Azure portal access with appropriate permissions required to view the live monitoring dashboard. The MovieCraft application is the target system being monitored by CloudMonitorSuite.


πŸ“– Table of Contents


πŸ“š Project Overview

CloudMonitorSuite is a fully automated Azure monitoring solution that tracks key metrics and behaviors for cloud applications. It was primarily designed to monitor the MovieCraft application - a Blazor Hosted web application hosted externally on SmarterASP.NET. The suite ingests telemetry via Application Insights SDK, allowing centralized observability over API performance, SQL dependencies, failed requests, and application exceptions.

This project demonstrates cloud-first observability strategies and provides a foundation for implementing Site Reliability Engineering (SRE) practices in modern application environments. With CloudMonitorSuite, teams can establish comprehensive monitoring of distributed systems without modifying application code beyond initial instrumentation.


✨ Key Capabilities

  • πŸ” Application Performance Monitoring
    • Real-time metrics on request volumes, response times, and error rates
    • Automatic dependency tracking for SQL, HTTP, and external service calls
  • πŸ“Š Analytics & Visualization
    • Custom workbooks for powerful data visualization and sharing
    • Application map for service dependency visualization
  • 🚨 Proactive Alerting
    • Smart Detection of anomalies in request patterns
    • Configurable alert thresholds for critical metrics
  • πŸ“ Log Analytics & Query
    • Centralized log storage with powerful KQL query capabilities
    • Pre-built query library for common monitoring scenarios
  • πŸ›‘οΈ Cost Management
    • Free tier optimization to minimize cloud expenses
    • Budget alerts to prevent unexpected costs

πŸ› οΈ Tech Stack & Tools

Monitoring Infrastructure

  • Azure Application Insights: Telemetry collection and real-time metrics
  • Azure Log Analytics: Centralized log storage and advanced querying
  • Azure Workbooks: Interactive dashboards and visualization
  • Kusto Query Language (KQL): SQL-like query language for logs and metrics

Infrastructure & Deployment

  • Azure Bicep: Infrastructure-as-Code for automated deployments
  • Azure Pipelines: CI/CD pipeline for infrastructure deployment
  • PowerShell: Automation scripts for identity and access management, including federated credentials (create-identity.ps1) for secure CI/CD integration

Integration Targets

  • MovieCraft App: Blazor WebAssembly application with .NET backend
  • Application Insights SDK: Client libraries for telemetry collection

πŸ“Š Monitoring Architecture

CloudMonitorSuite implements a modern cloud monitoring architecture consisting of:

  • βœ… Application Insights instance (cloudMonitor-ai): Collects and analyzes telemetry from applications
  • βœ… Log Analytics Workspace (cloudMonitor-log): Centralized storage for logs and metrics
  • βœ… Smart Detection and Anomaly Rules: Automated detection of unusual patterns
  • βœ… Custom Workbooks Dashboard: Interactive visualization dashboards
  • βœ… Application Map: Visual representation of application components and their relationships
  • βœ… Linked external MovieCraft application: Source of telemetry data

CloudMonitor Architecture

The architecture follows these principles:

  1. Separation of concerns: Monitoring infrastructure is separate from application code
  2. Infrastructure as Code: All resources are defined in Bicep templates
  3. Centralized observability: Single pane of glass for application performance
  4. Cost optimization: Resources configured to use free tiers where possible

πŸ“ˆ Workbook Dashboard

CloudMonitorSuite provides a comprehensive Azure Workbook dashboard that visualizes key metrics:

Workbook Dashboard

The dashboard includes:

  • Summary Tiles: At-a-glance metrics for total requests, failures, and response times
  • Performance Charts: Detailed visualizations of requests per hour and slowest endpoints
  • Dependency Charts: Performance analysis of database calls and external API dependencies
  • Errors & Exceptions: Real-time tracking of application exceptions and warning patterns

The workbook is designed to be interactive, allowing users to filter by time range, drill down into specific metrics, and investigate issues through linked Log Analytics queries.


πŸ“Š Application Map

CloudMonitorSuite automatically generates an Application Map for visualizing the relationships between application components:

Application Map

The Application Map provides:

  • Component Visualization: Visual representation of the MovieCraft application and its dependencies
  • Health Indicators: Color-coded status indicators for each component
  • Performance Metrics: Request counts and response times for each component
  • Dependency Analysis: Clear visualization of external dependencies and their health

This visual tool helps quickly identify bottlenecks, failed dependencies, and the overall structure of the application ecosystem.


πŸ“‚ KQL Queries & Analysis

CloudMonitorSuite includes a comprehensive library of Kusto Query Language (KQL) queries for common monitoring scenarios:

// Sample: Failed Requests Analysis
requests
| where timestamp > ago(24h)
| where success == false
| summarize FailureCount=count() by operation_Name, resultCode
| order by FailureCount desc

All queries are stored in the KQL Queries folder for easy access:

  • total-requests.kql: Track overall application traffic
  • failure-rate.kql: Monitor application health and error rates
  • average-response-time.kql: Analyze application performance
  • requests-per-hour.kql: Visualize usage patterns over time
  • slowest-endpoints.kql: Identify performance bottlenecks
  • dependency-performance.kql: Monitor external service calls
  • exceptions.kql: Track application errors and exceptions
  • warning-error-logs.kql: Analyze application log patterns

These queries power the visualizations in the workbooks and can be used for ad-hoc analysis in the Azure portal.


πŸš€ Deployment & Cost Optimization

CloudMonitorSuite is designed for simple, reliable deployment with cost optimization built in:

Infrastructure as Code

All resources are defined using Azure Bicep templates, providing:

  • Consistent, repeatable deployments
  • Version-controlled infrastructure
  • Easy customization through parameters
  • Modular design for component reuse

Code Structure & Modules

The Bicep implementation follows a modular approach for better maintainability:

  • main.bicep: Entry point that coordinates all resource deployments
  • main.parameters.json: Centralized parameter configuration

Modular Components:

  • modules/appInsights.bicep: Deploys Application Insights instance with proper configuration
  • modules/logAnalytics.bicep: Creates and configures Log Analytics workspace with optimal retention settings
  • modules/budget.bicep: Sets up cost management and budget alerts with email notifications

The main template orchestrates these modules with proper dependencies (for example, Application Insights depends on Log Analytics Workspace). This architecture ensures that the monitoring solution is deployed as an integrated system while maintaining the modularity needed for easier maintenance and potential reuse.

Key outputs from the deployment include workspace IDs, and resource identifiers that can be used for connecting the MovieCraft application to the monitoring infrastructure.

This modular structure allows for independent updates and reuse of components across environments.

Automated Deployment

The solution is deployed through an Azure Pipeline defined in azure-pipelines.yml:

# Pipeline stages:
# 1. Bicep Linting - Code quality checks
# 2. What-If Analysis - Preview changes
# 3. Deploy to Azure - Create/update resources

The pipeline uses OIDC (OpenID Connect) with federated credentials established by the create-identity.ps1 script for secure, passwordless authentication to Azure resources. This modern approach eliminates the need for storing service principal secrets and provides enhanced security through short-lived tokens. The script:

  1. Creates a resource group for hosting the monitoring infrastructure
  2. Registers a new application in Azure Active Directory
  3. Creates a service principal for the application
  4. Sets up federated credentials between GitHub Actions/Azure Pipelines and Azure

Cost Management

CloudMonitorSuite is carefully optimized to minimize Azure costs:

  • Free Tier Usage: Resources configured within Azure's free tier limits
  • Data Volume Caps: Log Analytics workspace configured with daily caps
  • Retention Policies: 30-day retention policy to balance storage costs
  • Budget Alerts: Cost budget with email notifications at threshold levels

πŸ’° Cost Note: The demo deployment generates no additional Azure cost when kept within free tier limits.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE.txt file for details.


CloudMonitorSuite demonstrates practical cloud monitoring, observability, and diagnostic capabilities using Azure-native tools and infrastructure as code practices.

About

Azure-native cloud monitoring and observability stack, with IaC deployment, Application Insights, Log Analytics, custom workbooks, and proactive cost alerts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published