• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、このページを参照してください。

問題を作成する

Linkerd インテグレーション

当社の Linkerd インテグレーションは、 Kubernetes用のサービス メッシュです。 コードを変更することなく、ランタイムデバッグ、耐障害性、信頼性、セキュリティを実現し、サービスの実行をより簡単かつ安全にします。

Linkerd インテグレーションをセットアップすると、Linkerd メトリックのダッシュボードが表示されます。

インフラストラクチャエージェントをインストールします

Linkerd インテグレーションを使用するには、同じホストにインフラストラクチャエージェントもインストールする必要があります。 インフラストラクチャエージェントはホスト自体を監視しますが、次の手順でインストールするインテグレーションは Linkerd 固有のデータを使用して監視を拡張します。

Linkerd メトリックを公開する

  1. 次のスクリプトを使用して、すべての Linkerd ポッドを確認します。

    bash
    $
    kubectl get pods -n <LINKERD_NAMESPACE>
    • LINKERD_NAMESPACEを、Linkerd ポッドが実行されている実際のネームスペースに置き換えます。
  2. 次に、各 Linkerd ポッドのすべてのメトリックをポート 4191 に送信するようにします。

    bash
    $
    kubectl port-forward --address 0.0.0.0 -n <LINKERD_NAMESPACE> <LINKERD_POD_NAME> 4191:4191 &
    • LINKERD_NAMESPACEを、Linkerd ポッドが実行されている実際のネームスペースに置き換え、 LINKERD_POD_NAMEを各 Linkerd ポッドの実際の名前に置き換えます。

nri-prometheus で Linkerd インテグレーションを有効にする

Linkerd インテグレーションをセットアップするには、次の手順に従います。

  1. Integration ディレクトリにnri-prometheus-config.ymlという名前のファイルを作成します。

    bash
    $
    touch /etc/newrelic-infra/integrations.d/nri-prometheus-config.yml
  2. エージェントが Linkerd データをキャプチャできるようにするには、次のスニペットをnri-prometheus-config.ymlファイルに追加します。

    integrations:
    - name: nri-prometheus
    config:
    # When standalone is set to false nri-prometheus requires an infrastructure agent to work and send data. Defaults to true
    standalone: false
    # When running with infrastructure agent emitters will have to include infra-sdk
    emitters: infra-sdk
    # The name of your cluster. It's important to match other New Relic products to relate the data.
    cluster_name: "YOUR_DESIRED_CLUSTER_NAME"
    targets:
    - description: Linkerd metrics list
    urls: ["http://<ip-address>:4191/metrics","http://<ip-address>:9090/metrics"]
    # tls_config:
    # ca_file_path: "/etc/etcd/etcd-client-ca.crt"
    # cert_file_path: "/etc/etcd/etcd-client.crt"
    # key_file_path: "/etc/etcd/etcd-client.key"
    # Whether the integration should run in verbose mode or not. Defaults to false
    verbose: false
    # Whether the integration should run in audit mode or not. Defaults to false.
    # Audit mode logs the uncompressed data sent to New Relic. Use this to log all data sent.
    # It does not include verbose mode. This can lead to a high log volume, use with care
    audit: false
    # The HTTP client timeout when fetching data from endpoints. Defaults to 30s.
    # scrape_timeout: "30s"
    # Length in time to distribute the scraping from the endpoints
    scrape_duration: "5s"
    # Number of worker threads used for scraping targets.
    # For large clusters with many (&gt;400) endpoints, slowly increase until scrape
    # time falls between the desired `scrape_duration`.
    # Increasing this value too much will result in huge memory consumption if too
    # many metrics are being scraped.
    # Default: 4
    # worker_threads: 4
    # Whether the integration should skip TLS verification or not. Defaults to false
    insecure_skip_verify: true
    timeout: 10s

New Relic インフラストラクチャ エージェントを再起動します

インフラストラクチャ エージェントを再起動します。

bash
$
sudo systemctl restart newrelic-infra.service

数分以内に、アプリケーションはメトリクスをone.newrelic.comに送信します。

データを検索する

Linkerd アプリケーションのメトリックを監視するには、 Linkerdという名前の事前に構築されたダッシュボード テンプレートを選択できます。 事前に構築されたダッシュボード テンプレートを使用するには、次の手順に従ってください。

  1. one.newrelic.comから、

    + Add data

    ページに移動します。

  2. Dashboards

    をクリックします。

  3. 検索バーにLinkerdと入力します。

  4. Linkerd ダッシュボード オプションが表示されたら、クリックしてインストールします。

    Linkerd ダッシュボードはカスタムダッシュボードとみなされ、Dashboards UIで確認できます。 ダッシュボードの使用と編集に関するドキュメントについては、ダッシュボードのドキュメントをご覧ください。

    Linkerd ダウンストリームの合計接続数を確認するための NRQL クエリを次に示します。

    SELECT latest(process_virtual_memory_bytes)/(1024*1024) as 'Memory in MB' FROM Metric

次は何ですか?

NRQL クエリの作成とダッシュボードの生成の詳細については、次のドキュメントをご覧ください。

Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.