{"$schema":"https://dataexplorer.azure.com/static/d/schema/72/dashboard.json","id":"1df107d0-bb4d-4625-b635-e09ac34673f6","eTag":"2a602c51-c5cd-4a68-b692-9d11d876e978","title":"D365FO-Monitoring-Batch","schema_version":72,"tiles":[{"id":"5809a22f-397a-4bd8-9ca2-70c06894ba39","title":"Batch server configuration","visualType":"table","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":18,"y":9,"width":5,"height":7},"queryRef":{"kind":"query","queryId":"915bc00f-4243-49a8-ab11-c28bc17bbeaf"},"description":"Shows the batch server configuration settings","visualOptions":{"table__enableRenderLinks":false,"colorRulesDisabled":false,"crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[{"interaction":"dragX","disabled":false}],"drillthrough":[],"table__renderLinks":[],"colorRules":[{"id":"06bbb9fb-ebf8-4b7d-8b47-8180d6336e21","ruleType":"colorByCondition","ruleName":"","applyTo":"cells","conditions":[{"operator":">=","column":"Max Threads","values":["8"]}],"chainingOperator":"and","colorStyle":"light","applyToColumn":null,"hideText":false,"color":"blue","tag":"","icon":"completed","visualType":"table"},{"id":"3a82f827-c785-4834-9b69-7df10333958d","ruleType":"colorByCondition","applyToColumn":null,"hideText":false,"applyTo":"cells","conditions":[{"operator":"<=","column":"Max Threads","values":["4"]}],"chainingOperator":"and","colorStyle":"light","color":"green","tag":"","icon":"completed","ruleName":"","visualType":"table"}]}},{"id":"8b523026-32a5-45ed-8102-0561ad7a5beb","title":"Batch server #tasks execution spread","visualType":"pie","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":5,"y":0,"width":5,"height":9},"queryRef":{"kind":"query","queryId":"86f56460-5c5a-4105-a10e-16d5a34bc912"},"description":"Shows the number of tasks that are picked up by the different batch AOS instances.","visualOptions":{"hideLegend":false,"legendLocation":"bottom","xColumn":null,"yColumns":null,"seriesColumns":null,"crossFilterDisabled":false,"drillthroughDisabled":false,"labelDisabled":false,"pie__label":["name","percentage"],"tooltipDisabled":false,"pie__tooltip":["name","percentage","value"],"pie__orderBy":"size","pie__kind":"pie","pie__topNSlices":null,"crossFilter":[{"interaction":"dragX","disabled":false}],"seriesColors":{},"drillthrough":[]}},{"id":"5ee5d98e-db2b-4979-a2d6-a07f57518aef","title":"Throttled batch tasks","description":"Shows the running tasks in a 10 minute timeslice, along with the throttled tasks.","visualType":"area","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":10,"y":0,"width":13,"height":9},"queryRef":{"kind":"query","queryId":"a9656546-bff9-4bde-8c49-caf800235f67"},"visualOptions":{"multipleYAxes":{"base":{"id":"-1","label":"","columns":[],"yAxisMaximumValue":null,"yAxisMinimumValue":null,"yAxisScale":"linear","horizontalLines":[]},"additional":[],"showMultiplePanels":false},"hideLegend":false,"legendLocation":"bottom","xColumnTitle":"","xColumn":null,"yColumns":null,"seriesColumns":null,"xAxisScale":"linear","verticalLine":"","crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"seriesColors":{},"forceAxisTicks":false,"drillthrough":[],"selectedDataOnLoad":{"all":true,"limit":10},"dataPointsTooltip":{"all":false,"limit":1}}},{"id":"b2e65dce-2f9d-4004-a78b-f45e352bab1c","title":"Priority distribution","description":"Shows the number of tasks by priority.","visualType":"pie","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":0,"y":0,"width":5,"height":9},"queryRef":{"kind":"query","queryId":"4845ae22-5309-4710-a873-920df4d85319"},"visualOptions":{"hideLegend":false,"legendLocation":"bottom","xColumn":null,"yColumns":null,"seriesColumns":null,"crossFilterDisabled":false,"drillthroughDisabled":false,"labelDisabled":false,"pie__label":["name","percentage"],"tooltipDisabled":false,"pie__tooltip":["name","percentage","value"],"pie__orderBy":"size","pie__kind":"donut","pie__topNSlices":null,"crossFilter":[],"seriesColors":{},"drillthrough":[]}},{"id":"e7f096de-893d-4576-aeab-5dfbc9a3f8e4","title":"Available batch threads","description":"Shows the number of threads available per AOS over time.","visualType":"timechart","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":0,"y":9,"width":10,"height":7},"queryRef":{"kind":"query","queryId":"acfe99c3-8266-4de0-bd9d-c4426ed4e563"},"visualOptions":{"multipleYAxes":{"base":{"id":"-1","label":"","columns":[],"yAxisMaximumValue":null,"yAxisMinimumValue":null,"yAxisScale":"linear","horizontalLines":[]},"additional":[],"showMultiplePanels":false},"hideLegend":false,"legendLocation":"bottom","xColumnTitle":"","xColumn":null,"yColumns":null,"seriesColumns":null,"xAxisScale":"linear","verticalLine":"","crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"seriesColors":{},"forceAxisTicks":false,"drillthrough":[],"selectedDataOnLoad":{"all":true,"limit":10},"dataPointsTooltip":{"all":false,"limit":1}}},{"id":"efcb2bdf-58e4-4f72-86ea-cbe1f3688c16","title":"Batch execution history","description":"Shows batch jobs execution information. Information available includes starting time, completion time, class information and activity ids","visualType":"table","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":0,"y":16,"width":23,"height":7},"queryRef":{"kind":"query","queryId":"5296991b-e95d-4fed-9bba-7cbfb8c1c59c"},"visualOptions":{"table__enableRenderLinks":true,"colorRulesDisabled":false,"crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"drillthrough":[],"table__renderLinks":[],"colorRules":[]}},{"id":"c833576d-243f-4d5b-9c88-e70ffb64e07d","title":"Throttled batch tasks","description":"Shows the running tasks in a 10 minute timeslice, along with the throttled tasks.","visualType":"area","pageId":"d87df241-867d-4f16-88c2-4f6eb842ca85","layout":{"x":0,"y":0,"width":24,"height":9},"queryRef":{"kind":"query","queryId":"512083ba-d96a-48b1-8830-eab3d687556e"},"visualOptions":{"multipleYAxes":{"base":{"id":"-1","label":"","columns":[],"yAxisMaximumValue":null,"yAxisMinimumValue":null,"yAxisScale":"linear","horizontalLines":[]},"additional":[],"showMultiplePanels":false},"hideLegend":false,"legendLocation":"bottom","xColumnTitle":"","xColumn":null,"yColumns":null,"seriesColumns":null,"xAxisScale":"linear","verticalLine":"","crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"seriesColors":{},"forceAxisTicks":false,"drillthrough":[],"selectedDataOnLoad":{"all":true,"limit":10},"dataPointsTooltip":{"all":false,"limit":1}}},{"id":"854e98b4-a14d-423e-af65-a472cf35c144","title":"Throttled batch tasks","description":"Shows the running tasks in a 10 minute timeslice, along with the throttled tasks.","visualType":"table","pageId":"d87df241-867d-4f16-88c2-4f6eb842ca85","layout":{"x":0,"y":9,"width":24,"height":9},"queryRef":{"kind":"query","queryId":"8749e43e-4770-4aac-ab51-a6bfa0298c16"},"visualOptions":{"table__enableRenderLinks":true,"colorRulesDisabled":true,"crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"drillthrough":[],"table__renderLinks":[],"colorRules":[]}},{"id":"ff2668e7-ae04-430b-8152-311a0b8b56df","title":"Batch exceptions","description":"This shows the exceptions encountered during batch scheduling or execution. This contains also platform level exceptions that don't reach the Infolog error messages.","visualType":"table","pageId":"e8a9e639-50cb-4687-af2d-d0b581ab247e","layout":{"x":0,"y":18,"width":24,"height":9},"queryRef":{"kind":"query","queryId":"3d117aab-4634-4d52-9edf-68ee424a15d0"},"visualOptions":{"table__enableRenderLinks":true,"colorRulesDisabled":true,"crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"drillthrough":[],"table__renderLinks":[],"colorRules":[]}},{"id":"18c18664-4bdc-4f17-8fd3-b702f676f4bc","title":"Batch Infolog Errors","description":"This shows Infolog error messages coming from batch workloads.","visualType":"table","pageId":"e8a9e639-50cb-4687-af2d-d0b581ab247e","layout":{"x":0,"y":9,"width":24,"height":9},"queryRef":{"kind":"query","queryId":"e3d91e62-cfd6-4506-906f-6a1c72e8b5a1"},"visualOptions":{"table__enableRenderLinks":true,"colorRulesDisabled":true,"crossFilterDisabled":false,"drillthroughDisabled":false,"crossFilter":[],"drillthrough":[],"table__renderLinks":[],"colorRules":[]}},{"id":"2f68faa8-f41d-489a-be59-62b7571936bd","title":"Batch exceptions over time","description":"This shows the exceptions encountered during batch scheduling or execution. This contains also platform level exceptions that don't reach the Infolog error messages.","visualType":"area","pageId":"e8a9e639-50cb-4687-af2d-d0b581ab247e","layout":{"x":12,"y":0,"width":12,"height":9},"queryRef":{"kind":"query","queryId":"64db031b-4a5e-4394-b5d1-d439e70aeabf"},"visualOptions":{"multipleYAxes":{"base":{"id":"-1","label":"","columns":[],"yAxisMaximumValue":null,"yAxisMinimumValue":null,"yAxisScale":"linear","horizontalLines":[]},"additional":[],"showMultiplePanels":false},"hideLegend":false,"legendLocation":"bottom","xColumnTitle":"","xColumn":null,"yColumns":null,"seriesColumns":null,"xAxisScale":"linear","verticalLine":"","crossFilterDisabled":false,"drillthroughDisabled":false,"seriesColors":{},"forceAxisTicks":false,"crossFilter":[],"drillthrough":[]}},{"id":"8742946a-c80c-4a0b-ad8c-3a9af76473a8","title":"Batch Infolog Errors","description":"This shows Infolog error messages coming from batch workloads.","visualType":"area","pageId":"e8a9e639-50cb-4687-af2d-d0b581ab247e","layout":{"x":0,"y":0,"width":12,"height":9},"queryRef":{"kind":"query","queryId":"6cc07939-e1a6-44ce-b8f0-6c4b718ea046"},"visualOptions":{"multipleYAxes":{"base":{"id":"-1","label":"","columns":[],"yAxisMaximumValue":null,"yAxisMinimumValue":null,"yAxisScale":"linear","horizontalLines":[]},"additional":[],"showMultiplePanels":false},"hideLegend":false,"legendLocation":"bottom","xColumnTitle":"","xColumn":null,"yColumns":null,"seriesColumns":null,"xAxisScale":"linear","verticalLine":"","crossFilterDisabled":false,"drillthroughDisabled":false,"seriesColors":{},"forceAxisTicks":false,"crossFilter":[],"drillthrough":[]}},{"id":"d6c6ad89-c7bd-416c-8ce3-90837ae1297d","title":"PBS Queue sizes","visualType":"line","pageId":"57b9f821-760e-45d0-82ee-71fb8dc71d79","layout":{"x":10,"y":9,"width":8,"height":7},"queryRef":{"kind":"query","queryId":"8e682fff-dd0b-41dc-bed4-7dcc383176b2"},"description":"Shows the PBS queues and how many tasks are waiting in those specific queues at any given point in time.","visualOptions":{"multipleYAxes":{"base":{"id":"-1","label":"","columns":[],"yAxisMaximumValue":null,"yAxisMinimumValue":null,"yAxisScale":"linear","horizontalLines":[]},"additional":[],"showMultiplePanels":false},"hideLegend":false,"legendLocation":"bottom","xColumnTitle":"","xColumn":null,"yColumns":null,"seriesColumns":null,"xAxisScale":"linear","verticalLine":"","crossFilterDisabled":false,"drillthroughDisabled":false,"seriesColors":{},"forceAxisTicks":false,"crossFilter":[{"interaction":"dragX","disabled":false}],"drillthrough":[]}}],"baseQueries":[],"parameters":[{"kind":"duration","id":"42794f52-6782-487c-b413-b6b565549995","displayName":"Time range","description":"","beginVariableName":"_startTime","endVariableName":"_endTime","defaultValue":{"kind":"dynamic","count":24,"unit":"hours"},"showOnPages":{"kind":"all"}},{"kind":"string","id":"cd512fb6-641a-4c45-8fa5-5cca92f53f95","displayName":"Activity Id","description":"Identification of the activity interacting with forms","variableName":"_activityId","selectionType":"array","includeAllOption":true,"defaultValue":{"kind":"all"},"dataSource":{"kind":"query","columns":{"value":"ActivityId"},"queryRef":{"kind":"query","queryId":"ad733dd1-eb39-4e3c-86e6-3ea16b4a77fe"}},"showOnPages":{"kind":"selection","pageIds":["57b9f821-760e-45d0-82ee-71fb8dc71d79"]}},{"kind":"string","id":"9125b7b6-ab87-42d1-aa8a-f7279be866b5","displayName":"Batch Job Id","description":"","variableName":"_batchJobId","selectionType":"scalar","includeAllOption":true,"defaultValue":{"kind":"all"},"dataSource":{"kind":"query","columns":{"value":"BatchJobId"},"queryRef":{"kind":"query","queryId":"d0c728f6-b6de-495d-981c-55c56e53f139"}},"showOnPages":{"kind":"all"}},{"kind":"string","id":"bcda92f7-b5a5-40a2-89df-5a94bb22d4a1","displayName":"Environment Id","description":"","variableName":"_environmentId","selectionType":"array","includeAllOption":true,"defaultValue":{"kind":"all"},"dataSource":{"kind":"query","columns":{"value":"EnvironmentId"},"queryRef":{"kind":"query","queryId":"4aad6499-a6fa-4d2d-bb39-714527fa9fd8"}},"showOnPages":{"kind":"all"}}],"dataSources":[{"id":"6f2edf23-11b6-48a1-ad15-81660c55ff77","kind":"manual-kusto","name":"D365FSCM-Dev","clusterUri":"https://ade.applicationinsights.io/subscriptions/79def5f1-f626-479f-8db5-b1272680adc1/resourceGroups/D365-ObservabilityMonitoringAgents","database":"D365-ObservabilityAgents-DEV","queryResultsCacheMaxAge":10000}],"pages":[{"name":"Batch Overview","id":"57b9f821-760e-45d0-82ee-71fb8dc71d79"},{"name":"Batch Throttling","id":"d87df241-867d-4f16-88c2-4f6eb842ca85"},{"name":"Batch Errors","id":"e8a9e639-50cb-4687-af2d-d0b581ab247e"}],"queries":[{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| where name == \"BatchThreadInfo\"\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend infoMessageParsed = parse_json(tostring(customDimensionsParsed.InfoMessage))\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| extend CurrentBatchTasks = infoMessageParsed.CurrentBatchTasks\n| extend TaskQueueCount = infoMessageParsed.TaskQueueCount\n| extend MaxThreadCount = infoMessageParsed.MaxThreadCount\n| extend ReservedNumberOfThreads = infoMessageParsed.ReservedNumberOfThreads\n| summarize arg_max(timestamp, MaxThreadCount)\n , arg_max(timestamp, ReservedNumberOfThreads) by cloud_RoleInstance\n| project [\"Batch AOS\"] = cloud_RoleInstance\n , [\"Max Threads\"] = MaxThreadCount\n , [\"Reserved Threads\"] = ReservedNumberOfThreads\n| order by [\"Batch AOS\"] asc","id":"915bc00f-4243-49a8-ab11-c28bc17bbeaf","usedVariables":["_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| where name == \"BatchTaskStart\"\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend batchJobId = customDimensionsParsed.batchJobId\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| where isempty(_batchJobId) or tostring(batchJobId) in (_batchJobId)\n| extend batchAOSArray = split(cloud_RoleInstance, \"-\")\n| extend batchAOS = strcat(batchAOSArray[0])\n| project batchAOS\n| summarize count() by batchAOS\n| order by batchAOS asc\n","id":"86f56460-5c5a-4105-a10e-16d5a34bc912","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"let _scale = '10m';\ncustomEvents\n| where timestamp between (_startTime .. _endTime)\n| where name in (\"BatchThrottled\", \"BatchTaskStart\")\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend batchJobId = customDimensionsParsed.BatchJobId\n| where isempty(_batchJobId) or tostring(batchJobId) in (_batchJobId)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| summarize ThrottledTasks = countif(name == \"BatchThrottled\"), RunningTasks = countif(name == \"BatchTaskStart\") by TimeSum=bin(timestamp, totimespan(_scale))\n| project TimeSum, RunningTasks, ThrottledTasks\n| order by TimeSum asc","id":"a9656546-bff9-4bde-8c49-caf800235f67","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| where name == \"BatchTaskStart\"\n| extend customDimensionsParsed = parse_json(customDimensions)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| extend InfoMessageParsed = parse_json(tostring(customDimensionsParsed.InfoMessage))\n| extend Priority = iif(isnotempty(tostring(customDimensionsParsed.Priority)), tostring(customDimensionsParsed.Priority), 'Normal') // Ensuring that when enabling the telemetry to test, we account for potential missing initial values)\n| extend BatchTaskId = tostring(customDimensionsParsed.BatchTaskId)\n| distinct BatchTaskId, Priority\n| summarize count() by Priority","id":"4845ae22-5309-4710-a873-920df4d85319","usedVariables":["_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| where name == \"BatchThreadInfo\"\n| extend customDimensionsParsed = parse_json(customDimensions)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| extend infoMessageParsed = parse_json(tostring(customDimensionsParsed.InfoMessage))\n| extend CurrentBatchTasks = infoMessageParsed.CurrentBatchTasks\n| extend TaskQueueCount = infoMessageParsed.TaskQueueCount\n| extend MaxThreadCount = infoMessageParsed.MaxThreadCount\n| extend ReservedNumberOfThreads = infoMessageParsed.ReservedNumberOfThreads\n| project timestamp, Batch = tostring(split(cloud_RoleInstance, \"-\")[0]), AvailableThreads = todecimal(MaxThreadCount) - todecimal(CurrentBatchTasks) - todecimal(ReservedNumberOfThreads)","id":"acfe99c3-8266-4de0-bd9d-c4426ed4e563","usedVariables":["_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| where name in (\"BatchTaskStart\",\"BatchTaskFinished\",\"BatchTaskFailure\")\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend InfoMessageParsed = parse_json(tostring(customDimensionsParsed.InfoMessage))\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| extend ActivityId = tostring(customDimensionsParsed.activityId)\n| extend ClassName = tostring(customDimensionsParsed.ClassName)\n| extend BatchJobId = tostring(customDimensionsParsed.BatchJobId)\n| extend BatchJobTaskId1 = tostring(customDimensionsParsed.BatchJobTaskId)\n| extend BatchJobTaskId2 = tostring(customDimensionsParsed.BatchTaskId)\n| extend BatchJobTaskId = iif(isnotempty(BatchJobTaskId1), BatchJobTaskId1, BatchJobTaskId2) // Temporary trick until the batch team synchronizes the field names across events\n//| where isempty(_batchAOS) or cloud_RoleInstance in(_batchAOS)\n| extend StartTime = iff(name == \"BatchTaskStart\" , timestamp, datetime(null))\n| extend EndTime = iff(name == \"BatchTaskFinished\" , timestamp, datetime(null))\n| extend ErrorTime = iff(name == \"BatchTaskFailure\" , timestamp, datetime(null))\n| extend RetryCount = iff(name == \"BatchTaskStart\" , InfoMessageParsed.RetryCount, \"\")\n| project StartTime, EndTime,ErrorTime,RetryCount, ActivityId, ClassName, BatchJobId, RoleInstance = cloud_RoleInstance, BatchJobTaskId\n| where isempty(_batchJobId) or tostring(BatchJobId) in (_batchJobId)\n| summarize StartTime = min(StartTime),\n CompletionTime = max(EndTime),\n ErrorTime = max(ErrorTime),\n RetryCount = take_any(RetryCount),\n ClassName = any(ClassName), \n BatchJobId = any(BatchJobId),\n BatchJobTaskId = any(BatchJobTaskId),\n RoleInstance = any(RoleInstance)\nby ActivityId\n| where isnotempty(StartTime)\n| extend BatchAOS = strcat(split(RoleInstance, \"-\")[0])\n| extend ElapsedTime = iif(isnotempty(CompletionTime), CompletionTime, now()) - StartTime\n| project ActivityId, BatchAOS, BatchJobId, BatchJobTaskId, ClassName, StartTime, CompletionTime, ElapsedTime, RetryCount","id":"5296991b-e95d-4fed-9bba-7cbfb8c1c59c","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"let _scale = '10m';\ncustomEvents\n| where timestamp between (_startTime .. _endTime)\n| where name in (\"BatchThrottled\", \"BatchTaskStart\")\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend batchJobId = customDimensionsParsed.BatchJobId\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| where isempty(_batchJobId) or tostring(batchJobId) in (_batchJobId)\n| summarize ThrottledTasks = countif(name == \"BatchThrottled\"), RunningTasks = countif(name == \"BatchTaskStart\") by TimeSum=bin(timestamp, totimespan(_scale))\n| project TimeSum, RunningTasks, ThrottledTasks\n| order by TimeSum asc","id":"512083ba-d96a-48b1-8830-eab3d687556e","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"let _scale = '10m';\ncustomEvents\n| where timestamp between (_startTime .. _endTime)\n| where name == \"BatchThrottled\"\n| extend customDimensionsParsed = parse_json(customDimensions)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| extend BatchJobId = customDimensionsParsed.BatchJobId // this is actually always 0\n| extend EventId = customDimensionsParsed.eventId\n| extend EnvironmentId = customDimensionsParsed.environmentId\n| extend LegalEntity = customDimensionsParsed.LegalEntity\n| extend ActivityId = customDimensionsParsed.activityId\n| extend EventMessage = customDimensionsParsed.EventMessage\n| extend InfoMessage = customDimensionsParsed.InfoMessage\n| extend InfoMessageParsed = parse_json(tostring(InfoMessage))\n| extend CurrentMachineCPU = round(toreal(InfoMessageParsed.CurrentMachineCpu), 0)\n| extend CurrentMachineMemory = InfoMessageParsed.CurrentMachineMemory\n| extend CurrentSqlDtu = InfoMessageParsed.CurrentSqlDtu\n| project timestamp, EventId, name, user_Id, session_Id, cloud_RoleInstance, EnvironmentId, LegalEntity, ActivityId, EventMessage, CurrentMachineCPU, CurrentMachineMemory, CurrentSqlDtu","id":"8749e43e-4770-4aac-ab51-a6bfa0298c16","usedVariables":["_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"// BatchTaskFailure is providing Exceptions in the batch execution. \n// These events are providing exception information that is often not covered by infolog errors, but exceptions that are thrown during batch processing and batch scheduling.\ncustomEvents\n| where timestamp between (_startTime .. _endTime)\n| where name in (\"BatchTaskFailure\")\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend BatchJobCaption = tostring(customDimensionsParsed.BatchJobCaption)\n| extend ActivityId = tostring(customDimensionsParsed.activityId)\n| extend ClassName = iif((tostring(customDimensionsParsed.ClassName) == \"\"), \"\", tostring(customDimensionsParsed.ClassName))\n| extend BatchJobId = tostring(customDimensionsParsed.BatchJobId)\n| extend BatchTaskId = tostring(customDimensionsParsed.BatchTaskId)\n| extend EventMessage = tostring(customDimensionsParsed.EventMessage)\n| extend ExceptionType = tostring(customDimensionsParsed.ExceptionType)\n| extend ExceptionMessage = tostring(customDimensionsParsed.ExceptionMessage)\n| extend CallStack = tostring(customDimensionsParsed.CallStack)\n| where isempty(_batchJobId) or tostring(BatchJobId) in (_batchJobId)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| project TimeStamp = timestamp, RoleInstance = cloud_RoleInstance, ActivityId, BatchJobCaption, ClassName, BatchJobId, BatchTaskId, EventMessage, ExceptionType, ExceptionMessage, CallStack\n\n","id":"3d117aab-4634-4d52-9edf-68ee424a15d0","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"exceptions\n| where timestamp between (_startTime .. _endTime)\n| extend cvustomDimensionsParsed = parse_json(customDimensions)\n| extend ExecutionMode = tostring(cvustomDimensionsParsed.ExecutionMode)\n| extend BatchJobId = tostring(cvustomDimensionsParsed.BatchJobId)\n| extend BatchJobCaption = tostring(cvustomDimensionsParsed.BatchJobCaption)\n| extend ActivityId = tostring(cvustomDimensionsParsed.activityId)\n| extend MethodName = tostring(cvustomDimensionsParsed.MethodName)\n| extend ClassName = tostring(cvustomDimensionsParsed.ClassName)\n| extend CallStack = tostring(cvustomDimensionsParsed.CallStack)\n| where ExecutionMode == \"Batch\"\n| where isempty(_batchJobId) or tostring(BatchJobId) in (_batchJobId)\n| where isempty(_environmentId) or tostring(cvustomDimensionsParsed.EnvironmentId) == _environmentId\n| project TimeStamp = timestamp, ActivityId, BatchJobId, BatchJobCaption, OuterMessage = outerMessage, CallStack","id":"e3d91e62-cfd6-4506-906f-6a1c72e8b5a1","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"// BatchTaskFailure is providing Exceptions in the batch execution. \n// These events are providing exception information that is often not covered by infolog errors, but exceptions that are thrown during batch processing and batch scheduling.\ncustomEvents\n| where timestamp between (_startTime .. _endTime)\n| where name in (\"BatchTaskFailure\")\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend BatchJobId = tostring(customDimensionsParsed.BatchJobId)\n| where isempty(_batchJobId) or tostring(BatchJobId) in (_batchJobId)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| summarize TotalFailures = count() by bin(timestamp, 10m)\n\n","id":"64db031b-4a5e-4394-b5d1-d439e70aeabf","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"exceptions\n| where timestamp between (_startTime .. _endTime)\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend ExecutionMode = tostring(customDimensionsParsed.ExecutionMode)\n| extend BatchJobId = tostring(customDimensionsParsed.BatchJobId)\n| where ExecutionMode == \"Batch\"\n| where isempty(_batchJobId) or tostring(BatchJobId) in (_batchJobId)\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| summarize TotalErrors = count() by bin(timestamp, 10m)","id":"6cc07939-e1a6-44ce-b8f0-6c4b718ea046","usedVariables":["_batchJobId","_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| where name == \"BatchQueuesDetails\"\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend InfoMessageParsed = parse_json(tostring(customDimensionsParsed.InfoMessage))\n| where isempty(_environmentId) or tostring(customDimensionsParsed.EnvironmentId) == _environmentId\n| extend BatchLowSchedulingQueue = toint(InfoMessageParsed.BatchLowSchedulingQueue)\n| extend BatchNormalSchedulingQueue = toint(InfoMessageParsed.BatchNormalSchedulingQueue)\n| extend BatchHighSchedulingQueue = toint(InfoMessageParsed.BatchHighSchedulingQueue)\n| extend BatchCriticalSchedulingQueue = toint(InfoMessageParsed.BatchCriticalSchedulingQueue)\n| extend BatchReservedCapacitySchedulingQueue = toint(InfoMessageParsed.BatchReservedCapacitySchedulingQueue)\n| extend ReadyTasksBuffer = toint(InfoMessageParsed.ReadyTasksBuffer)\n| extend ReadyTasksBufferWithPriorities = toint(InfoMessageParsed.ReadyTasksBufferWithPriorities)\n| project timestamp, BatchLowSchedulingQueue, BatchNormalSchedulingQueue, BatchHighSchedulingQueue, BatchReservedCapacitySchedulingQueue, ReadyTasksBuffer, ReadyTasksBufferWithPriorities","id":"8e682fff-dd0b-41dc-bed4-7dcc383176b2","usedVariables":["_endTime","_environmentId","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"pageViews\n| extend ActivityId = tostring(customDimensions.activityId)\n| distinct ActivityId","id":"ad733dd1-eb39-4e3c-86e6-3ea16b4a77fe","usedVariables":[]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (_startTime .. _endTime)\n| extend customDimensionsParsed = parse_json(customDimensions)\n| extend BatchJobId = tostring(customDimensionsParsed.BatchJobId)\n| distinct BatchJobId\n| order by BatchJobId asc\n","id":"d0c728f6-b6de-495d-981c-55c56e53f139","usedVariables":["_endTime","_startTime"]},{"dataSource":{"kind":"inline","dataSourceId":"6f2edf23-11b6-48a1-ad15-81660c55ff77"},"text":"customEvents\n| where timestamp between (ago(7d) .. now())\n| extend EnvironmentId = tostring(customDimensions.environmentId)\n| distinct EnvironmentId\n","id":"4aad6499-a6fa-4d2d-bb39-714527fa9fd8","usedVariables":[]}]}