-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement: merge resource dashboards for ssd into resources-overvie…
…w dashboard
- Loading branch information
1 parent
6ea83b4
commit af73de5
Showing
10 changed files
with
1,426 additions
and
1,343 deletions.
There are no files selected for viewing
657 changes: 0 additions & 657 deletions
657
production/loki-mixin-compiled-ssd/dashboards/loki-reads-resources.json
This file was deleted.
Oops, something went wrong.
1,252 changes: 1,252 additions & 0 deletions
1,252
production/loki-mixin-compiled-ssd/dashboards/loki-resources-overview.json
Large diffs are not rendered by default.
Oops, something went wrong.
584 changes: 0 additions & 584 deletions
584
production/loki-mixin-compiled-ssd/dashboards/loki-writes-resources.json
This file was deleted.
Oops, something went wrong.
64 changes: 30 additions & 34 deletions
64
production/loki-mixin-compiled/dashboards/loki-reads-resources.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
production/loki-mixin/dashboards/loki-resources-overview.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
(import 'dashboard-utils.libsonnet') { | ||
local read_pod_matcher = 'container="loki", pod=~"%s-read.*"' % $._config.ssd.pod_prefix_matcher, | ||
local read_job_matcher = '%s-read' % $._config.ssd.pod_prefix_matcher, | ||
|
||
local write_pod_matcher = 'container="loki", pod=~"%s-write.*"' % $._config.ssd.pod_prefix_matcher, | ||
local write_job_matcher = '%s-write' % $._config.ssd.pod_prefix_matcher, | ||
|
||
local backend_pod_matcher = 'container="loki", pod=~"%s-backend.*"' % $._config.ssd.pod_prefix_matcher, | ||
local backend_job_matcher = '%s-backend' % $._config.ssd.pod_prefix_matcher, | ||
|
||
// This dashboard is for the single scalable deployment only and it : | ||
// - replaces the loki-reads-resources dashboards | ||
// - replaces the loki-write-resources dashboards | ||
// - adds backend pods resources | ||
grafanaDashboards+:: if !$._config.ssd.enabled then {} else { | ||
'loki-resources-overview.json': | ||
($.dashboard('Loki / Resources Overview', uid='resources-overview')) | ||
.addCluster() | ||
.addNamespace() | ||
.addTag() | ||
.addRow( | ||
// The read path does not display disk utilization as the index gateway is present in the backend pods. | ||
$.row('Read path') | ||
.addPanel( | ||
$.CPUUsagePanel('CPU', read_pod_matcher), | ||
) | ||
.addPanel( | ||
$.memoryWorkingSetPanel('Memory (workingset)', read_pod_matcher), | ||
) | ||
.addPanel( | ||
$.goHeapInUsePanel('Memory (go heap inuse)', read_job_matcher), | ||
) | ||
) | ||
.addRow( | ||
$.row('Write path') | ||
.addPanel( | ||
$.newQueryPanel('In-memory streams') + | ||
$.queryPanel( | ||
'sum by(%s) (loki_write_memory_streams{%s})' % [$._config.per_instance_label, $.jobMatcher(write_job_matcher)], | ||
'{{%s}}' % $._config.per_instance_label | ||
) + | ||
{ | ||
tooltip: { sort: 2 }, // Sort descending. | ||
}, | ||
) | ||
.addPanel( | ||
$.CPUUsagePanel('CPU', write_pod_matcher), | ||
) | ||
.addPanel( | ||
$.memoryWorkingSetPanel('Memory (workingset)', write_pod_matcher), | ||
) | ||
.addPanel( | ||
$.goHeapInUsePanel('Memory (go heap inuse)', write_job_matcher), | ||
) | ||
.addPanel( | ||
$.newQueryPanel('Disk Writes', 'Bps') + | ||
$.queryPanel( | ||
'sum by(%s, %s, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + %s' % [$._config.per_node_label, $._config.per_instance_label, $.filterNodeDisk(write_pod_matcher)], | ||
'{{%s}} - {{device}}' % $._config.per_instance_label | ||
) + | ||
$.withStacking, | ||
) | ||
.addPanel( | ||
$.newQueryPanel('Disk Reads', 'Bps') + | ||
$.queryPanel( | ||
'sum by(%s, %s, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + %s' % [$._config.per_node_label, $._config.per_instance_label, $.filterNodeDisk(write_pod_matcher)], | ||
'{{%s}} - {{device}}' % $._config.per_instance_label | ||
) + | ||
$.withStacking, | ||
) | ||
.addPanel( | ||
$.containerDiskSpaceUtilizationPanel('Disk Space Utilization', write_job_matcher), | ||
) | ||
) | ||
.addRow( | ||
$.row('Backend path') | ||
.addPanel( | ||
$.CPUUsagePanel('CPU', backend_pod_matcher), | ||
) | ||
.addPanel( | ||
$.memoryWorkingSetPanel('Memory (workingset)', backend_pod_matcher), | ||
) | ||
.addPanel( | ||
$.goHeapInUsePanel('Memory (go heap inuse)', backend_job_matcher), | ||
) | ||
.addPanel( | ||
$.newQueryPanel('Disk Writes', 'Bps') + | ||
$.queryPanel( | ||
'sum by(%s, %s, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + %s' % [$._config.per_node_label, $._config.per_instance_label, $.filterNodeDisk(backend_pod_matcher)], | ||
'{{%s}} - {{device}}' % $._config.per_instance_label | ||
) + | ||
$.withStacking, | ||
) | ||
.addPanel( | ||
$.newQueryPanel('Disk Reads', 'Bps') + | ||
$.queryPanel( | ||
'sum by(%s, %s, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + %s' % [$._config.per_node_label, $._config.per_instance_label, $.filterNodeDisk(backend_pod_matcher)], | ||
'{{%s}} - {{device}}' % $._config.per_instance_label | ||
) + | ||
$.withStacking, | ||
) | ||
.addPanel( | ||
$.containerDiskSpaceUtilizationPanel('Disk Space Utilization', backend_job_matcher), | ||
) | ||
), | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.