tyo0/prometheus: simplify annotations
Two sentences describing the same thing is not very useful.
This commit is contained in:
parent
b8a31154c3
commit
efc3f4ea55
2 changed files with 4 additions and 18 deletions
|
@ -58,7 +58,6 @@
|
|||
tmpl = lib.escapeURL ''
|
||||
{{ range .alerts }}- Status: {{ .status }}
|
||||
Summary: {{ .annotations.summary }}
|
||||
Description: {{ .annotations.description }}
|
||||
Source: {{ .generatorURL }}
|
||||
{{ end }}
|
||||
'';
|
||||
|
|
|
@ -121,44 +121,31 @@ in
|
|||
alert = "NodeDown";
|
||||
expr = ''up{job="node_exporter"} == 0'';
|
||||
for = "5m";
|
||||
annotations = {
|
||||
summary = "Node exporter down on {{ $labels.instance }}";
|
||||
description = "Node exporter on {{ $labels.instance }} has been down for more than 5 minutes.";
|
||||
};
|
||||
annotations.summary = "Node exporter down on {{ $labels.instance }}";
|
||||
}
|
||||
{
|
||||
alert = "HTTPDown";
|
||||
expr = ''up{job="blackbox_probe"} == 0 or probe_success{job="blackbox_probe"} == 0'';
|
||||
for = "5m";
|
||||
annotations = {
|
||||
summary = "HTTP probe failure on {{ $labels.instance }}";
|
||||
description = "The HTTP blackbox probe on {{ $labels.instance }} has failed for more than 5 minutes.";
|
||||
};
|
||||
annotations.summary = "HTTP probe failure on {{ $labels.instance }}";
|
||||
}
|
||||
{
|
||||
alert = "MemoryFull";
|
||||
expr = ''node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1'';
|
||||
for = "5m";
|
||||
annotations = {
|
||||
summary = "Low available memory on {{ $labels.instance }}";
|
||||
description = "{{ $labels.instance }} has less than 10% available memory for more than 5 minutes.";
|
||||
};
|
||||
annotations.summary = "Low available memory on {{ $labels.instance }}";
|
||||
}
|
||||
{
|
||||
alert = "DiskFull";
|
||||
expr = ''node_filesystem_avail_bytes{mountpoint=~"/|/persist|/mnt"} / node_filesystem_size_bytes < 0.1'';
|
||||
annotations = {
|
||||
summary = "Low disk space on {{ $labels.instance }}";
|
||||
description = "The disk {{ $labels.device }} mounted at {{ $labels.mountpoint }} on {{ $labels.instance }} has less than 10% of empty space available.";
|
||||
};
|
||||
}
|
||||
{
|
||||
alert = "UnitFailed";
|
||||
expr = ''node_systemd_unit_state{state="failed"} == 1'';
|
||||
annotations = {
|
||||
summary = "Systemd unit {{ $labels.name }} failure on {{ $labels.instance }}";
|
||||
description = "The systemd unit {{ $labels.name }} on {{ $labels.instance }} has entered a {{ $labels.state }} state.";
|
||||
};
|
||||
annotations.summary = "Systemd unit {{ $labels.name }} failure on {{ $labels.instance }}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue