groups:
  - name: disk_root
    rules:
      - alert: OutOfDiskSpace
        expr: (100 - ((node_filesystem_avail_bytes{mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{mountpoint="/",fstype!="rootfs"})) > 75
        for: 10m
        labels:
          severity: warning
        annotations:
          summary: "Instance {{ $labels.hostname }} is running out of disk space"
          description: "Instance {{ $labels.hostname }} has its root partition 75% full since 10 minutes"
      - alert: OutOfDiskSpace
        expr: (100 - ((node_filesystem_avail_bytes{mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{mountpoint="/",fstype!="rootfs"})) > 90
        for: 10m
        labels:
          severity: critical
        annotations:
          summary: "Instance {{ $labels.hostname }} is critically running out of disk space"
          description: "Instance {{ $labels.hostname }} has its root partition 90% full since 10 minutes"

  - name: disk_vitam
    rules:
      - alert: OutOfDiskSpace
        expr: (100 - ((node_filesystem_avail_bytes{mountpoint="/vitam"} * 100) / node_filesystem_size_bytes{mountpoint="/vitam"})) > 75
        for: 10m
        labels:
          severity: warning
        annotations:
          summary: "Instance {{ $labels.hostname }} is running out of disk space"
          description: "Instance {{ $labels.hostname }} has its Vitam partition 75% full since 10 minutes"
      - alert: OutOfDiskSpace
        expr: (100 - ((node_filesystem_avail_bytes{mountpoint="/vitam"} * 100) / node_filesystem_size_bytes{mountpoint="/vitam"})) > 90
        for: 10m
        labels:
          severity: critical
        annotations:
          summary: "Instance {{ $labels.hostname }} is critically running out of disk space"
          description: "Instance {{ $labels.hostname }} has its Vitam partition 90% full since 10 minutes"

