mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-12 16:44:18 -08:00
Fix indentation
Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
parent
9d7045e483
commit
dec5b5b053
|
@ -7,11 +7,13 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemSpaceFillingUp',
|
alert: 'NodeFilesystemSpaceFillingUp',
|
||||||
expr: |||
|
expr: |||
|
||||||
predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 24*60*60) < 0
|
(
|
||||||
|
predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 24*60*60) < 0
|
||||||
and
|
and
|
||||||
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.4
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.4
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -24,11 +26,13 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemSpaceFillingUp',
|
alert: 'NodeFilesystemSpaceFillingUp',
|
||||||
expr: |||
|
expr: |||
|
||||||
predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 4*60*60) < 0
|
(
|
||||||
|
predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 4*60*60) < 0
|
||||||
and
|
and
|
||||||
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.2
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.2
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -41,9 +45,11 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemOutOfSpace',
|
alert: 'NodeFilesystemOutOfSpace',
|
||||||
expr: |||
|
expr: |||
|
||||||
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 5
|
(
|
||||||
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 5
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -56,9 +62,11 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemOutOfSpace',
|
alert: 'NodeFilesystemOutOfSpace',
|
||||||
expr: |||
|
expr: |||
|
||||||
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 3
|
(
|
||||||
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 3
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -71,11 +79,13 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemFilesFillingUp',
|
alert: 'NodeFilesystemFilesFillingUp',
|
||||||
expr: |||
|
expr: |||
|
||||||
predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 24*60*60) < 0
|
(
|
||||||
|
predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 24*60*60) < 0
|
||||||
and
|
and
|
||||||
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.4
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.4
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -88,11 +98,13 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemFilesFillingUp',
|
alert: 'NodeFilesystemFilesFillingUp',
|
||||||
expr: |||
|
expr: |||
|
||||||
predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 4*60*60) < 0
|
(
|
||||||
|
predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 4*60*60) < 0
|
||||||
and
|
and
|
||||||
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.2
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.2
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -105,9 +117,11 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemOutOfFiles',
|
alert: 'NodeFilesystemOutOfFiles',
|
||||||
expr: |||
|
expr: |||
|
||||||
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 5
|
(
|
||||||
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 5
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
@ -120,9 +134,11 @@
|
||||||
{
|
{
|
||||||
alert: 'NodeFilesystemOutOfSpace',
|
alert: 'NodeFilesystemOutOfSpace',
|
||||||
expr: |||
|
expr: |||
|
||||||
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 3
|
(
|
||||||
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 3
|
||||||
and
|
and
|
||||||
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '1h',
|
'for': '1h',
|
||||||
labels: {
|
labels: {
|
||||||
|
|
|
@ -47,10 +47,15 @@ local gauge = promgrafonnet.gauge;
|
||||||
)
|
)
|
||||||
.addTarget(prometheus.target(
|
.addTarget(prometheus.target(
|
||||||
|||
|
|||
|
||||||
node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"}
|
(
|
||||||
- node_memory_MemFree{%(nodeExporterSelector)s, instance="$instance"}
|
node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
- node_memory_Buffers{%(nodeExporterSelector)s, instance="$instance"}
|
-
|
||||||
- node_memory_Cached{%(nodeExporterSelector)s, instance="$instance"}
|
node_memory_MemFree{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
|
-
|
||||||
|
node_memory_Buffers{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
|
-
|
||||||
|
node_memory_Cached{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
|
)
|
||||||
||| % $._config, legendFormat='memory used'
|
||| % $._config, legendFormat='memory used'
|
||||||
))
|
))
|
||||||
.addTarget(prometheus.target('node_memory_Buffers{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='memory buffers'))
|
.addTarget(prometheus.target('node_memory_Buffers{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='memory buffers'))
|
||||||
|
@ -60,10 +65,12 @@ local gauge = promgrafonnet.gauge;
|
||||||
local memoryGauge = gauge.new(
|
local memoryGauge = gauge.new(
|
||||||
'Memory Usage',
|
'Memory Usage',
|
||||||
|||
|
|||
|
||||||
node_memory_MemAvailable{%(nodeExporterSelector)s, instance="$instance"}
|
(
|
||||||
|
node_memory_MemAvailable{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
/
|
/
|
||||||
node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"}
|
node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
* 100
|
)
|
||||||
|
* 100
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
).withLowerBeingBetter();
|
).withLowerBeingBetter();
|
||||||
|
|
||||||
|
@ -96,11 +103,13 @@ local gauge = promgrafonnet.gauge;
|
||||||
local diskSpaceUsage = gauge.new(
|
local diskSpaceUsage = gauge.new(
|
||||||
'Disk Space Usage',
|
'Disk Space Usage',
|
||||||
|||
|
|||
|
||||||
100 - (
|
100 -
|
||||||
sum(node_filesystem_free{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
(
|
||||||
/
|
sum(node_filesystem_free{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
||||||
sum(node_filesystem_size{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
/
|
||||||
) * 100
|
sum(node_filesystem_size{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
||||||
|
* 100
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
).withLowerBeingBetter();
|
).withLowerBeingBetter();
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,7 @@ local g = import 'grafana-builder/grafana.libsonnet';
|
||||||
g.panel('Disk IO Utilisation') +
|
g.panel('Disk IO Utilisation') +
|
||||||
// Full utilisation would be all disks on each node spending an average of
|
// Full utilisation would be all disks on each node spending an average of
|
||||||
// 1 sec per second doing I/O, normalize by node count for stacked charts
|
// 1 sec per second doing I/O, normalize by node count for stacked charts
|
||||||
g.queryPanel(|||
|
g.queryPanel('instance:node_disk_utilisation:sum_irate / scalar(sum(up{%(nodeExporterSelector)s}))' % $._config, '{{instance}}', legendLink) +
|
||||||
instance:node_disk_utilisation:sum_irate / scalar(sum(up{%(nodeExporterSelector)s}))
|
|
||||||
||| % $._config, '{{instance}}', legendLink) +
|
|
||||||
g.stack +
|
g.stack +
|
||||||
{ yaxes: g.yaxes({ format: 'percentunit', max: 1 }) },
|
{ yaxes: g.yaxes({ format: 'percentunit', max: 1 }) },
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,9 +29,11 @@
|
||||||
// Can go over 100%. >100% is bad.
|
// Can go over 100%. >100% is bad.
|
||||||
record: 'instance:node_cpu_saturation_load1:',
|
record: 'instance:node_cpu_saturation_load1:',
|
||||||
expr: |||
|
expr: |||
|
||||||
sum by (instance) (node_load1{%(nodeExporterSelector)s})
|
(
|
||||||
|
sum by (instance) (node_load1{%(nodeExporterSelector)s})
|
||||||
/
|
/
|
||||||
instance:node_num_cpu:sum
|
instance:node_num_cpu:sum
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -48,9 +50,9 @@
|
||||||
record: 'instance:node_memory_utilisation:ratio',
|
record: 'instance:node_memory_utilisation:ratio',
|
||||||
expr: |||
|
expr: |||
|
||||||
1 - (
|
1 - (
|
||||||
node_memory_MemAvailable_bytes{%(nodeExporterSelector)s}
|
node_memory_MemAvailable_bytes{%(nodeExporterSelector)s}
|
||||||
/
|
/
|
||||||
node_memory_MemTotal_bytes{%(nodeExporterSelector)s}
|
node_memory_MemTotal_bytes{%(nodeExporterSelector)s}
|
||||||
)
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
},
|
},
|
||||||
|
@ -58,8 +60,9 @@
|
||||||
record: 'instance:node_memory_swap_io_bytes:sum_rate',
|
record: 'instance:node_memory_swap_io_bytes:sum_rate',
|
||||||
expr: |||
|
expr: |||
|
||||||
1e3 * sum by (instance) (
|
1e3 * sum by (instance) (
|
||||||
(rate(node_vmstat_pgpgin{%(nodeExporterSelector)s}[1m])
|
rate(node_vmstat_pgpgin{%(nodeExporterSelector)s}[1m])
|
||||||
+ rate(node_vmstat_pgpgout{%(nodeExporterSelector)s}[1m]))
|
+
|
||||||
|
rate(node_vmstat_pgpgout{%(nodeExporterSelector)s}[1m])
|
||||||
)
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
},
|
},
|
||||||
|
@ -85,8 +88,9 @@
|
||||||
record: 'instance:node_net_utilisation:sum_irate',
|
record: 'instance:node_net_utilisation:sum_irate',
|
||||||
expr: |||
|
expr: |||
|
||||||
sum by (instance) (
|
sum by (instance) (
|
||||||
(irate(node_network_receive_bytes_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m]) +
|
irate(node_network_receive_bytes_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m])
|
||||||
irate(node_network_transmit_bytes_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m]))
|
+
|
||||||
|
irate(node_network_transmit_bytes_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m])
|
||||||
)
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
},
|
},
|
||||||
|
@ -94,8 +98,9 @@
|
||||||
record: 'instance:node_net_saturation:sum_irate',
|
record: 'instance:node_net_saturation:sum_irate',
|
||||||
expr: |||
|
expr: |||
|
||||||
sum by (instance) (
|
sum by (instance) (
|
||||||
(irate(node_network_receive_drop_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m]) +
|
irate(node_network_receive_drop_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m])
|
||||||
irate(node_network_transmit_drop_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m]))
|
+
|
||||||
|
irate(node_network_transmit_drop_total{%(nodeExporterSelector)s,device=~"eth[0-9]+"}[1m])
|
||||||
)
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue