Skip to content

Commit e7c2dbe

Browse files
authored
Merge pull request prometheus#1483 from s-urbaniak/fix-selectors
node-mixin: fix configuration for unset fsSelector/diskDeviceSelector and dashboard query
2 parents 7caedcc + f4417b2 commit e7c2dbe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/node-mixin/config.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
// empty, all filesystems are selected. If you have unusual
1010
// filesystem you don't want to include in dashboards and
1111
// alerting, you can exclude them here, e.g. 'fstype!="tmpfs"'.
12-
fsSelector: '',
12+
fsSelector: 'fstype!=""',
1313

1414
// Select the device for disk-related queries. If left empty, all
1515
// devices are selected. If you have unusual devices you don't
1616
// want to include in dashboards and alerting, you can exclude
1717
// them here, e.g. 'device!="tmpfs"'.
18-
diskDeviceSelector: '',
18+
diskDeviceSelector: 'device!=""',
1919

2020
// Some of the alerts are meant to fire if a critical failure of a
2121
// node is imminent (e.g. the disk is about to run full). In a

docs/node-mixin/dashboards/use.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ local g = import 'grafana-builder/grafana.libsonnet';
280280
g.queryPanel(|||
281281
1 -
282282
(
283-
max without (mountpoint, fstype) (node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"}})
283+
max without (mountpoint, fstype) (node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"})
284284
/
285-
max without (mountpoint, fstype) (node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"}})
285+
max without (mountpoint, fstype) (node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"})
286286
)
287287
||| % $._config, '{{device}}') +
288288
{

0 commit comments

Comments
 (0)