%3CLINGO-SUB%20id%3D%22lingo-sub-1281379%22%20slang%3D%22en-US%22%3ETips%20%26amp%3B%20Tricks%20%231%3A%20Creating%20alerts%20for%20Azure%20SQL%20Managed%20Instance%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1281379%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-subject-wrapper%20lia-component-subject%20lia-component-message-view-widget-subject-with-options%22%3E%0A%3CDIV%20class%3D%22MessageSubject%22%3E%0A%3CP%3EAzure%20SQL%20Analytics%20collects%20and%20visualizes%20key%20performance%20metrics%20with%20built-in%20intelligence%20for%20performance%20troubleshooting.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBy%20using%20these%20collected%20metrics%2C%20you%20can%20create%20custom%20monitoring%20rules%20and%20alerts.%20Azure%20SQL%20Analytics%20helps%20you%20to%20identify%20issues%20at%20each%20layer%20of%20your%20application%20stack.%20It%20uses%20Azure%20Diagnostic%20metrics%20along%20with%20Azure%20Monitor%20views%20to%20present%20data%20about%20all%20your%20Azure%20SQL%20databases%20in%20a%20single%20Log%20Analytics%20work-space.%20Azure%20Monitor%20helps%20you%20to%20collect%2C%20correlate%2C%20and%20visualize%20structured%20and%20unstructured%20data.%20More%20information%20can%20be%20found%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Finsights%2Fazure-sql%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId--1380416165%22%20id%3D%22toc-hId--1380416134%22%3ELet%20us%20Begin%3A%3C%2FH2%3E%0A%3COL%3E%0A%3CLI%3EFrom%20%3CSTRONG%3EAzure%20Portal%3C%2FSTRONG%3E%20search%20field%20go%20to%20%3CSTRONG%3ELog%20Analytics%20workspaces%3C%2FSTRONG%3E%20the%20click%20%3CSTRONG%3EAdd%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20285px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180294i1737D40995705B40%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%221.png%22%20alt%3D%221.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EFill%20the%20values%20then%20click%20on%20%3CSTRONG%3EOK%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222.png%22%20style%3D%22width%3A%20255px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180296i2C998C5ED81EADFB%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%222.png%22%20alt%3D%222.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EGo%20to%20your%20Azure%20SQL%20MI%20that%20you%20want%20to%20create%20an%20alert%20for%20it%2C%20then%20click%20on%20%3CSTRONG%3EDiagnostic%20Settings%3C%2FSTRONG%3E%20(Left-menu)%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%223.png%22%20style%3D%22width%3A%20235px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180293i8A08C4E95DBED21D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%223.png%22%20alt%3D%223.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20right-side%2C%20click%20on%20the%20%3CSTRONG%3EAdd%20diagnostic%20setting%3C%2FSTRONG%3E%20and%20select%20the%20Log%20Analytics%20work%20space%20that%20you%20have%20created%20above%20then%20click%20on%20%3CSTRONG%3Esave%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20following%20snapshots%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%224_1.png%22%20style%3D%22width%3A%20496px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180295i034E84A7C32DDCCA%2Fimage-dimensions%2F496x207%3Fv%3D1.0%22%20width%3D%22496%22%20height%3D%22207%22%20title%3D%224_1.png%22%20alt%3D%224_1.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%224_2.png%22%20style%3D%22width%3A%20500px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180298i7BD2F3F09646F6DE%2Fimage-dimensions%2F500x225%3Fv%3D1.0%22%20width%3D%22500%22%20height%3D%22225%22%20title%3D%224_2.png%22%20alt%3D%224_2.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EClick%20on%20the%20%3CSTRONG%3ELog%20Analytic%20Workspace%3C%2FSTRONG%3E%20that%20we%20have%20created%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%225.png%22%20style%3D%22width%3A%20494px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180299i1A8857E09B01AFB7%2Fimage-dimensions%2F494x146%3Fv%3D1.0%22%20width%3D%22494%22%20height%3D%22146%22%20title%3D%225.png%22%20alt%3D%225.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20right-side%2C%20click%20on%20%3CSTRONG%3Eview%20logs%3C%2FSTRONG%3E%20under%20%3CSTRONG%3ESearch%20and%20analyze%20logs%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%226.png%22%20style%3D%22width%3A%20496px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180300i4E9264FEE4940694%2Fimage-dimensions%2F496x184%3Fv%3D1.0%22%20width%3D%22496%22%20height%3D%22184%22%20title%3D%226.png%22%20alt%3D%226.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20%3CSTRONG%3EQueries%3C%2FSTRONG%3E%20dialog%2C%20select%20Topic%20from%20the%20top-left%20drop%20down%20list%20then%20%3CSTRONG%3EAzure%20diagnostics%3C%2FSTRONG%3E%20from%20All%20Queries%20and%20finally%20click%20%3CSTRONG%3ELoad%20To%20Editor%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%227.png%22%20style%3D%22width%3A%20539px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180301i96CBB850CD0D6900%2Fimage-dimensions%2F539x190%3Fv%3D1.0%22%20width%3D%22539%22%20height%3D%22190%22%20title%3D%227.png%22%20alt%3D%227.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EClear%20the%20%3CSTRONG%3Eeditor%3C%2FSTRONG%3E%20and%20copy%20the%20query%20from%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Finsights%2Fazure-sql%23managed-instance-storage-is-above-90%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E%20(This%20query%20is%20responsible%20on%20monitoring%20if%20Azure%20MI%20storage%20is%20above%2090%25)%20then%20paste%20it%20in%20the%20%3CSTRONG%3Eeditor%3C%2FSTRONG%3E%20and%20click%20on%20%3CSTRONG%3ENew%20alert%20rule%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%228.png%22%20style%3D%22width%3A%20538px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180302i72E6A4719775DC2D%2Fimage-dimensions%2F538x211%3Fv%3D1.0%22%20width%3D%22538%22%20height%3D%22211%22%20title%3D%228.png%22%20alt%3D%228.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EAn%20alert%20will%20be%20created%20using%20the%20above%20query%2C%20please%20have%20a%20look%20at%20the%20followings%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%229.png%22%20style%3D%22width%3A%20477px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180303iF06FEFC1AC3C3FF5%2Fimage-dimensions%2F477x260%3Fv%3D1.0%22%20width%3D%22477%22%20height%3D%22260%22%20title%3D%229.png%22%20alt%3D%229.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EClick%20on%20the%20%3CSTRONG%3Econdition%3C%2FSTRONG%3E%20that%20you%20want%20to%20add%20the%20threshold%20in%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2210.png%22%20style%3D%22width%3A%20471px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180304i66039AD54B8BBD77%2Fimage-dimensions%2F471x173%3Fv%3D1.0%22%20width%3D%22471%22%20height%3D%22173%22%20title%3D%2210.png%22%20alt%3D%2210.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EEnter%20a%20specific%20threshold%20in%20the%20%3CSTRONG%3EThreshold%20value%3C%2FSTRONG%3E%20field%2C%20then%20click%20%3CSTRONG%3EDone%3C%2FSTRONG%3E%2C%20please%20have%20a%20look%20at%20the%20followings%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2211.jpg%22%20style%3D%22width%3A%20489px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180305iB909956FC9C373F1%2Fimage-dimensions%2F489x517%3Fv%3D1.0%22%20width%3D%22489%22%20height%3D%22517%22%20title%3D%2211.jpg%22%20alt%3D%2211.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EIn%20%3CSTRONG%3ECustomize%20Actions%3C%2FSTRONG%3E%20section%2C%20select%20the%20%3CSTRONG%3EEmail%20subject%3C%2FSTRONG%3E%20and%20enter%20your%20specific%20email%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2212.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180306i27FADA7E9A503AF1%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%2212.png%22%20alt%3D%2212.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EIn%20%3CSTRONG%3EAlert%20Details%3C%2FSTRONG%3E%20section%2C%20fill%20%3CSTRONG%3Ealert%20rule%20name%3C%2FSTRONG%3E%20and%20%3CSTRONG%3Edescription%3C%2FSTRONG%3E%20and%20finally%20click%20on%20%3CSTRONG%3ECreate%20alert%20rule%3C%2FSTRONG%3E%20button%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2213.png%22%20style%3D%22width%3A%20457px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180308iC0392DD18E2A053D%2Fimage-dimensions%2F457x223%3Fv%3D1.0%22%20width%3D%22457%22%20height%3D%22223%22%20title%3D%2213.png%22%20alt%3D%2213.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3ETo%20check%20if%20the%20alert%20created%2C%20from%20the%20portal%20search%20for%20%3CSTRONG%3EAlerts%3C%2FSTRONG%3E%20then%20%3CSTRONG%3Emanage%20alerts%3C%2FSTRONG%3E%2C%20and%20you%20will%20find%20your%20created%20alert%2C%20please%20have%20a%20look%20at%20the%20following%20snapshot%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2214.png%22%20style%3D%22width%3A%20585px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180309iF15262E7049AD6A3%2Fimage-dimensions%2F585x133%3Fv%3D1.0%22%20width%3D%22585%22%20height%3D%22133%22%20title%3D%2214.png%22%20alt%3D%2214.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId-1107096668%22%20id%3D%22toc-hId-1107096699%22%3EMore%20information%20can%20be%20found%20in%20the%20following%20documents%3A%3C%2FH2%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22arrow-right-3-10.png%22%20style%3D%22width%3A%2010px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180341i2B7AF8D6BEDAF123%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20title%3D%22arrow-right-3-10.png%22%20alt%3D%22arrow-right-3-10.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3CA%20style%3D%22background-color%3A%20%23ffffff%3B%20outline%3A%200px%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flog-query%2Fget-started-portal%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ETutorial%3A%20Get%20started%20with%20Log%20Analytics%20queries%3C%2FA%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22arrow-right-3-10.png%22%20style%3D%22width%3A%2010px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180341i2B7AF8D6BEDAF123%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20title%3D%22arrow-right-3-10.png%22%20alt%3D%22arrow-right-3-10.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3CA%20style%3D%22background-color%3A%20%23ffffff%3B%20outline%3A%200px%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flog-query%2Fget-started-portal%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EGet%20started%20with%20log%20queries%20in%20Azure%20Monitor%3C%2FA%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1281379%22%20slang%3D%22en-US%22%3E%3CP%3EAzure%20SQL%20Analytics%20collects%20and%20visualizes%20key%20performance%20metrics%20with%20built-in%20intelligence%20for%20performance%20troubleshooting.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

Azure SQL Analytics collects and visualizes key performance metrics with built-in intelligence for performance troubleshooting.

 

By using these collected metrics, you can create custom monitoring rules and alerts. Azure SQL Analytics helps you to identify issues at each layer of your application stack. It uses Azure Diagnostic metrics along with Azure Monitor views to present data about all your Azure SQL databases in a single Log Analytics work-space. Azure Monitor helps you to collect, correlate, and visualize structured and unstructured data. More information can be found here.


Let us Begin:

  1. From Azure Portal search field go to Log Analytics workspaces the click Add, please have a look at the following snapshot:
    1.png

  2. Fill the values then click on OK, please have a look at the following snapshot:
    2.png

  3. Go to your Azure SQL MI that you want to create an alert for it, then click on Diagnostic Settings (Left-menu), please have a look at the following snapshot:
    3.png

  4. From the right-side, click on the Add diagnostic setting and select the Log Analytics work space that you have created above then click on save, please have a look at the following snapshots:
    4_1.png

    4_2.png

  5. Click on the Log Analytic Workspace that we have created, please have a look at the following snapshot:
    5.png

  6. From the right-side, click on view logs under Search and analyze logs, please have a look at the following snapshot:
    6.png
  7. From the Queries dialog, select Topic from the top-left drop down list then Azure diagnostics from All Queries and finally click Load To Editor, please have a look at the following snapshot:
    7.png

  8. Clear the editor and copy the query from here (This query is responsible on monitoring if Azure MI storage is above 90%) then paste it in the editor and click on New alert rule, please have a look at the following snapshot:
    8.png

  9. An alert will be created using the above query, please have a look at the followings snapshot:
    9.png

  10. Click on the condition that you want to add the threshold in, please have a look at the following snapshot:
    10.png
  11. Enter a specific threshold in the Threshold value field, then click Done, please have a look at the followings snapshot:
    11.jpg

  12. In Customize Actions section, select the Email subject and enter your specific email, please have a look at the following snapshot:
    12.png
  13. In Alert Details section, fill alert rule name and description and finally click on Create alert rule button, please have a look at the following snapshot:13.png

  14. To check if the alert created, from the portal search for Alerts then manage alerts, and you will find your created alert, please have a look at the following snapshot:
    14.png

More information can be found in the following documents:

arrow-right-3-10.png Tutorial: Get started with Log Analytics queries
arrow-right-3-10.png Get started with log queries in Azure Monitor