---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  creationTimestamp: "2025-10-27T11:37:51Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: cluster-monitoring-operator
    app.kubernetes.io/part-of: openshift-monitoring
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:app.kubernetes.io/managed-by: {}
          f:app.kubernetes.io/part-of: {}
      f:spec:
        .: {}
        f:groups:
          .: {}
          k:{"name":"telemeter.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
    manager: operator
    operation: Update
    time: "2025-10-27T11:37:51Z"
  name: telemetry
  namespace: openshift-monitoring
  resourceVersion: "15047"
  uid: f69578bf-4b75-446c-91a7-f2b31c37aa2a
spec:
  groups:
  - name: telemeter.rules
    rules:
    - expr: max(federate_samples - federate_filtered_samples)
      record: cluster:telemetry_selected_series:count
    - alert: TelemeterClientFailures
      annotations:
        description: |-
          The telemeter client in namespace {{ $labels.namespace }} fails {{ $value | humanize }} of the requests to the telemeter service.
          Check the logs of the telemeter-client pod with the following command:
          oc logs -n openshift-monitoring deployment.apps/telemeter-client -c telemeter-client
          If the telemeter client fails to authenticate with the telemeter service, make sure that the global pull secret is up to date, see https://docs.openshift.com/container-platform/latest/openshift_images/managing_images/using-image-pull-secrets.html#images-update-global-pull-secret_using-image-pull-secrets for more details.
        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/cluster-monitoring-operator/TelemeterClientFailures.md
        summary: Telemeter client fails to send metrics
      expr: |
        sum by (namespace) (
          rate(federate_requests_failed_total{job="telemeter-client"}[15m])
        ) /
        sum by (namespace) (
          rate(federate_requests_total{job="telemeter-client"}[15m])
        ) > 0.2
      for: 1h
      labels:
        severity: warning
