Skip to content

Instantly share code, notes, and snippets.

@leeford
Created June 18, 2020 16:31
Show Gist options
  • Save leeford/6769a57b7fe120bca220ef61cd3bedc4 to your computer and use it in GitHub Desktop.
Save leeford/6769a57b7fe120bca220ef61cd3bedc4 to your computer and use it in GitHub Desktop.
Teams Network Usage Workbook
{
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"json": "## Teams Client Network Usage\n"
},
"name": "text - 2"
},
{
"type": 9,
"content": {
"version": "KqlParameterItem/1.0",
"parameters": [
{
"id": "59e0b7db-d63f-4a3f-b95f-9ca8d4cff5d9",
"version": "KqlParameterItem/1.0",
"name": "TimeRange",
"label": "Time Range",
"type": 4,
"isRequired": true,
"value": {
"durationMs": 14400000
},
"typeSettings": {
"selectableValues": [
{
"durationMs": 300000
},
{
"durationMs": 900000
},
{
"durationMs": 1800000
},
{
"durationMs": 3600000
},
{
"durationMs": 14400000
},
{
"durationMs": 43200000
},
{
"durationMs": 86400000
},
{
"durationMs": 172800000
},
{
"durationMs": 259200000
},
{
"durationMs": 604800000
},
{
"durationMs": 1209600000
},
{
"durationMs": 2419200000
},
{
"durationMs": 2592000000
},
{
"durationMs": 5184000000
},
{
"durationMs": 7776000000
}
]
},
"timeContext": {
"durationMs": 86400000
}
}
],
"style": "pills",
"queryType": 0
},
"name": "parameters - 5"
},
{
"type": 1,
"content": {
"json": "### Teams Client Cumulative Network Usage (By Country) in MB"
},
"name": "text - 4"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "VMConnection\n| where ProcessName contains \"teams\"\n| summarize TotalMB = sum(((BytesReceived)/1024/1024)+((BytesSent)/1024/1024)) by RemoteCountry\n| where TotalMB > 0\n| order by TotalMB desc",
"size": 0,
"timeContext": {
"durationMs": 14400000
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"visualization": "map",
"graphSettings": {
"type": 0,
"topContent": {
"columnMatch": "RemoteCountry",
"formatter": 1
},
"centerContent": {
"columnMatch": "TotalKBReceived",
"formatter": 1,
"numberFormat": {
"unit": 17,
"options": {
"maximumSignificantDigits": 3,
"maximumFractionDigits": 2
}
}
}
},
"chartSettings": {
"xAxis": "RemoteCountry"
},
"mapSettings": {
"locInfo": "CountryRegion",
"locInfoColumn": "RemoteCountry",
"sizeSettings": "TotalMB",
"sizeAggregation": "Sum",
"legendMetric": "TotalMB",
"legendAggregation": "Sum",
"itemColorSettings": {
"nodeColorField": "TotalMB",
"colorAggregation": "Sum",
"type": "heatmap",
"heatmapPalette": "greenRed"
}
}
},
"customWidth": "50",
"name": "query - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "VMConnection\r\n| where ProcessName contains \"teams\"\r\n| summarize TotalMB = sum(((BytesReceived)/1024/1024)+((BytesSent)/1024/1024)) by RemoteCountry\r\n| where TotalMB > 0\r\n| order by TotalMB desc",
"size": 0,
"timeContext": {
"durationMs": 14400000
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"visualization": "table",
"gridSettings": {
"formatters": [
{
"columnMatch": "TotalKB",
"formatter": 0,
"numberFormat": {
"unit": 0,
"options": {
"style": "decimal",
"useGrouping": false
}
}
}
],
"labelSettings": [
{
"columnId": "TotalMB",
"label": "Total MB"
}
]
},
"sortBy": []
},
"customWidth": "50",
"name": "query - 3"
},
{
"type": 1,
"content": {
"json": "### Teams Client Network Usage Over Time in Kbps"
},
"name": "text - 6"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "VMConnection\r\n| where ProcessName contains \"teams\"\r\n| project Computer, TimeGenerated, SentKbps = ((BytesSent)/1024*8/60), ReceivedKbps = ((BytesReceived)/1024*8/60)\r\n| render timechart",
"size": 0,
"aggregation": 2,
"timeContext": {
"durationMs": 14400000
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"chartSettings": {
"showLegend": true,
"seriesLabelSettings": [
{
"seriesName": "SentKbps",
"label": "Sent Kbps",
"color": "purple"
},
{
"seriesName": "ReceivedKbps",
"label": "Received Kbps",
"color": "yellow"
}
]
}
},
"name": "query - 2"
}
],
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment