Skip to content

Commit bba6859

Browse files
MSSQL Server Mixin - Updates memory panels [Do Not Merge Until next Agent release] (#1100)
* Updates MSSQL mixin memory panels for overview dashboard * Update mssql-mixin/dashboards/mssql-overview.libsonnet Fix typo in mssql overview dashboard Co-authored-by: Vitaly <[email protected]> --------- Co-authored-by: Vitaly <[email protected]>
1 parent eb73188 commit bba6859

File tree

1 file changed

+96
-11
lines changed

1 file changed

+96
-11
lines changed

mssql-mixin/dashboards/mssql-overview.libsonnet

Lines changed: 96 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -416,18 +416,102 @@ local osMemoryUsagePanel = {
416416
},
417417
};
418418

419-
local memoryUtilizationPanel = {
419+
local memoryManagerPanel = {
420420
datasource: promDatasource,
421421
targets: [
422422
prometheus.target(
423-
'mssql_memory_utilization_percentage{instance=~"$instance", job=~"$job"}',
423+
'mssql_server_total_memory_bytes{instance=~"$instance", job=~"$job"}',
424+
datasource=promDatasource,
425+
legendFormat='{{instance}} - total',
426+
),
427+
prometheus.target(
428+
'mssql_server_target_memory_bytes{instance=~"$instance", job=~"$job"}',
429+
datasource=promDatasource,
430+
legendFormat='{{instance}} - target',
431+
),
432+
],
433+
type: 'timeseries',
434+
title: 'Memory manager',
435+
description: 'The committed memory and target committed memory for the SQL Server memory manager. See https://learn.microsoft.com/en-us/sql/relational-databases/performance-monitor/monitor-memory-usage?view=sql-server-ver16#isolating-memory-used-by-',
436+
fieldConfig: {
437+
defaults: {
438+
color: {
439+
mode: 'palette-classic',
440+
},
441+
custom: {
442+
axisCenteredZero: false,
443+
axisColorMode: 'text',
444+
axisLabel: '',
445+
axisPlacement: 'auto',
446+
barAlignment: 0,
447+
drawStyle: 'line',
448+
fillOpacity: 51,
449+
gradientMode: 'none',
450+
hideFrom: {
451+
legend: false,
452+
tooltip: false,
453+
viz: false,
454+
},
455+
lineInterpolation: 'linear',
456+
lineStyle: {
457+
fill: 'solid',
458+
},
459+
lineWidth: 1,
460+
pointSize: 5,
461+
scaleDistribution: {
462+
type: 'linear',
463+
},
464+
showPoints: 'auto',
465+
spanNulls: false,
466+
stacking: {
467+
group: 'A',
468+
mode: 'normal',
469+
},
470+
thresholdsStyle: {
471+
mode: 'off',
472+
},
473+
},
474+
mappings: [],
475+
min: 0,
476+
thresholds: {
477+
mode: 'absolute',
478+
steps: [
479+
{
480+
color: 'green',
481+
value: null,
482+
},
483+
],
484+
},
485+
unit: 'bytes',
486+
},
487+
overrides: [],
488+
},
489+
options: {
490+
legend: {
491+
calcs: [],
492+
displayMode: 'list',
493+
placement: 'bottom',
494+
showLegend: true,
495+
},
496+
tooltip: {
497+
mode: 'multi',
498+
sort: 'none',
499+
},
500+
},
501+
};
502+
503+
local committedMemoryUtilizationPanel = {
504+
datasource: promDatasource,
505+
targets: [
506+
prometheus.target(
507+
'100 * mssql_server_total_memory_bytes{instance=~"$instance", job=~"$job"} / clamp_min(mssql_available_commit_memory_bytes{instance=~"$instance", job=~"$job"},1)',
424508
datasource=promDatasource,
425509
legendFormat='{{instance}}',
426510
),
427511
],
428512
type: 'gauge',
429-
title: 'Memory utilization',
430-
description: 'Utilization of memory being used from the working set.',
513+
title: 'Committed memory utilization',
514+
description: 'The committed memory utilization',
431515
fieldConfig: {
432516
defaults: {
433517
color: {
@@ -813,17 +897,18 @@ local transactionLogExpansionsPanel = {
813897
batchRequestsPanel { gridPos: { h: 8, w: 12, x: 12, y: 0 } },
814898
severeErrorsPanel { gridPos: { h: 8, w: 12, x: 0, y: 8 } },
815899
deadlocksPanel { gridPos: { h: 8, w: 12, x: 12, y: 8 } },
816-
osMemoryUsagePanel { gridPos: { h: 8, w: 16, x: 0, y: 16 } },
817-
memoryUtilizationPanel { gridPos: { h: 8, w: 8, x: 16, y: 16 } },
900+
osMemoryUsagePanel { gridPos: { h: 8, w: 24, x: 0, y: 16 } },
901+
memoryManagerPanel { gridPos: { h: 8, w: 16, x: 0, y: 24 } },
902+
committedMemoryUtilizationPanel { gridPos: { h: 8, w: 8, x: 16, y: 24 } },
818903
],
819904
if $._config.enableLokiLogs then [
820-
errorLogsPanel { gridPos: { h: 8, w: 24, x: 0, y: 24 } },
905+
errorLogsPanel { gridPos: { h: 8, w: 24, x: 0, y: 32 } },
821906
] else [],
822907
[
823-
databaseRow { gridPos: { h: 1, w: 24, x: 0, y: 32 } },
824-
databaseWriteStallDurationPanel { gridPos: { h: 8, w: 12, x: 0, y: 33 } },
825-
databaseReadStallDurationPanel { gridPos: { h: 8, w: 12, x: 12, y: 33 } },
826-
transactionLogExpansionsPanel { gridPos: { h: 8, w: 24, x: 0, y: 41 } },
908+
databaseRow { gridPos: { h: 1, w: 24, x: 0, y: 40 } },
909+
databaseWriteStallDurationPanel { gridPos: { h: 8, w: 12, x: 0, y: 41 } },
910+
databaseReadStallDurationPanel { gridPos: { h: 8, w: 12, x: 12, y: 41 } },
911+
transactionLogExpansionsPanel { gridPos: { h: 8, w: 24, x: 0, y: 49 } },
827912
],
828913
])
829914
),

0 commit comments

Comments
 (0)