Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

OCP 4 の Alertmanager で、"Prometheus could not scrape fluentd for more than 10m" というアラートが表示される

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
  • Red Hat OpenShift Service on AWS (ROSA)
    • 4
  • Red Hat OpenShift Dedicated (OSD)
    • 4
  • Red Hat OpenShift Logging (RHOL)

Issue

  • Alertmanager が "FluentdNodeDown: Prometheus could not scrape fluentd for more than 10m" というアラートを表示します。

Resolution

注記: 問題を確認するための 診断手順 に従って、このドキュメントに反映されている問題と同じ問題があることを確認することが重要です。問題が一致しない場合は、ソリューション記事の Prometheus reporting some or all fluentd metrics endpoints as TargetDown および OCP Prometheus could not scrape fluentd for more than 10m を参照してください。

OCP には回避策がありますが、OSD や ROSA ではその名前空間にラベルを追加することができないため、この回避策を適用することはできません。Red Hat は、OSD と ROSA の修正に取り組んでいます。

OCP の回避策

openshift-logging 名前空間にラベル openshift.io/cluster-monitoring: "true" を追加します。

$ oc edit namespace openshift-logging
...
apiVersion: v1
kind: Namespace
metadata:
  name: openshift-operators-redhat 
  annotations:
    openshift.io/node-selector: ""
  labels:
    openshift.io/cluster-monitoring: "true"  <-- needed to add this label
...

注記: 変更を行った後も問題が解決しない場合は、ノードに不適切に設定されたテイントがないかどうかを確認してください。

Root Cause

Cluster Logging スタックが RHOCP 4.6 以前にデプロイされている場合で、openshift.io/cluster-monitoring: "true" ラベルがこの ドキュメント に示されているように openshift-logging 名前空間に設定されていない場合は、alertmanager は "Prometheus could not scrape fluentd for more than 10m" というアラートを表示します。

Diagnostic Steps

  1. "Installing cluster logging" のドキュメントに従って、Web コンソールから "Enable operator recommended cluster monitoring on this namespace" を選択しないか、CLI から openshift-logging 名前空間にラベル openshift.io/cluster-monitoring: "true" を追加しない状態で、Cluster Logging スタックを RHOCP 4.6 にデプロイします。
  2. すべての fluentd Pod が実行されていることを確認します。

    $ oc -n openshift-logging get pods -l component=fluentd
    
  3. openshift-logging 名前空間に openshift.io/cluster-monitoring: "true" というラベルがないことを確認します。

    $ oc get namespace openshift-logging -o yaml 
    
  4. 10 分後、Alertmanager によって生成されたアラートを確認すると、そのうちの 1 つが "Prometheus could not scrape fluentd for more than 10m" になります。

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments