コンテンツにスキップ

kube Proxy

kube-proxy の稼働メトリクスを追跡することで、ネットワークプロキシの負荷、応答時間、同期状態などの情報を把握できます

設定

前提条件

  • datakit をインストール済み

Datakit の設定

  • datakit のインストールディレクトリ内の conf.d/samples ディレクトリに移動し、prom.conf.sample をコピーして kube-proxy.conf に名前を変更します
cp prom.conf.sample kube-proxy.conf
  • kube-proxy.conf の内容を次のように調整します:
[[inputs.prom]]
  ## Exporter URLs.
  urls = ["http://127.0.0.1:10249/metrics"]

  uds_path = ""

  ignore_req_err = false

  source = "kube-proxy"

  measurement_prefix = ""

  keep_exist_metric_name = false


  election = true

  disable_host_tag = false

  disable_instance_tag = false

  disable_info_tag = false


  [[inputs.prom.measurements]]
    prefix = "etcd_network_"
    name = "etcd_network"

  [[inputs.prom.measurements]]
    prefix = "etcd_server_"
    name = "etcd_server"

  [inputs.prom.tags_rename]
    overwrite_exist_tags = false

  [inputs.prom.as_logging]
    enable = false
    service = "service_name"
  • datakit を再起動します 次のコマンドを実行します
datakit service -R

指標

kube-proxy 指標セット

Kube Proxy 指標は kubeproxy 指標セットにあります。ここでは Kube Proxy 指標に関する説明を紹介します。

メトリクス 説明 単位
network_programming_duration_seconds_bucket ネットワークプログラミング操作の時間分布 s
network_programming_duration_seconds_count ネットワークプログラミング操作の総発生回数 count
network_programming_duration_seconds_sum すべてのネットワークプログラミング操作の総所要時間 s
sync_proxy_rules_duration_seconds_bucket プロキシルール同期操作の時間分布 s
sync_proxy_rules_duration_seconds_count プロキシルール同期操作の総発生回数 count
sync_proxy_rules_duration_seconds_sum すべてのプロキシルール同期操作の総所要時間 count
sync_proxy_rules_endpoint_changes_pending 同期待ちのエンドポイント変更数 count
sync_proxy_rules_endpoint_changes_total エンドポイント変更の同期総回数 count
sync_proxy_rules_iptables_restore_failures_total IPTables ルール復元の失敗回数 count
sync_proxy_rules_no_local_endpoints_total ローカルエンドポイントがないサービス数 count
sync_proxy_rules_service_changes_pending 同期待ちのサービス設定変更数 count

フィードバック

このページは役に立ちましたか?