---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  annotations:
    capability.openshift.io/name: NodeTuning
    include.release.openshift.io/hypershift: "true"
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  creationTimestamp: "2025-10-27T11:18:36Z"
  generation: 1
  labels:
    role: alert-rules
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:capability.openshift.io/name: {}
          f:include.release.openshift.io/hypershift: {}
          f:include.release.openshift.io/ibm-cloud-managed: {}
          f:include.release.openshift.io/self-managed-high-availability: {}
          f:include.release.openshift.io/single-node-developer: {}
        f:labels:
          .: {}
          f:role: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"d36bdf59-d268-4238-afb0-5e0b21cca1a4"}: {}
      f:spec:
        .: {}
        f:groups:
          .: {}
          k:{"name":"node-tuning-operator.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
    manager: cluster-version-operator
    operation: Update
    time: "2025-10-27T11:18:36Z"
  name: node-tuning-operator
  namespace: openshift-cluster-node-tuning-operator
  ownerReferences:
  - apiVersion: config.openshift.io/v1
    controller: true
    kind: ClusterVersion
    name: version
    uid: d36bdf59-d268-4238-afb0-5e0b21cca1a4
  resourceVersion: "1733"
  uid: fe9075f6-7e96-466f-8db4-9fbed8a47ba6
spec:
  groups:
  - name: node-tuning-operator.rules
    rules:
    - alert: NTOPodsNotReady
      annotations:
        description: |
          Pod {{ $labels.pod }} is not ready.
          Review the "Event" objects in "openshift-cluster-node-tuning-operator" namespace for further details.
        summary: Pod {{ $labels.pod }} is not ready.
      expr: |
        kube_pod_status_ready{namespace='openshift-cluster-node-tuning-operator', condition='true'} == 0
      for: 30m
      labels:
        severity: warning
    - alert: NTOPodLabelsUsed
      annotations:
        description: The Node Tuning Operator is using deprecated functionality. Using
          pod label matching has been discouraged since OCP 4.4 and this functionality
          will be removed in future versions. Please revise and adjust your configuration
          (Tuned custom resources).
        summary: The Node Tuning Operator is using deprecated functionality.
      expr: nto_pod_labels_used_info == 1
      for: 30m
      labels:
        severity: warning
    - alert: NTOInvalidTunedExist
      annotations:
        description: Invalid custom Tuned resource exists. View your custom Tuned
          resources and operator logs for further details.
        summary: Invalid custom Tuned resource exists.
      expr: nto_invalid_tuned_exist_info == 1
      for: 30m
      labels:
        severity: warning
    - alert: NTODegraded
      annotations:
        description: The Node Tuning Operator is degraded. Review the "node-tuning"
          ClusterOperator object for further details.
        summary: The Node Tuning Operator is degraded.
      expr: nto_degraded_info == 1
      for: 2h
      labels:
        severity: warning
    - expr: count by (_id) (nto_profile_calculated_total{profile!~"openshift-node",profile!~"openshift-control-plane",profile!~"openshift"})
      record: nto_custom_profiles:count
