k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/config/prow/cluster/monitoring/mixins/prometheus/configmap_alerts.libsonnet (about)

     1  {
     2    prometheusAlerts+:: {
     3      groups+: [
     4        {
     5          name: 'configmap-full',
     6          rules: [
     7            {
     8              alert: 'ConfigMapFullInOneWeek',
     9              expr: |||
    10                100 * ((1048576 - prow_configmap_size_bytes) / 1048576) < 15
    11                and
    12                predict_linear(prow_configmap_size_bytes[24h], 7 * 24 * 3600) > 1048576
    13              |||,
    14              'for': '5m',
    15              labels: {
    16                severity: 'high',
    17              },
    18              annotations: {
    19                message: 'Based on recent sampling, the ConfigMap {{ $labels.name }} in Namespace {{ $labels.namespace }} is expected to fill up within a week. Currently {{ printf "%0.2f" $value }}% is available.',
    20              },
    21            }
    22          ],
    23        },
    24      ],
    25    },
    26  }