mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
docs/node-mixin: move fsSelector and diskDeviceSelector to the end of query
This will cause a query to be valid even if values of selector are empty. Additionally fixing query responsible for disk space usage. Signed-off-by: paulfantom <pawel@krupa.net.pl>
This commit is contained in:
parent
106b09b4ed
commit
c41826274d
|
@ -87,9 +87,9 @@ local gauge = promgrafonnet.gauge;
|
||||||
)
|
)
|
||||||
// TODO: Does it make sense to have those three in the same panel?
|
// TODO: Does it make sense to have those three in the same panel?
|
||||||
// TODO: Consider using `${__interval}` as range and a 1m min step.
|
// TODO: Consider using `${__interval}` as range and a 1m min step.
|
||||||
.addTarget(prometheus.target('rate(node_disk_read_bytes_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s, instance="$instance"}[1m])' % $._config, legendFormat='{{device}} read'))
|
.addTarget(prometheus.target('rate(node_disk_read_bytes_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[1m])' % $._config, legendFormat='{{device}} read'))
|
||||||
.addTarget(prometheus.target('rate(node_disk_written_bytes_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s, instance="$instance"}[1m])' % $._config, legendFormat='{{device}} written'))
|
.addTarget(prometheus.target('rate(node_disk_written_bytes_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[1m])' % $._config, legendFormat='{{device}} written'))
|
||||||
.addTarget(prometheus.target('rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s, instance="$instance"}[1m])' % $._config, legendFormat='{{device}} io time')) +
|
.addTarget(prometheus.target('rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[1m])' % $._config, legendFormat='{{device}} io time')) +
|
||||||
{
|
{
|
||||||
seriesOverrides: [
|
seriesOverrides: [
|
||||||
{
|
{
|
||||||
|
@ -115,9 +115,9 @@ local gauge = promgrafonnet.gauge;
|
||||||
|||
|
|||
|
||||||
100 -
|
100 -
|
||||||
(
|
(
|
||||||
sum(node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"}
|
sum(node_filesystem_avail_bytes{%(nodeExporterSelector)s, instance="$instance", %(fsSelector)s})
|
||||||
/
|
/
|
||||||
sum(node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"}
|
sum(node_filesystem_size_bytes{%(nodeExporterSelector)s, instance="$instance", %(fsSelector)s})
|
||||||
* 100
|
* 100
|
||||||
)
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
|
|
Loading…
Reference in a new issue