groups:
  - name: meta
    interval: 60s
    rules:
      - alert: ExporterScrapeDurationHigh
        expr: exporter_scrape_duration_seconds > 30
        for: 5m
        labels:
          severity: medium
        annotations:
          summary: "Exporter scrape of {{ $labels.target }} taking {{ $value | humanizeDuration }}"
          description: "Exporter scrape of target {{ $labels.target }} has exceeded 30 seconds for more than 5 minutes. This may indicate a slow or unresponsive monitored system."

      - alert: PrometheusStorageNearFull
        expr: prometheus_tsdb_storage_blocks_bytes / (600 * 1024 * 1024) > 0.85
        for: 1h
        labels:
          severity: medium
        annotations:
          summary: "Prometheus TSDB storage is above 85% of the 600 MB retention limit"
          description: "Prometheus block storage has been above 85% of the 600 MB retention size limit for more than 1 hour. Consider reducing retention period or increasing storage allocation."

      - alert: AlertmanagerNotificationsFailing
        expr: rate(alertmanager_notifications_failed_total[1h]) > 0
        for: 15m
        labels:
          severity: high
        annotations:
          summary: "Alertmanager is failing to deliver notifications"
          description: "Alertmanager has been recording notification delivery failures for more than 15 minutes. Alerts may not be reaching their destination. Check Alertmanager logs and receiver configuration."

      - alert: PrometheusTargetDown
        expr: up == 0
        for: 5m
        labels:
          severity: high
        annotations:
          summary: "Prometheus scrape target {{ $labels.job }} is down"
          description: "Prometheus has been unable to scrape job '{{ $labels.job }}' (instance '{{ $labels.instance }}') for more than 5 minutes. Check the target service and network connectivity."
