%3CLINGO-SUB%20id%3D%22lingo-sub-2016426%22%20slang%3D%22en-US%22%3EAzure%20metrics%20Dashboard%20(Custom%20dashboards%20using%20Log%20Analytics)%20for%20Azure%20Synapse%20Analytics%20-%20Part%202%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2016426%22%20slang%3D%22en-US%22%3E%3CP%3EPrerequisites%3A%20Complete%20basic%20dashboards%20Setup%20(Part%201%20in%20this%20series)%3B%20Log%20Analytics%20Workspace%20configured%20(ref%20-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Fsql-data-warehouse%2Fsql-data-warehouse-monitor-workload-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMonitor%20workload%20-%20Azure%20portal%20-%20Azure%20Synapse%20Analytics%20%7C%20Microsoft%20Docs%3C%2FA%3E)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20a%20first%20step%2C%20please%20download%20the%20log%20analytics%20queries%20in%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Faskpra%2FAzureSynapseAnalytics_LogAnalyticsScripts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%3C%2FA%3E%20GitHub%20repo%20that%20we%20will%20be%20using%20to%20set%20up%20the%20following%20custom%20dashboards.%20We%20are%20going%20to%20create%20the%20following%20charts%20in%20this%20article%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ETop%2020%20Long%20Running%20Queries%20by%20Execution%20time%20in%20a%20given%20interval%3C%2FLI%3E%0A%3CLI%3ENumber%20of%20Rows%20processed%20per%20hour%3C%2FLI%3E%0A%3CLI%3EMost%20Rows%20Processed%20Per%20Query%20step%3C%2FLI%3E%0A%3CLI%3ENumber%20of%20Rows%20processed%20per%20Query%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_0-1609053130527.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242958i31C21CCBA3EB4EC0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_0-1609053130527.png%22%20alt%3D%22prvemula_0-1609053130527.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENavigate%20to%20the%20Log%20Analytics%20workspace%20you%20configured%20to%20receive%20Synapse%20diagnostic%20data%20as%20shown%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_1-1609053130518.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242960iB934940E5741EB92%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_1-1609053130518.png%22%20alt%3D%22prvemula_1-1609053130518.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3EClose%20out%20the%20%E2%80%98queries%E2%80%99%20popup%20and%20paste%20in%20the%20text%20from%20'Top20LongrunningQueries.txt'%20file%20in%20the%20GitHub%20link%20provided%20above%20(image%20below%20for%20your%20reference).%20Replace%20the%20database%20name%20with%20your%20database%20name.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_2-1609053130516.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242959i3C94633246AB58E3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_2-1609053130516.png%22%20alt%3D%22prvemula_2-1609053130516.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_3-1609053130520.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242963i3CD434833835BB4E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_3-1609053130520.png%22%20alt%3D%22prvemula_3-1609053130520.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20save%20the%20query%20for%20future%20use%20with%20a%20name%20that%20corresponds%20to%20the%20query%20goal.%20For%20example%2C%20'LongRunningQueriesbyexecutiontime'%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_4-1609053130505.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242962i7D820834B5B6D774%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_4-1609053130505.png%22%20alt%3D%22prvemula_4-1609053130505.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_5-1609053130506.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242961iD515B7641E577D8B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_5-1609053130506.png%22%20alt%3D%22prvemula_5-1609053130506.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPress%20ctrl-A%20to%20select%20all%20the%20contents%20in%20the%20query%20window%2C%20including%20the%20commented%20out%20portions.%20Press%20Run%20to%20execute%20the%20Query.%20Once%20you%20get%20the%20results%2C%20select%20%E2%80%98Pin%20to%20dashboard%E2%80%99%20then%20in%20the%20popup%20choose%20the%20dashboard%20we%20are%20working%20on%20and%20click%20%E2%80%98pin%E2%80%99%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_6-1609053130507.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242965i16A6EA3E1EAEB872%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_6-1609053130507.png%22%20alt%3D%22prvemula_6-1609053130507.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENavigate%20to%20your%20dashboard%20and%20find%20the%20chart%20that%20you%20just%20pinned.%20Click%20the%20pencil%20icon%20to%20rename%20the%20chart%20to%20fit%20the%20purpose.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_7-1609053130509.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242966iEA2EFE1E797B25E4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_7-1609053130509.png%22%20alt%3D%22prvemula_7-1609053130509.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20popup%20at%20the%20top%20of%20the%20window%20click%20%E2%80%98save%E2%80%99%20%E2%80%93%20you%20will%20want%20to%20do%20this%20each%20time%20you%20make%20a%20change%20or%20all%20the%20changes%20you%20made%20will%20be%20discarded.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_8-1609053130510.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242964i5F74337AC94F33A3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_8-1609053130510.png%22%20alt%3D%22prvemula_8-1609053130510.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENavigate%20back%20to%20the%20log%20analytics%20workspace%20and%20paste%20in%20the%20text%20from%20the%20file%20%E2%80%98Top20Stepsthatmovedmostnumberofrows.txt%E2%80%99%20that%20you%20downloaded.%20Save%20the%20query%2C%20select%20all%20the%20contents%20in%20query%20window%20and%20run.%20Once%20you%20get%20the%20results%2C%20pin%20it%20to%20the%20dashboard.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithout%20leaving%20the%20query%20window%2C%20click%20the%20%E2%80%98Chart%E2%80%99%20button.%20The%20output%20will%20switch%20to%20a%20chart%20view.%20Set%20the%203%20parameters%20as%20shown%20in%20the%20screenshot%20below%20%E2%80%93%20note%20that%20you%20will%20need%20to%20set%20%E2%80%98OperationType_s%E2%80%99%20first%20to%20be%20able%20to%20set%20the%20first%20parameter%20to%20RequestID_s.%20Pin%20this%20chart%20to%20the%20dashboard%20as%20well.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_9-1609053130511.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242967iEEEA0FB6F60AC273%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_9-1609053130511.png%22%20alt%3D%22prvemula_9-1609053130511.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENavigate%20back%20to%20the%20dashboard%20and%20rename%20both%20the%20charts%20and%20save%20the%20dashboard.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_10-1609053130523.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242969i1BE42D1F2C101EBA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_10-1609053130523.png%22%20alt%3D%22prvemula_10-1609053130523.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERepeat%20the%20process%20for%20query%2C%20RowsProcessedPerHour.txt%20as%20well%20and%20pin%20the%20chart%20to%20the%20dashboard.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20for%20all%20the%20above%204%20charts%2C%20click%20the%20context%20menu%20option%20(ellipsis%20button%20to%20the%20top%20right%20corner)%20and%20select%20configure%20tile%20settings.%20Make%20sure%20to%20uncheck%20the%20%22Override%20the%20dashboard%20time%20settings%20at%20the%20tile%20level%22%20option.%20This%20will%20let%20you%20automatically%20refresh%20the%20chart%20for%20the%20interval%20selected%20on%20the%20dashboard.%20It%20is%20important%20to%20configure%20this%20setting%26nbsp%3B%20to%20interpret%20the%20results%20which%20will%20be%20discussed%20in%20the%203rd%20part%20in%20this%20series.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prvemula_11-1609053130513.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242968i5771061AF1C5D346%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prvemula_11-1609053130513.png%22%20alt%3D%22prvemula_11-1609053130513.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2016426%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EInternals%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESynapse%20Administration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESynapse%20Monitoring%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESynapse%20Support%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Prerequisites: Complete basic dashboards Setup (Part 1 in this series); Log Analytics Workspace configured (ref - Monitor workload - Azure portal - Azure Synapse Analytics | Microsoft Docs)

 

As a first step, please download the log analytics queries in this GitHub repo that we will be using to set up the following custom dashboards. We are going to create the following charts in this article:

 

  1. Top 20 Long Running Queries by Execution time in a given interval
  2. Number of Rows processed per hour
  3. Most Rows Processed Per Query step
  4. Number of Rows processed per Query

prvemula_0-1609053130527.png

 

Navigate to the Log Analytics workspace you configured to receive Synapse diagnostic data as shown below.

 

prvemula_1-1609053130518.png

 

  

Close out the ‘queries’ popup and paste in the text from 'Top20LongrunningQueries.txt' file in the GitHub link provided above (image below for your reference). Replace the database name with your database name.

 

prvemula_2-1609053130516.png

 

prvemula_3-1609053130520.png

 

You can save the query for future use with a name that corresponds to the query goal. For example, 'LongRunningQueriesbyexecutiontime'

prvemula_4-1609053130505.png

prvemula_5-1609053130506.png

 

Press ctrl-A to select all the contents in the query window, including the commented out portions. Press Run to execute the Query. Once you get the results, select ‘Pin to dashboard’ then in the popup choose the dashboard we are working on and click ‘pin’

prvemula_6-1609053130507.png

 

Navigate to your dashboard and find the chart that you just pinned. Click the pencil icon to rename the chart to fit the purpose.

 

prvemula_7-1609053130509.png

 

In the popup at the top of the window click ‘save’ – you will want to do this each time you make a change or all the changes you made will be discarded.

prvemula_8-1609053130510.png

Navigate back to the log analytics workspace and paste in the text from the file ‘Top20Stepsthatmovedmostnumberofrows.txt’ that you downloaded. Save the query, select all the contents in query window and run. Once you get the results, pin it to the dashboard.

 

Without leaving the query window, click the ‘Chart’ button. The output will switch to a chart view. Set the 3 parameters as shown in the screenshot below – note that you will need to set ‘OperationType_s’ first to be able to set the first parameter to RequestID_s. Pin this chart to the dashboard as well.

prvemula_9-1609053130511.png

Navigate back to the dashboard and rename both the charts and save the dashboard.

prvemula_10-1609053130523.png

 

Repeat the process for query, RowsProcessedPerHour.txt as well and pin the chart to the dashboard.

 

Now for all the above 4 charts, click the context menu option (ellipsis button to the top right corner) and select configure tile settings. Make sure to uncheck the "Override the dashboard time settings at the tile level" option. This will let you automatically refresh the chart for the interval selected on the dashboard. It is important to configure this setting  to interpret the results which will be discussed in the 3rd part in this series. 

 

prvemula_11-1609053130513.png