• English日本語한국어
  • ログイン今すぐ開始

この機械翻訳は参考用に提供されます。

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

問題を作成する

Apache Flink の統合

Apache Flink ダッシュボードを使用すると、ログを簡単に追跡し、インストルメンテーション ソースを監視し、すべてのアプリケーション インスタンスのアップタイムとダウンタイムの概要を把握できます。インフラストラクチャ エージェントと Prometheus OpenMetrics の統合、Flink で構築 OpenMetrics エンドポイント スクレイピングを利用して、最も重要なデータをすべて 1 か所で表示できます。

New Relic で Flink を設定すると、すぐにデータがこのようなダッシュボードに表示されます。

インフラストラクチャ エージェントと Prometheus OpenMetrics 統合をインストールする

Flink データを New Relic に取り込む前に、まずインフラストラクチャ エージェントをインストールしてから、Prometheus OpenMetrics をインストールしてメトリクスを公開します。

Apache Flink 用に Prometheus OpenMetrics を構成する

Prometheus OpenMetrics をインストールしたら、 nri-prometheus-config.ymlファイルを構成する必要があります。構成ファイルは、 nri-prometheusリポジトリのスニペットと一致する必要があります。

integrations:
- name: nri-prometheus
config:
standalone: false
# Defaults to true. When standalone is set to `false`, `nri-prometheus` requires an infrastructure agent to send data.
emitters: infra-sdk
# When running with infrastructure agent emitters will have to include infra-sdk
cluster_name: "YOUR_CLUSTER_NAME_HERE"
# Match the name of your cluster with the name seen in New Relic.
targets:
- description: "YOUR_DESCRIPTION_HERE"
urls: ["'job-cluster:9249', 'taskmanager1:9249', 'taskmanager2:9249'"]
# 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"
verbose: false
# Defaults to false. This determines whether or not the integration should run in verbose mode.
audit: false
# Defaults to false and does not include verbose mode. Audit mode logs the uncompressed data sent to New Relic and can lead to a high log volume.
# scrape_timeout: "YOUR_TIMEOUT_DURATION"
# `scrape_timeout` is not a mandatory configuration and defaults to 30s. The HTTP client timeout when fetching data from endpoints.
scrape_duration: "5s"
# worker_threads: 4
# `worker_threads` is not a mandatory configuration and defaults to `4` for clusters with more than 400 endpoints. Slowly increase the worker thread until scrape time falls between the desired `scrape_duration`. Note: Increasing this value too much results in huge memory consumption if too many metrics are scraped at once.
insecure_skip_verify: false
# Defaults to false. Determins if the integration should skip TLS verification or not.
timeout: 10s

ログ転送を手動で設定する

インフラストラクチャ エージェントは Flink ダッシュボードにログを送信する必要がありますが、ログ転送を手動で設定する必要がある場合があります。これをする:

  • logging.ymlファイルに移動します。
  • 次のスニペットをファイルの任意の場所に追加します。
- name: flink-log
file: /home/flink-virtualbox/flink/build-target/log/flink_taskmanager.log
attributes:
logtype: flink-logs

Apache Flink クイックスタートをインストールすると、重要な Apache Flink データを New Relic で確認できます。New Relic でダッシュボードを見つけるには: one.newrelic.com > Dashboardsに移動し、 Apache Flinkを選択します。データをクエリできるようになりました。例えば:

FROM Metric SELECT sum(flink_jobmanager_job_totalNumberOfCheckpoints) AS 'Total Number of Checkpoints'

次は何ですか?

Apache Flink ダッシュボードをさらにカスタマイズしたい場合は、NRQL クエリの作成と管理について詳しく学ぶことができます。 New Relic UI で:

Copyright © 2023 New Relic Inc.

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