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

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

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

問題を作成する

データガバナンス

スクラップ間隔の変更

New Relic Kubernetes 統合 v3 以降では、クラスターからメトリクスが収集される間隔を変更できます。これにより、データ解像度と使用量の間のトレードオフを選択できます。最適なエクスペリエンスを実現するには、15 ~ 30 秒の間隔を選択することをお勧めします。

スクレイプ間隔を変更するには、 newrelic-infrastructureセクションの下のvalues-newrelic.yamlに以下を追加します。

common:
config:
interval: 25s

という感じで終わってしまいます。

global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_
# ... Other settings
# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings
common:
config:
interval: 25s

重要

interval40sより大きい値に設定することは許可されていません。

名前空間のフィルタリング

Kubernetes 統合 v3 以降では、名前空間にラベルを付けることで、どの名前空間をスクレイピングするかをフィルタリングできます。すべての名前空間はデフォルトでスクレイピングされます。

Kubernetesと同じようにnamespaceSelectorを使用します。ラベルに一致する名前空間のみを含めるには、 newrelic-infrastructureセクションの下のvalues-newrelic.yamlに以下を追加してnamespaceSelectorを変更します。

common:
config:
namespaceSelector:
matchLabels:
key1 : "value1"

この例では、ラベルnewrelic.com/scrapetrueに設定されている名前空間のみがスクレイプされます。

global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_
# ... Other settings
# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings
common:
config:
namespaceSelector:
matchLabels:
newrelic.com/scrape: "true"

次の構文を使用して、Kubernetes式を使用して名前空間を含めたり除外したりすることもできます。

common:
config:
namespaceSelector:
matchExpressions:
- {key: newrelic.com/scrape, operator: NotIn, values: ["false"]}
- {key: key1, operator: In, values: ["value1"]}

ヒント

matchExpressionsの下の式は連結されます。

この例では、ラベルnewrelic.com/scrapefalseに設定された名前空間が除外されます。

global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_
# ... Other settings
# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings
common:
config:
namespaceSelector:
matchExpressions:
- {key: newrelic.com/scrape, operator: NotIn, values: ["false"]}

変更できる設定の完全なリストについて は、チャートの README ファイルを参照してください。

どの名前空間が除外されているかを確認するにはどうすればよいですか?

K8sNamespaceサンプルのおかげで、クラスター内のすべての名前空間が一覧表示されます。nrFiltered属性は、名前空間に関連するデータをスクレイプするかどうかを決定します。

次のクエリを使用して、どの名前空間が監視されているかを確認します。

FROM K8sNamespaceSample SELECT displayName, nrFiltered WHERE clusterName = <clusterName> SINCE 2 MINUTES AGO

除外された名前空間からどのデータが破棄されていますか?

次のサンプルは、除外された名前空間では使用できません。

  • K8sContainerSample
  • K8sDaemonsetSample
  • K8sDeploymentSample
  • K8sEndpointSample
  • K8sHpaSample
  • K8sPodSample
  • K8sReplicasetSample
  • K8sServiceSample
  • K8sStatefulsetSample
  • K8sVolumeSample
Copyright © 2024 New Relic株式会社。

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