Up:: Microsoft Azure Developer Associate AZ-204 2023

Azure Monitor

Azure Monitor

  • 09:38:53 Introduction
    • Pillars of Observability
      • Ability to measure and understand how internal system work in order to answer questions regarding performance, torelance, security and faults with a system/application.
      • To obtain observability you need to use Metrics, Logs and Traces.
      • You have to use them together, using them in isolation does not gain you observability.
        • Metrics - a number that is measured over a period of time
        • Logs - text file where each line contains event data about what happened at a certain time.
        • Traces - a history of request as it travels through multiple apps/service so we can pinpoint performance or failure
    • Anatomy of Azure Monitor
      • sources of common monitoring data
    • Sources Application
    • Sources Operating System
    • Sources Azure Resources
    • Sources Azure Subscription
      • Telemetry related to the health and operation of your azure subscription.
    • Sources Azure Tenant
    • Sources Custom Sources
      • You may need to monitor other resources that have telemetry that can’t be collected with other data sources. For these resources, write this data to either Metrics or Logs using an Azure Monitor API
    • Data Stores
      • Two fundamental types of data from sources
        • Logs and Metrics
      • Azure Monitor Logs
        • Collects and organizes log and performance data from monitored resources
        • data logs are consolidated from different sources into workspaces
          • platform logs from Azure Services
          • log and performance data from VM agents
          • usage and performance data from applications can be consolidated
          • In a workspace so they can be analyzed together using a sophisticated query language capable of analyzing millions of records
        • Work with log queries and their results interactively using Log Analytics
      • Azure Monitor Metrics
        • collects numeric data from monitored resources into a time series database
        • Metrics are numerical values collected at regular intervals to describe some aspect of the system at a certain point in time
        • lightweight and capable of supporting near real-time scenarios, useful for alerts or fast detection of issues.
        • Can be analyzed interactively using Metrics Explorer
    • Log Analytics Workspaces
      • a unique environment for Azure Monitor log data
      • Each workspace has its own data repository and configuration, and data sources and solutions are configured to store its data in a particular workspace
      • Good habit to get into
    • Log Analytics
      • A tool in the Azure portal used to edit and run log queries with data in Azure Monitor Logs
      • Log Analytics uses a query language call KQL
    • Kusto
      • Azure Monitor Logs is based on Azure Data Explorer and log queries are written using the same Kusto Query Language (KQL)
      • KQL can be used in
        • Log Analytics
        • Log alert rules
        • Workbooks
        • Azure Dashboards
        • Logic Apps
        • PowerShell
        • Azure Monitor Logs API
      • Kusto is based on relational database management systems, and supports entities such as databases, tables and columns.
        • Some query operators include
          • calculated columns
          • searching and filtering on rows
          • group by-aggregates
          • join functions
      • Kusto queries execute in the context of some Kusto database that is attached to a Kusto cluster
    • Kusto Entities
      • Kusto in generally composed of the following entities: Clusters, Databases, Tables, Columns, Stored Functions
    • Scalar Data Types
    • Control Commands
      • Can modify data and metadata and has its own syntax different from KQL
      • a dot followed by the command .create or .add or .show
      • very common control command is .show
    • Functions
      • **Stored Functions** - which are user defined functions that are stored and managed a one kind of a databases schema entities
        • Scalar functions (input scalar datatypes, output scalar datatypes)
        • Tabular functions (input tabular data, outputs tabular data)
      • Query-defined functions - user defined functions that are defined and used within the scope of a single query
      • Built-in functions - which are hard-coded (defined by Kusto and cannot be modified by users)
        • Special functions select Kusto entities eg cluster()
        • Aggregation functions - performs a calculation on a set of values and returns a single value eg count()
        • Windows functions operates on multiple rows in a row set at a time eg row_number()
    • Scalar Operators
    • Tabular Operators
    • Metrics Explorer
      • sub service of Azure Monitor that allows you to plot charts, visualize correlating trends and investigate spikes and dips in metrics values
    • Azure Alerts
      • notify you when issues are found with your infrastructure or application
      • allows you to identify and address issue before the users of your system notice them
      • 3 kinds of Alerts
        • Metric Alerts
        • Log Alerts
        • Activity Log Alerts
      • When an Alert is triggered you can be notified and / or have it take action
    • Azure Dashboards
      • Virtual workspaces to quickly launch tasks for day-to-day operations and monitor resources
      • Build custom dashboards based on projects, task or user roles
    • Azure Workbooks
      • provides a flexible canvas for data analysis and the creation of rich visual report within the Azure portal
      • Allows you to tap into multiple data sources from across Azure and combine them into unified interactive experiences
  • 10:07:36 Azure Monitor Cheatsheet

Additional Metadata