groups:
  - name: mgmt.nextgen-global-service
    rules:
      - alert: AutoRecycleResourcePoolDeletionFailed
        expr: |
          increase(delete_idle_resource_pool_failed_total[5m]) > 0
        for: 0m
        labels:
          severity: critical
          response_class: page
          component: tidb-management-service
          oncall_team: global_control
          service: nextgen-global-service
          operation_type: auto_recycle
        annotations:
          summary: "Auto recycle resource pool deletion failed"
          message: |
            The system failed to delete idle resource pools. 
            Detected **{{ $value | printf "%.0f" }}** failure(s) in the last 5 minutes.
            Resource Pool ID: {{ $labels.resource_pool_id }}
            Owner Tenant ID: {{ $labels.owner_id }}
            Please check the logs of `nextgen-global-service` for details.
