Skip to content

Commit

Permalink
Adding Dashboard resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Lipin committed Jun 22, 2023
1 parent 019fce2 commit f4d921e
Showing 1 changed file with 185 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,16 @@
"type": "string",
"defaultValue": "CosmosDBBenchmarkTestAppInsights",
"metadata": {
"description": "Specifies Application Insights Account Nmae"
"description": "Specifies Application Insights Account Name"
}
}
},
"dashboardName": {
"type": "string",
"defaultValue": "Cosmos Benchmark Statistics",
"metadata": {
"description": "Specifies Application Insights Dashboard Name"
}
}
},
"variables": {
"vmName": "[concat(parameters('projectName'), '-vm')]",
Expand All @@ -165,7 +172,8 @@
"cloudInitScriptUrl": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/AzureVmBenchmark/system/cloud-init.txt')]",
"vmScriptExtensionScriptUrl": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/AzureVmBenchmark/scripts/execute.sh')]",
"customScriptUrl": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/AzureVmBenchmark/scripts/custom-script.sh')]",
"vmScriptExtensionScriptName": "execute.sh"
"vmScriptExtensionScriptName": "execute.sh",
"appInsightsResourceIds": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/microsoft.insights/components/', parameters('applicationInsightsName'))]"
},
"resources": [
{
Expand Down Expand Up @@ -392,7 +400,181 @@
"name": "vmextensioncopy",
"count": "[parameters('vmCount')]"
}
},
{
"name": "CosmosDBBenchmarkDashboard",
"type": "Microsoft.Portal/dashboards",
"location": "[resourceGroup().location]",
"apiVersion": "2015-08-01-preview",
"tags": {
"hidden-title": "[parameters('dashboardName')]"
},

"properties": {
"lenses": {
"0": {
"order": 0,
"parts": {
"0": {
"position": {
"x": 0,
"y": 0,
"colSpan": 11,
"rowSpan": 5
},
"metadata": {
"inputs": [
{
"name": "resourceTypeMode",
"isOptional": true
},
{
"name": "ComponentId",
"isOptional": true
},
{
"name": "Scope",
"value": {
"resourceIds": [
"[variables('appInsightsResourceIds')]"
]
},
"isOptional": true
},
{
"name": "PartId",
"value": "104528fc-0216-49c6-bf70-fffe9d37f93d",
"isOptional": true
},
{
"name": "Version",
"value": "2.0",
"isOptional": true
},
{
"name": "TimeRange",
"isOptional": true
},
{
"name": "DashboardId",
"isOptional": true
},
{
"name": "DraftRequestParameters",
"isOptional": true
},
{
"name": "Query",
"value": "customMetrics\n| where name == \"ReadOperationLatencyInMs\" and timestamp > ago(1d)\n| summarize\n percentile(value, 50),\n percentile(value, 75),\n percentile(value, 90),\n percentile(value, 95),\n percentile(value, 99),\n percentile(value, 99.9),\n percentile(value, 99.99)\n by ts = bin(timestamp, 5s)\n| render timechart \n\n",
"isOptional": true
},
{
"name": "ControlType",
"value": "FrameControlChart",
"isOptional": true
},
{
"name": "SpecificChart",
"value": "Line",
"isOptional": true
},
{
"name": "PartTitle",
"value": "Analytics",
"isOptional": true
},
{
"name": "PartSubTitle",
"value": "CosmosDBBenchmarkTestAppInsights",
"isOptional": true
},
{
"name": "Dimensions",
"value": {
"xAxis": {
"name": "ts",
"type": "datetime"
},
"yAxis": [
{
"name": "percentile_value_50",
"type": "real"
},
{
"name": "percentile_value_75",
"type": "real"
},
{
"name": "percentile_value_90",
"type": "real"
},
{
"name": "percentile_value_95",
"type": "real"
}
],
"splitBy": [],
"aggregation": "Sum"
},
"isOptional": true
},
{
"name": "LegendOptions",
"value": {
"isEnabled": true,
"position": "Bottom"
},
"isOptional": true
},
{
"name": "IsQueryContainTimeRange",
"value": true,
"isOptional": true
}
],
"type": "Extension/Microsoft_OperationsManagementSuite_Workspace/PartType/LogsDashboardPart",
"settings": {}
}
}
}
}
},
"metadata": {
"model": {
"timeRange": {
"value": {
"relative": {
"duration": 24,
"timeUnit": 1
}
},
"type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange"
},
"filterLocale": {
"value": "en-us"
},
"filters": {
"value": {
"MsPortalFx_TimeRange": {
"model": {
"format": "utc",
"granularity": "auto",
"relative": "24h"
},
"displayCache": {
"name": "UTC Time",
"value": "Past 24 hours"
},
"filteredPartIds": [
"StartboardPart-LogsDashboardPart-4f9d44ab-efbe-4310-8809-63ae942a3091"
]
}
}
}
}
}
}
}
],
"outputs": {
"results": {
Expand Down

0 comments on commit f4d921e

Please sign in to comment.