3.5.3. メトリクス: config_policies_evaluation_duration_seconds
config_policies_evaluation_duration_seconds ヒストグラムは、クラスターで評価する準備ができているすべての設定ポリシーを処理するのにかかる秒数を追跡します。次のメトリクスを使用して、ヒストグラムをクエリーします。
-
config_policies_evaluation_duration_seconds_bucket: バケットは累積的であり、可能なエントリー (1、3、9、10.5、15、30、60、90、120、180、300、450、600、およびそれ以上) で秒を表します。 -
config_policies_evaluation_duration_seconds_count: すべてのイベントの数。 -
config_policies_evaluation_duration_seconds_sum: すべての値の合計。
config_policies_evaluation_duration_seconds メトリクスを使用して、頻繁に評価する必要がないリソース集約型ポリシーの ConfigurationPolicy evaluationInterval 設定を変更する必要があるかどうかを判断します。また、Kubernetes API サーバーでのリソース使用率が高くなる代わりに、同時実行数を増やすこともできます。詳細は、同時実行の設定 セクションを参照してください。
設定ポリシーの評価に使用された時間に関する情報を取得するには、次の式のような Prometheus クエリーを実行します。
rate(config_policies_evaluation_duration_seconds_sum[10m])/rate (config_policies_evaluation_duration_seconds_count[10m]
open-cluster-management-agent-addon namespace のマネージドクラスターで実行している config-policy-controller Pod がメトリクスを計算します。デフォルトでは、config-policy-controller はメトリクスを observability に送信しません。