Skip to content

Commit

Permalink
Merge disk and filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
v-zhuravlev committed Sep 27, 2023
1 parent 65eb5d4 commit a15b493
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 34 deletions.
2 changes: 1 addition & 1 deletion common-lib/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Common lib

This logs lib can be used to generate dashboards using [grafonnet](https://github.com/grafana/grafonnet).
This common lib can be used to generate dashboards using [grafonnet](https://github.com/grafana/grafonnet).

This enforces 'common style' to different panels.

Expand Down
7 changes: 2 additions & 5 deletions common-lib/common/panels.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ local g = import './g.libsonnet';
stat: import './panels/memory/stat/main.libsonnet',
timeSeries: import './panels/memory/timeSeries/main.libsonnet',
},
filesystem: {
timeSeries: import './panels/filesystem/timeSeries/main.libsonnet',
table: import './panels/filesystem/table/main.libsonnet',
stat: import './panels/filesystem/stat/main.libsonnet',
},
disk: {
timeSeries: import './panels/disk/timeSeries/main.libsonnet',
table: import './panels/disk/table/main.libsonnet',
stat: import './panels/disk/stat/main.libsonnet',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local defaults = timeSeries.fieldConfig.defaults;
local options = timeSeries.options;
base {
new(
title='Filesystem space available',
title='Disk space available',
targets,
description='',
):
Expand Down
6 changes: 4 additions & 2 deletions common-lib/common/panels/disk/timeSeries/base.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local g = import '../../../g.libsonnet';
local base = import '../../all/timeSeries/base.libsonnet';
local base = import '../../all/timeSeries/main.libsonnet';
local timeSeries = g.panel.timeSeries;
local fieldOverride = g.panel.timeSeries.fieldOverride;
local custom = timeSeries.fieldConfig.defaults.custom;
Expand All @@ -11,7 +11,9 @@ base {
targets,
description=''
):
super.new(title, targets, description),
super.base.new(title, targets, description)
// Decrease opacity (would look better with too many timeseries)
+ g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(1),

withNegateOutPackets(regexp='/write|written/'):
defaults.custom.withAxisLabel('write(-) | read(+)')
Expand Down
3 changes: 3 additions & 0 deletions common-lib/common/panels/disk/timeSeries/main.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
iops: import './iops.libsonnet',
ioQueue: import './io_queue.libsonnet',
ioWaitTime: import './io_wait_time.libsonnet',
available: import './available.libsonnet',
usage: import './usage.libsonnet',
usagePercent: import './usage_percent.libsonnet',
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local defaults = timeSeries.fieldConfig.defaults;
local options = timeSeries.options;
base {
new(
title='Filesystem space used',
title='Disk space used',
targets,
description=|||
Disk space usage is the amount of storage being used on a device's hard drive or storage medium, in bytes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local defaults = timeSeries.fieldConfig.defaults;
local options = timeSeries.options;
base {
new(
title='Filesystem space used, %',
title='Disk space used, %',
targets,
description=|||
Disk space usage is the amount of storage being used on a device's hard drive or storage medium, in percent.
Expand Down
17 changes: 0 additions & 17 deletions common-lib/common/panels/filesystem/timeSeries/base.libsonnet

This file was deleted.

6 changes: 0 additions & 6 deletions common-lib/common/panels/filesystem/timeSeries/main.libsonnet

This file was deleted.

0 comments on commit a15b493

Please sign in to comment.