diff --git a/component/extracted_alerts/master/collector_prometheus_alerts.yaml b/component/extracted_alerts/master/collector_prometheus_alerts.yaml index bb4f32d..88abe1b 100644 --- a/component/extracted_alerts/master/collector_prometheus_alerts.yaml +++ b/component/extracted_alerts/master/collector_prometheus_alerts.yaml @@ -85,6 +85,17 @@ spec: labels: service: visualization severity: Warning + - alert: DiskBufferUsage + annotations: + message: "Collectors potentially consuming too much node disk, {{ $value }}% " + summary: "Detected consuming too much node disk on $labels.hostname host" + expr: | + (label_replace(sum by(hostname) (vector_buffer_byte_size{component_kind='sink', buffer_type='disk'}), 'instance', '$1', 'hostname', '(.*)') + / on(instance) group_left() sum by(instance) (node_filesystem_size_bytes{mountpoint='/var'})) * 100 > 0.15 + for: 5m + labels: + service: collector + severity: Warning - name: logging_clusterlogging_telemetry.rules rules: - expr: | diff --git a/tests/golden/master/openshift4-logging/openshift4-logging/60_collector_alerts.yaml b/tests/golden/master/openshift4-logging/openshift4-logging/60_collector_alerts.yaml index 0e06ac3..140c639 100644 --- a/tests/golden/master/openshift4-logging/openshift4-logging/60_collector_alerts.yaml +++ b/tests/golden/master/openshift4-logging/openshift4-logging/60_collector_alerts.yaml @@ -107,3 +107,18 @@ spec: severity: Warning syn: 'true' syn_component: openshift4-logging + - alert: SYN_DiskBufferUsage + annotations: + message: 'Collectors potentially consuming too much node disk, {{ $value + }}% ' + summary: Detected consuming too much node disk on $labels.hostname host + expr: "(label_replace(sum by(hostname) (vector_buffer_byte_size{component_kind='sink',\ + \ buffer_type='disk'}), 'instance', '$1', 'hostname', '(.*)') \n/ on(instance)\ + \ group_left() sum by(instance) (node_filesystem_size_bytes{mountpoint='/var'}))\ + \ * 100 > 0.15\n" + for: 5m + labels: + service: collector + severity: Warning + syn: 'true' + syn_component: openshift4-logging