2018-05-08 12:10:29 +02:00
|
|
|
{
|
|
|
|
prometheusAlerts+:: {
|
|
|
|
groups+: [
|
|
|
|
{
|
2018-08-06 10:41:18 +02:00
|
|
|
name: 'node-exporter',
|
2018-05-08 12:10:29 +02:00
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemSpaceFillingUp',
|
|
|
|
expr: |||
|
2018-11-19 16:11:37 +01:00
|
|
|
predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 24*60*60) < 0
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-11-19 16:11:37 +01:00
|
|
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.4
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'warning',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} is predicted to run out of space within the next 24 hours.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemSpaceFillingUp',
|
|
|
|
expr: |||
|
2018-11-19 16:11:37 +01:00
|
|
|
predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 4*60*60) < 0
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-11-19 16:11:37 +01:00
|
|
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.2
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'critical',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} is predicted to run out of space within the next 4 hours.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemOutOfSpace',
|
|
|
|
expr: |||
|
2018-11-19 16:11:37 +01:00
|
|
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 5
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'warning',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ $value }}% available space left.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemOutOfSpace',
|
|
|
|
expr: |||
|
2018-11-19 16:11:37 +01:00
|
|
|
node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 3
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'critical',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ $value }}% available space left.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemFilesFillingUp',
|
|
|
|
expr: |||
|
2018-07-13 15:01:01 +02:00
|
|
|
predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 24*60*60) < 0
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.4
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'warning',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} is predicted to run out of files within the next 24 hours.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemFilesFillingUp',
|
|
|
|
expr: |||
|
2018-07-13 15:01:01 +02:00
|
|
|
predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s}[6h], 4*60*60) < 0
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} < 0.2
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
2018-11-19 16:11:37 +01:00
|
|
|
severity: 'critical',
|
2018-05-08 12:10:29 +02:00
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} is predicted to run out of files within the next 4 hours.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemOutOfFiles',
|
|
|
|
expr: |||
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 5
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'warning',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ $value }}% available inodes left.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeFilesystemOutOfSpace',
|
|
|
|
expr: |||
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelectors)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelectors)s} * 100 < 3
|
2018-05-10 10:35:35 +02:00
|
|
|
and
|
2018-07-13 15:01:01 +02:00
|
|
|
node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelectors)s} == 0
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'critical',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ $value }}% available space left.',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeNetworkReceiveErrs',
|
|
|
|
expr: |||
|
2018-11-19 16:11:37 +01:00
|
|
|
increase(node_network_receive_errs_total[2m]) > 10
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'critical',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: '{{ $labels.instance }} interface {{ $labels.device }} shows errors while receiving packets ({{ $value }} errors in two minutes).',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
alert: 'NodeNetworkTransmitErrs',
|
|
|
|
expr: |||
|
2018-11-19 16:11:37 +01:00
|
|
|
increase(node_network_transmit_errs_total[2m]) > 10
|
2018-05-08 12:10:29 +02:00
|
|
|
||| % $._config,
|
|
|
|
'for': '1h',
|
|
|
|
labels: {
|
|
|
|
severity: 'critical',
|
|
|
|
},
|
|
|
|
annotations: {
|
|
|
|
message: '{{ $labels.instance }} interface {{ $labels.device }} shows errors while transmitting packets ({{ $value }} errors in two minutes).',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|