-
Notifications
You must be signed in to change notification settings - Fork 0
/
DashboardDemo.json
840 lines (840 loc) · 38.1 KB
/
DashboardDemo.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
{
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"json": "## WVD Monitoring\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\nSelect your tab to view additional dashboard items. "
},
"name": "text - 2"
},
{
"type": 11,
"content": {
"version": "LinkItem/1.0",
"style": "tabs",
"links": [
{
"cellValue": "selectedTab",
"linkTarget": "parameter",
"linkLabel": "WVD Monitoring",
"subTarget": "WVDMonitoring",
"style": "link"
},
{
"cellValue": "selectedTab",
"linkTarget": "parameter",
"linkLabel": "WVD Diagnostics",
"subTarget": "WVDDiagnostics",
"style": "link"
},
{
"cellValue": "selectedTab",
"linkTarget": "parameter",
"linkLabel": "Unfinished Tab",
"subTarget": "UnfinishedTab",
"style": "link"
}
]
},
"name": "links - 14"
},
{
"type": 1,
"content": {
"json": "-------------------------"
},
"name": "text - 11"
},
{
"type": 9,
"content": {
"version": "KqlParameterItem/1.0",
"parameters": [
{
"id": "016ab56e-ec00-4e75-a8db-6091a0cc850b",
"version": "KqlParameterItem/1.0",
"name": "TimeRange",
"label": "Time Range",
"type": 4,
"isRequired": true,
"typeSettings": {
"selectableValues": [
{
"durationMs": 1800000
},
{
"durationMs": 3600000
},
{
"durationMs": 14400000
},
{
"durationMs": 43200000
},
{
"durationMs": 86400000
},
{
"durationMs": 172800000
},
{
"durationMs": 259200000
},
{
"durationMs": 604800000
}
]
},
"resourceType": "microsoft.insights/components",
"value": {
"durationMs": 172800000
}
},
{
"id": "38e1c502-c2e1-4796-ad71-457f3d564482",
"version": "KqlParameterItem/1.0",
"name": "HasHeatBeat",
"type": 2,
"isRequired": true,
"query": "Heartbeat\r\n| take 1\r\n| summarize count() ",
"value": "1",
"isHiddenWhenLocked": true,
"typeSettings": {
"additionalResourceOptions": []
},
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
{
"id": "16dfe69b-f469-4809-8904-28914799662f",
"version": "KqlParameterItem/1.0",
"name": "UnhealthyCriteria",
"label": "Unhealthy Criteria",
"type": 2,
"isRequired": true,
"typeSettings": {
"additionalResourceOptions": []
},
"jsonData": "[\r\n { \"value\":\"1m\", \"label\":\"1 minute without heartbeat\", \"selected\":false },\r\n { \"value\":\"5m\", \"label\":\"5 minutes without heartbeat\", \"selected\":true },\r\n { \"value\":\"30m\", \"label\":\"30 minutes without heartbeat\", \"selected\":false },\r\n { \"value\":\"1h\", \"label\":\"1 hour without heartbeat\", \"selected\":false },\r\n { \"value\":\"2h\", \"label\":\"2 hours without heartbeat\", \"selected\":false },\r\n { \"value\":\"8h\", \"label\":\"8 hours without heartbeat\", \"selected\":false },\r\n { \"value\":\"1d\", \"label\":\"1 day without heartbeat\", \"selected\":false },\r\n { \"value\":\"2d\", \"label\":\"2 days without heartbeat\", \"selected\":false },\r\n { \"value\":\"7d\", \"label\":\"7 days without heartbeat\", \"selected\":false }\r\n]",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"resourceType": "microsoft.insights/components"
}
],
"style": "pills",
"queryType": 0,
"resourceType": "microsoft.insights/components"
},
"name": "parameters - 2"
},
{
"type": 12,
"content": {
"version": "NotebookGroup/1.0",
"groupType": "editable",
"items": [
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDConnections\r\n| where State == \"Connected\"\r\n| extend ClientOSType = pack(\"ClientOSVersion\", ClientOS)\r\n| summarize count() by ClientOS\r\n| render piechart\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
"size": 4,
"showAnalytics": true,
"title": "Client Connection OS",
"noDataMessageStyle": 5,
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"chartSettings": {
"showMetrics": false,
"showLegend": true,
"ySettings": {}
}
},
"customWidth": "50",
"showPin": true,
"name": "Client Connection OS",
"styleSettings": {
"maxWidth": "25%",
"showBorder": true
}
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "// Code to display active and inactive sessions by computer\r\n// Adding a render piechart will automatically display the consolidated information into a piechart for visual\r\n// Display the Current Active and Inactive sessions by linking to the latest counter values from each table. \r\nPerf\r\n| where CounterName == \"Active Sessions\"\r\n| extend ActiveSessions = toint(CounterValue)\r\n| project Computer, ActiveTimeStamp=TimeGenerated, ActiveSessions \r\n| join kind= inner (\r\n Perf\r\n | where CounterName == \"Inactive Sessions\"\r\n | extend totalinactivesessions = toint(CounterValue)\r\n | extend InactiveSessions = totalinactivesessions - 2\r\n | project Computer, InactiveTimeStamp=TimeGenerated, InactiveSessions \r\n) on Computer \r\n| where (ActiveTimeStamp - InactiveTimeStamp) between (0min .. 15s)\r\n| summarize arg_max(ActiveTimeStamp, *) by Computer\r\n| extend Sessions = pack(\"Inactive Sessions\", InactiveSessions, \"Active Sessions\", ActiveSessions)\r\n| mvexpand kind=array Sessions\r\n| project SessionType = tostring(Sessions[0]), value = toint(Sessions[1]), Computer = Computer\r\n| render piechart\r\n",
"size": 4,
"showAnalytics": true,
"title": "Current Session Status",
"noDataMessageStyle": 5,
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"chartSettings": {
"seriesLabelSettings": [
{
"seriesName": "Inactive Sessions",
"label": "Inactive Sessions",
"color": "orange"
},
{
"seriesName": "Active Sessions",
"label": "Active Sessions",
"color": "green"
}
],
"ySettings": {
"numberFormatSettings": {
"unit": 17,
"options": {
"style": "decimal",
"useGrouping": false
}
}
}
}
},
"customWidth": "50",
"showPin": true,
"name": "Current Session Status",
"styleSettings": {
"maxWidth": "25%",
"showBorder": true
}
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDConnections\r\n//|where UserName == \"userupn\"\r\n//|take 100\r\n|sort by TimeGenerated asc, CorrelationId\r\n|summarize dcount(CorrelationId) by bin(TimeGenerated, 1d)",
"size": 4,
"showAnnotations": true,
"title": "Daily Connections - Rolling 7 days",
"timeContext": {
"durationMs": 604800000
},
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"visualization": "unstackedbar",
"gridSettings": {
"sortBy": [
{
"itemKey": "TimeGenerated",
"sortOrder": 1
}
]
},
"sortBy": [
{
"itemKey": "TimeGenerated",
"sortOrder": 1
}
],
"tileSettings": {
"showBorder": false
},
"graphSettings": {
"type": 0
},
"chartSettings": {
"xAxis": "TimeGenerated",
"yAxis": [
"dcount_CorrelationId"
],
"seriesLabelSettings": [
{
"seriesName": "dcount_CorrelationId",
"label": "Total Logins"
}
],
"xSettings": {
"numberFormatSettings": {
"unit": 0,
"options": {
"style": "decimal",
"useGrouping": false
}
}
},
"ySettings": {
"numberFormatSettings": {
"unit": 0,
"options": {
"style": "decimal",
"useGrouping": false
}
}
}
}
},
"customWidth": "50",
"showPin": true,
"name": "query - 3",
"styleSettings": {
"maxWidth": "25%",
"showBorder": true
}
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "SigninLogs\r\n| where ResourceDisplayName == \"Windows Virtual Desktop\"\r\n| summarize arg_max(CorrelationId, *) by CorrelationId\r\n| project [\"City\"]= LocationDetails.city, LocationDetails.geoCoordinates.longitude, LocationDetails.geoCoordinates.latitude",
"size": 4,
"title": "Logon Location Heatmap",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"visualization": "map",
"mapSettings": {
"locInfo": "LatLong",
"locInfoColumn": "Location",
"latitude": "LocationDetails_geoCoordinates_latitude",
"longitude": "LocationDetails_geoCoordinates_longitude",
"sizeSettings": "City",
"sizeAggregation": "Count",
"labelSettings": "City",
"legendMetric": "City",
"numberOfMetrics": 5,
"legendAggregation": "Count",
"itemColorSettings": {
"nodeColorField": "City",
"colorAggregation": "Sum",
"type": "heatmap",
"heatmapPalette": "coldHot"
}
}
},
"customWidth": "50",
"showPin": true,
"name": "query - 4",
"styleSettings": {
"maxWidth": "25%",
"showBorder": true
}
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "// Code to display active and inactive sessions by computer\r\n// Adding a render piechart will automatically display the consolidated information into a piechart for visual\r\n// Display the Current Active and Inactive sessions by linking to the latest counter values from each table. \r\nPerf\r\n| where CounterName == \"Active Sessions\"\r\n| extend ActiveSessions = toint(CounterValue)\r\n| project Computer, ActiveTimeStamp=TimeGenerated, ActiveSessions \r\n| join kind= inner (\r\n Perf\r\n | where CounterName == \"Inactive Sessions\"\r\n | extend totalinactivesessions = toint(CounterValue)\r\n | extend InactiveSessions = totalinactivesessions - 2\r\n | project Computer, InactiveTimeStamp=TimeGenerated, InactiveSessions \r\n) on Computer \r\n| where (ActiveTimeStamp - InactiveTimeStamp) between (0min .. 15s)\r\n| project ActiveSessions, InactiveSessions, bin(ActiveTimeStamp, 5m)\r\n//| summarize (ActiveSessions, InactiveSessions) by Computer, bin(ActiveTimeStamp, 5m)\r\n//| summarize arg_max(ActiveTimeStamp, *) by Computer\r\n//| extend Sessions = pack(\"Inactive Sessions\", InactiveSessions, \"Active Sessions\", ActiveSessions)\r\n\r\n",
"size": 1,
"aggregation": 2,
"showAnnotations": true,
"title": "Session Status History",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"visualization": "areachart",
"tileSettings": {
"showBorder": false
},
"graphSettings": {
"type": 0
},
"chartSettings": {
"group": null,
"createOtherGroup": 0,
"xSettings": {},
"ySettings": {}
}
},
"name": "query - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Perf\r\n//| where Computer == \"WVDARM-0.m365demo.com.au\"\r\n| where ObjectName == \"RemoteFX Network\" and InstanceName matches regex @\"rdp-sxs\\d{9}\\s\\d{0,6}\" and CounterName == \"Current TCP RTT\" and CounterValue > 0\r\n| summarize avg(CounterValue) by InstanceName, bin(TimeGenerated, 5m)\r\n| order by InstanceName asc\r\n| render timechart ",
"size": 0,
"aggregation": 3,
"title": "Round Trip Latency per session",
"timeContext": {
"durationMs": 14400000
},
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"visualization": "timechart",
"gridSettings": {
"sortBy": [
{
"itemKey": "TimeGenerated",
"sortOrder": 2
}
]
},
"sortBy": [
{
"itemKey": "TimeGenerated",
"sortOrder": 2
}
],
"tileSettings": {
"titleContent": {
"columnMatch": "InstanceName",
"formatter": 1,
"formatOptions": {}
},
"leftContent": {
"columnMatch": "avg_CounterValue",
"formatter": 12,
"formatOptions": {
"palette": "auto"
},
"numberFormat": {
"unit": 17,
"options": {
"style": "decimal",
"useGrouping": false,
"maximumFractionDigits": 2,
"maximumSignificantDigits": 3
}
}
},
"rightContent": {
"columnMatch": "avg_CounterValue",
"formatter": 9,
"formatOptions": {
"palette": "blue"
},
"numberFormat": {
"unit": 23,
"options": {
"style": "decimal"
}
}
},
"showBorder": false,
"size": "auto"
},
"chartSettings": {
"xAxis": "TimeGenerated",
"group": "InstanceName",
"createOtherGroup": null,
"showMetrics": false,
"showLegend": true,
"xSettings": {
"numberFormatSettings": {
"unit": 0,
"options": {
"style": "decimal",
"useGrouping": true
}
}
},
"ySettings": {
"numberFormatSettings": {
"unit": 23,
"options": {
"style": "decimal",
"useGrouping": true,
"maximumFractionDigits": 0
}
}
}
}
},
"showPin": true,
"name": "query - 13"
},
{
"type": 1,
"content": {
"json": "-----------------------------------------------"
},
"name": "text - 8"
}
]
},
"conditionalVisibility": {
"parameterName": "selectedTab",
"comparison": "isEqualTo",
"value": "WVDMonitoring"
},
"name": "group - 14"
},
{
"type": 9,
"content": {
"version": "KqlParameterItem/1.0",
"parameters": [
{
"id": "b4b63c7f-e4fa-4fb0-bd56-2ba5c78fcc30",
"version": "KqlParameterItem/1.0",
"name": "HostLoad",
"label": "Host Load Capacity",
"type": 2,
"description": "Select the workload for the host pools - currently will set for all and just update the display below for max sessions expected",
"isRequired": true,
"typeSettings": {
"additionalResourceOptions": []
},
"jsonData": "[\r\n { \"value\":\"2\", \"label\":\"Heavy (2users/vcpu)\", \"selected\":false },\r\n { \"value\":\"4\", \"label\":\"Medium (4users/vcpu)\", \"selected\":true },\r\n { \"value\":\"6\", \"label\":\"Light (6users/vcpu)\", \"selected\":false}\r\n]",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"resourceType": "microsoft.insights/components"
}
],
"style": "pills",
"queryType": 0,
"resourceType": "microsoft.insights/components"
},
"name": "parameters - 7"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Heartbeat\n| where TimeGenerated {TimeRange:query}\n| summarize LastHeartbeat = max(TimeGenerated) by Computer\n| extend State = iff(LastHeartbeat < ago({UnhealthyCriteria}), 'Unhealthy', 'Healthy')\n| extend TimeFromNow = now() - LastHeartbeat\n| extend [\"TimeAgo\"] = strcat(case(TimeFromNow < 2m, strcat(toint(TimeFromNow / 1m), ' seconds'), TimeFromNow < 2h, strcat(toint(TimeFromNow / 1m), ' minutes'), TimeFromNow < 2d, strcat(toint(TimeFromNow / 1h), ' hours'), strcat(toint(TimeFromNow / 1d), ' days')), ' ago')\n| join kind= innerunique (\nPerf\n| where ObjectName == \"Terminal Services\" and\n(CounterName == \"Active Sessions\")\n| extend ActiveSessions = toint(CounterValue)\n| project Computer, ActiveTimeStamp=TimeGenerated, ActiveSessions\n| join kind=inner (\nPerf\n| where ObjectName == \"Terminal Services\" and CounterName == \"Inactive Sessions\"\n| extend totalinactivesessions = toint(CounterValue)\n| extend InactiveSessions = totalinactivesessions -2\n| project Computer, InactiveTimeStamp=TimeGenerated, InactiveSessions\n) on Computer\n| where (ActiveTimeStamp - InactiveTimeStamp) between (0min .. 15s)\n| summarize arg_max(ActiveTimeStamp, *) by Computer\n| project ActiveSessions, InactiveSessions, Computer\n) on Computer\n| join kind=inner(\nWVDConnections\n| extend Computer = SessionHostName, _ResourceId, SessionHostOSDescription, SessionHostName\n| project _ResourceId, SessionHostOSDescription, SessionHostName, Computer\n) on Computer\n| join (\nPerf\n| where ObjectName == \"Processor\" and CounterName == \"% Processor Time\" and InstanceName!=\"_Total\"\n| extend vCPU=InstanceName\n| summarize dcount(vCPU) by Computer, bin(TimeGenerated, 5m)\n| project Computer, dcount_vCPU\n) on Computer\n| join (\nHeartbeat\n| where TimeGenerated {TimeRange:query}\n| extend Packed = pack_all()\n) on Computer\n| where TimeGenerated == LastHeartbeat\n| join (\nHeartbeat\n| where TimeGenerated {TimeRange:query}\n| make-series InternalTrend=iff(count() > 0, 1, 0) default = 0 on TimeGenerated from {TimeRange:start} to {TimeRange:end} step {UnhealthyCriteria} by Computer\n| extend Trend=array_slice(InternalTrend, array_length(InternalTrend) - 30, array_length(InternalTrend)-1)\n| extend (s_min, s_minId, s_max, s_maxId, s_avg, s_var, s_stdev) = series_stats(Trend)\n| project Computer, Trend, s_avg\n) on Computer\n| extend TotalUserSessions = ActiveSessions + InactiveSessions\n| extend MaxSessions = dcount_vCPU * {HostLoad}\n| extend Computer, SessionHostName\n| order by State, s_avg asc, TimeAgo\n| project [\"Host Pool\"]=_ResourceId, [\"Computer Name\"]= SessionHostName, [\"vCPU Count\"]=dcount_vCPU, State, [\"Resource Group\"] =ResourceGroup , MaxSessions, [\"Total Sessions\"]=TotalUserSessions, [\"Active Sessions\"] =ActiveSessions, [\"Inactive Sessions\"] =InactiveSessions, [\"Host OS\"]=SessionHostOSDescription, [\"Log Analytics Checkin\"]=strcat('🕒 ', TimeAgo), [\"Heartbeat Trend\"]=Trend, Computer, [\"Details\"]=Packed",
"size": 1,
"title": "Select one for some additional info below",
"exportFieldName": "Computer",
"exportParameterName": "Computer",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"gridSettings": {
"formatters": [
{
"columnMatch": "$gen_group",
"formatter": 13,
"formatOptions": {
"linkTarget": "Resource",
"showIcon": true
}
},
{
"columnMatch": "Host Pool",
"formatter": 5,
"formatOptions": {}
},
{
"columnMatch": "Computer Name",
"formatter": 16,
"formatOptions": {
"linkColumn": "Details",
"linkTarget": "CellDetails",
"linkIsContextBlade": true,
"showIcon": false
}
},
{
"columnMatch": "State",
"formatter": 18,
"formatOptions": {
"thresholdsOptions": "icons",
"thresholdsGrid": [
{
"operator": "==",
"thresholdValue": "Healthy",
"representation": "success",
"text": "Healthy"
},
{
"operator": "==",
"thresholdValue": "Unhealthy",
"representation": "3",
"text": "Unhealthy"
},
{
"operator": "Default",
"thresholdValue": null,
"representation": "unknown",
"text": ""
}
]
}
},
{
"columnMatch": "Heartbeat Trend",
"formatter": 10,
"formatOptions": {
"palette": "blue"
}
},
{
"columnMatch": "Computer",
"formatter": 5,
"formatOptions": {}
}
],
"hierarchySettings": {
"treeType": 1,
"groupBy": [
"Host Pool"
],
"expandTopLevel": true
}
}
},
"conditionalVisibility": {
"parameterName": "selectedTab",
"comparison": "isEqualTo",
"value": "WVDMonitoring"
},
"name": "query - 2"
},
{
"type": 12,
"content": {
"version": "NotebookGroup/1.0",
"groupType": "editable",
"items": [
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "//Find Top processes utilizing CPU\r\n// by finding the machine(s) using over 1% of CPU and 0% avg\r\n// then finding the processes using the CPU\r\n// also finding CPU count of the machines to find the actual percentage of CPU being used\r\n//defining our CPU threshold\r\nlet CPUThreshold = 1;\r\n//define time sample rate\r\nlet Time = 10m;\r\n//let Computer = {Computer};\r\n//define Count of processes to return\r\nlet Count = 10;\r\n//Find instances of total cpu being used above 90% over the last 10 minutes\r\nlet TopCPU = Perf\r\n| where Computer == \"{Computer}\"\r\n| where TimeGenerated > now(-Time)\r\n and ObjectName == \"Processor\"\r\n and CounterName == \"% Processor Time\"\r\n and InstanceName == \"_Total\"\r\n and CounterValue > CPUThreshold\r\n| project Computer, ObjectName, CounterName, CounterValue, TimeGenerated;\r\n//end query\r\n// find top Processes, excluding _Total and Idle instances, there may be other instances you want to exclude as well\r\nlet TopProcess = Perf\r\n| where Computer == \"{Computer}\"\r\n| where TimeGenerated > now(-Time)\r\n and CounterName == \"% Processor Time\"\r\n and InstanceName != \"_Total\"\r\n and InstanceName != \"Idle\"\r\n| project Computer, ObjectName\r\n , CounterName, InstanceName\r\n , CounterValue, TimeGenerated;\r\n// end query\r\n// find CPU count for servers(s)\r\nlet FindCPU = Perf\r\n| where Computer == \"{Computer}\"\r\n| where TimeGenerated >= ago(1h)\r\n| where ObjectName == \"Processor\"\r\n and CounterName == \"% Processor Time\"\r\n and InstanceName!=\"_Total\"\r\n| sort by InstanceName asc nulls first\r\n| summarize CPUCount = dcount(InstanceName) by Computer;\r\n// end query\r\n//Join all 3 datasets together\r\nFindCPU | join(TopCPU) on Computer \r\n| join(TopProcess)on Computer\r\n| extend PercentProcessorUsed = CounterValue1 / CPUCount\r\n| summarize avg(PercentProcessorUsed) by Computer, ObjectName\r\n , CounterName, CPUCount \r\n , TotalCPU=CounterValue //rename CounterValue to TotalCPU \r\n , Process=ObjectName1 //rename ObjectName1 to Process \r\n , ProcessTime=CounterName1 //rename CounterName1 to ProcessTime \r\n , ProcessName=InstanceName //rename InstanceName to ProcessName \r\n , TimeGenerated\r\n| where Process == \"Process\"\r\nand avg_PercentProcessorUsed > 0 // only return processes that are using more than 25%\r\n| top Count by avg_PercentProcessorUsed desc\r\n| project Computer, CPUCount\r\n , ProcessName , avg_PercentProcessorUsed\r\n , TotalCPU, Process\r\n , ProcessTime, TimeGenerated",
"size": 0,
"title": "CPU Top Processes utilising CPU",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"gridSettings": {
"sortBy": [
{
"itemKey": "Computer",
"sortOrder": 1
}
]
},
"sortBy": [
{
"itemKey": "Computer",
"sortOrder": 1
}
]
},
"name": "query - 6 - Copy"
}
]
},
"conditionalVisibility": {
"parameterName": "selectedTab",
"comparison": "isEqualTo",
"value": "WVDMonitoring"
},
"name": "group - 11"
},
{
"type": 12,
"content": {
"version": "NotebookGroup/1.0",
"groupType": "editable",
"items": [
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDErrors\r\n| where ServiceError ==\"false\"\r\n| summarize usercount = count(UserName) by CodeSymbolic\r\n| project CodeSymbolic, usercount\r\n| sort by usercount desc\r\n| render barchart",
"size": 1,
"title": "WVD Errors - All Users (Select one to view details)",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"exportFieldName": "label",
"exportParameterName": "label",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"chartSettings": {
"xSettings": {},
"ySettings": {}
}
},
"name": "query - 1"
},
{
"type": 12,
"content": {
"version": "NotebookGroup/1.0",
"groupType": "editable",
"title": "Errors and Alerts",
"items": [
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDErrors\r\n//| where UserName == \"[email protected]\"\r\n| where CodeSymbolic == \"{label}\"\r\n| project TimeGenerated, CorrelationId, UserName, ActivityType, Source, Code, CodeSymbolic, Message, ServiceError, _ResourceId\r\n| take 20\r\n| sort by TimeGenerated desc\r\n",
"size": 1,
"title": "WVD Errors - Latest 20 results",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"gridSettings": {
"sortBy": [
{
"itemKey": "TimeGenerated",
"sortOrder": 1
}
]
},
"sortBy": [
{
"itemKey": "TimeGenerated",
"sortOrder": 1
}
]
},
"name": "query - 0"
}
]
},
"name": "group - 11"
}
]
},
"conditionalVisibility": {
"parameterName": "selectedTab",
"comparison": "isEqualTo",
"value": "WVDDiagnostics"
},
"name": "group - wvderrors"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDConnections\r\n| project-away TenantId,SourceSystem\r\n| summarize arg_max(TimeGenerated, *), StartTime = min(iff(State== 'Started', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State== 'Connected', TimeGenerated , datetime(null) )) by CorrelationId\r\n| join kind=leftouter (\r\n WVDErrors\r\n |summarize Errors=makelist(pack('Code', Code, 'CodeSymbolic', CodeSymbolic, 'Time', TimeGenerated, 'Message', Message ,'ServiceError', ServiceError, 'Source', Source)) by CorrelationId\r\n ) on CorrelationId \r\n| join kind=leftouter (\r\n WVDCheckpoints\r\n | summarize Checkpoints=makelist(pack('Time', TimeGenerated, 'Name', Name, 'Parameters', Parameters, 'Source', Source)) by CorrelationId\r\n | mv-apply Checkpoints on\r\n (\r\n order by todatetime(Checkpoints['Time']) asc\r\n | summarize Checkpoints=makelist(Checkpoints)\r\n )\r\n ) on CorrelationId\r\n| project-away CorrelationId1, CorrelationId2\r\n| order by TimeGenerated desc",
"size": 0,
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 10 - Copy"
},
{
"type": 12,
"content": {
"version": "NotebookGroup/1.0",
"groupType": "editable",
"title": "Session History Group (expand to view)",
"expandable": true,
"expanded": true,
"items": [
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDConnections\r\n| where State == \"Connected\"\r\n| project CorrelationId , UserName, ResourceAlias , StartTime=TimeGenerated\r\n| join (WVDConnections\r\n| where State == \"Completed\"\r\n| project EndTime=TimeGenerated, CorrelationId)\r\non CorrelationId\r\n| project Duration = EndTime - StartTime, ResourceAlias, UserName , StartTime, EndTime\r\n| limit 10\r\n| sort by Duration asc",
"size": 1,
"title": "Recently Completed Logon Durations",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"customWidth": "50",
"name": "query - 11"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "//let Events = WVDConnections | where UserName == \"[email protected]\" ;\r\n\r\n//Events\r\nWVDConnections\r\n| where State == \"Connected\"\r\n\r\n| project CorrelationId , UserName, ResourceAlias , StartTime=TimeGenerated\r\n\r\n| join (WVDConnections\r\n\r\n| where State == \"Completed\"\r\n\r\n| project EndTime=TimeGenerated, CorrelationId)\r\n\r\non CorrelationId\r\n| extend DurationTotal = EndTime - StartTime\r\n| summarize TimeConnected = avg(DurationTotal)\r\n//| extend toint(TimeConnected)\r\n| project [\"Average Connection Time\"]=TimeConnected\r\n\r\n\r\n//| summarize avg(Duration) by Duration\r\n//| sort by Duration asc",
"size": 4,
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces",
"visualization": "table",
"tileSettings": {
"titleContent": {
"formatOptions": {}
},
"leftContent": {
"columnMatch": "Average Connection Time",
"formatter": 2,
"formatOptions": {},
"numberFormat": {
"unit": 0,
"options": {
"style": "decimal"
}
}
},
"showBorder": false,
"size": "auto"
}
},
"customWidth": "20",
"name": "query - 13"
},
{
"type": 1,
"content": {
"json": "Test {Computer}"
},
"name": "text - 2"
}
]
},
"conditionalVisibility": {
"parameterName": "selectedTab",
"comparison": "isEqualTo",
"value": "WVDDiagnostics"
},
"name": "Session History Group",
"styleSettings": {
"showBorder": true
}
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "WVDConnections\r\n| project SessionHostName, _ResourceId, SessionHostOSDescription\r\n//| project-away CorrelationId1, CorrelationId2\r\n//| order by TimeGenerated desc",
"size": 0,
"title": "Dummy Query for Now",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"conditionalVisibility": {
"parameterName": "selectedTab",
"comparison": "isEqualTo",
"value": "Unfinished"
},
"customWidth": "50",
"name": "query - 10 - Copy - Copy"
}
],
"styleSettings": {
"paddingStyle": "none",
"spacingStyle": "none"
},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}