- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Supported OS
Red Hat OpenShift は、企業向けアプリケーションの開発とデプロイのための Kubernetes コンテナオーケストレーターに基づくオープンソースのコンテナアプリケーションプラットフォームです。
openshift
チェックは存在しません。この README では、OpenShift 固有のメトリクスを Agent で収集するために必要なコンフィギュレーションについて説明します。以下に記載するデータはkubernetes_apiserver
チェックによって収集されます。このチェックを、openshift.*
メトリクスを収集するためにセットアップする必要があります。
Agent のインストールには、Kubernetes の Agent のインストール方法を参照してください。デフォルトのコンフィギュレーションは、OpenShift 3.7.0+ と OpenShift 4.0+ (使用する機能およびエンドポイントが導入されたバージョン)を前提としています。
上記のインストール手順にリンクされている方法のいずれかを使用して Datadog Agent をデプロイする場合は、Agent がデータを収集するために SCC (セキュリティコンテキスト制約) を含める必要があります。デプロイに関連する以下の手順に従ってください。
SCC は、Datadog Agent の values.yaml
内で直接適用できます。ファイルの agents:
セクションの下に次のブロックを追加します。
...
agents:
...
podSecurity:
securityContextConstraints:
create: true
...
これは、Agent を最初にデプロイするときに適用できます。または、この変更を行った後に helm upgrade
を実行して、SCC を適用することもできます。
ニーズとクラスターのセキュリティ制約に応じて、次の 3 つのデプロイシナリオがサポートされます。
Security Context Constraints | 制限付き | ホストネットワーク | カスタム |
---|---|---|---|
Kubernetes レイヤーの監視 | サポート | サポート | サポート |
Kubernetes ベースのオートディスカバリー | サポート | サポート | サポート |
DogStatsD インテーク | サポート対象外 | サポート | サポート |
APM トレースインテーク | サポート対象外 | サポート | サポート |
ログネットワークインテーク | サポート対象外 | サポート | サポート |
ホストネットワークのメトリクス | サポート対象外 | サポート | サポート |
Docker レイヤーの監視 | サポート対象外 | サポート対象外 | サポート |
コンテナログの収集 | サポート対象外 | サポート対象外 | サポート |
ライブコンテナモニタリング | サポート対象外 | サポート対象外 | サポート |
ライブプロセスモニタリング | サポート対象外 | サポート対象外 | サポート |
datadog.yaml
コンフィギュレーションファイルに hostNetwork: true
を定義して Agent をデプロイする必要があります。定義しないと、ポッドのネットワークからメタデータサーバーへのアクセスが制限されます。詳しくは、Kubernetes のログ収集を参照してください。
このモードでは、kubelet と APIserver へのアクセスに必要な RBAC を除き、datadog-agent
daemonset への付与が必要なアクセス許可は特にありません。この kubelet 専用テンプレートを使用して始めることもできます。
DogStatsD、APM、およびログの収集には、Datadog Agent をホストのポートにバインドする方法をお勧めします。そうすれば、ターゲット IP が変化せず、アプリケーションから簡単に検出できるからです。デフォルトの制限付き OpenShift SCC は、ホストポートへのバインドを許可しません。自身の IP でリッスンするように Agent を設定できますが、その IP を検出する処理をアプリケーションに作成する必要があります。
Agent を sidecar
モードで実行できます。Agent をアプリケーションのポッド内で実行し、簡単に検出することが可能です。
標準の hostnetwork
、hostaccess
、あるいは自作の SCC を使用して allowHostPorts
のアクセス許可をポッドに追加します。その場合、関連するポートバインディングを、ポッドの仕様に追加してください。
ports:
- containerPort: 8125
name: dogstatsdport
protocol: UDP
- containerPort: 8126
name: traceport
protocol: TCP
SELinux が permissive モードか、無効になっている場合、すべての機能を使用するには hostaccess
SCC を有効にする必要があります。
SELinux が enforcing モードの場合は、datadog-agent ポッドに spc_t
タイプを付与することをお勧めします。こちらの datadog-agent SCC を使用して Agent をデプロイしてください。datadog-agent サービスアカウントを作成した後でも、この SCC を適用できます。これにより、以下のアクセス許可が付与されます。
allowHostPorts: true
: Dogstatsd / APM / ログインテークの、ノード IP へのバインドを許可します。allowHostPID: true
: UNIX ソケットによって送信された DogStatsD メトリクスに対する発信点検出を許可します。volumes: hostPath
: メトリクス収集に必要な、Docker ソケット、およびホストの proc
と cgroup
フォルダーへのアクセスを許可します。SELinux type: spc_t
: Docker ソケットと全プロセスの proc
と cgroup
フォルダにアクセスし、メトリクスを収集します。詳しくは 超特権コンテナのコンセプトの紹介 を参照してください。system:serviceaccount::
を users
セクションに追加する必要があります。datadog.yaml
コンフィギュレーションファイルに allowHostNetwork: true
を定義して Agent をデプロイする必要があります。定義しないと、ポッドのネットワークからメタデータサーバーへのアクセスが制限されます。注: Docker ソケットはルートグループが所有します。したがって、Docker メトリクスを取得するために、管理者特権を Agent に付与することが必要な場合があります。Agent プロセスをルートユーザーとして実行するには、SCC を次のように構成してください。
runAsUser:
type: RunAsAny
openshift.clusterquota.cpu.used (gauge) | Observed cpu usage by cluster resource quota for all namespaces Shown as cpu |
openshift.clusterquota.cpu.limit (gauge) | Hard limit for cpu by cluster resource quota for all namespaces Shown as cpu |
openshift.clusterquota.cpu.remaining (gauge) | Remaining available cpu by cluster resource quota for all namespaces Shown as cpu |
openshift.clusterquota.memory.used (gauge) | Observed memory usage by cluster resource quota for all namespaces Shown as byte |
openshift.clusterquota.memory.limit (gauge) | Hard limit for memory by cluster resource quota for all namespaces Shown as byte |
openshift.clusterquota.memory.remaining (gauge) | Remaining available memory by cluster resource quota for all namespaces Shown as byte |
openshift.clusterquota.pods.used (gauge) | Observed pods usage by cluster resource quota for all namespaces |
openshift.clusterquota.pods.limit (gauge) | Hard limit for pods by cluster resource quota for all namespaces |
openshift.clusterquota.pods.remaining (gauge) | Remaining available pods by cluster resource quota for all namespaces |
openshift.clusterquota.services.used (gauge) | Observed services usage by cluster resource quota for all namespaces |
openshift.clusterquota.services.limit (gauge) | Hard limit for services by cluster resource quota for all namespaces |
openshift.clusterquota.services.remaining (gauge) | Remaining available services by cluster resource quota for all namespaces |
openshift.clusterquota.persistentvolumeclaims.used (gauge) | Observed persistent volume claims usage by cluster resource quota for all namespaces |
openshift.clusterquota.persistentvolumeclaims.limit (gauge) | Hard limit for persistent volume claims by cluster resource quota for all namespaces |
openshift.clusterquota.persistentvolumeclaims.remaining (gauge) | Remaining available persistent volume claims by cluster resource quota for all namespaces |
openshift.clusterquota.services.nodeports.used (gauge) | Observed service node ports usage by cluster resource quota for all namespaces |
openshift.clusterquota.services.nodeports.limit (gauge) | Hard limit for service node ports by cluster resource quota for all namespaces |
openshift.clusterquota.services.nodeports.remaining (gauge) | Remaining available service node ports by cluster resource quota for all namespaces |
openshift.clusterquota.services.loadbalancers.used (gauge) | Observed service load balancers usage by cluster resource quota for all namespaces |
openshift.clusterquota.services.loadbalancers.limit (gauge) | Hard limit for service load balancers by cluster resource quota for all namespaces |
openshift.clusterquota.services.loadbalancers.remaining (gauge) | Remaining available service load balancers by cluster resource quota for all namespaces |
openshift.appliedclusterquota.cpu.used (gauge) | Observed cpu usage by cluster resource quota and namespace Shown as cpu |
openshift.appliedclusterquota.cpu.limit (gauge) | Hard limit for cpu by cluster resource quota and namespace Shown as cpu |
openshift.appliedclusterquota.cpu.remaining (gauge) | Remaining available cpu by cluster resource quota and namespace Shown as cpu |
openshift.appliedclusterquota.memory.used (gauge) | Observed memory usage by cluster resource quota and namespace Shown as byte |
openshift.appliedclusterquota.memory.limit (gauge) | Hard limit for memory by cluster resource quota and namespace Shown as byte |
openshift.appliedclusterquota.memory.remaining (gauge) | Remaining available memory by cluster resource quota and namespace Shown as byte |
openshift.appliedclusterquota.pods.used (gauge) | Observed pods usage by cluster resource quota and namespace |
openshift.appliedclusterquota.pods.limit (gauge) | Hard limit for pods by cluster resource quota and namespace |
openshift.appliedclusterquota.pods.remaining (gauge) | Remaining available pods by cluster resource quota and namespace |
openshift.appliedclusterquota.services.used (gauge) | Observed services usage by cluster resource quota and namespace |
openshift.appliedclusterquota.services.limit (gauge) | Hard limit for services by cluster resource quota and namespace |
openshift.appliedclusterquota.services.remaining (gauge) | Remaining available services by cluster resource quota and namespace |
openshift.appliedclusterquota.persistentvolumeclaims.used (gauge) | Observed persistent volume claims usage by cluster resource quota and namespace |
openshift.appliedclusterquota.persistentvolumeclaims.limit (gauge) | Hard limit for persistent volume claims by cluster resource quota and namespace |
openshift.appliedclusterquota.persistentvolumeclaims.remaining (gauge) | Remaining available persistent volume claims by cluster resource quota and namespace |
openshift.appliedclusterquota.services.nodeports.used (gauge) | Observed service node ports usage by cluster resource quota and namespace |
openshift.appliedclusterquota.services.nodeports.limit (gauge) | Hard limit for service node ports by cluster resource quota and namespace |
openshift.appliedclusterquota.services.nodeports.remaining (gauge) | Remaining available service node ports by cluster resource quota and namespace |
openshift.appliedclusterquota.services.loadbalancers.used (gauge) | Observed service load balancers usage by cluster resource quota and namespace |
openshift.appliedclusterquota.services.loadbalancers.limit (gauge) | Hard limit for service load balancers by cluster resource quota and namespace |
openshift.appliedclusterquota.services.loadbalancers.remaining (gauge) | Remaining available service load balancers by cluster resource quota and namespace |
openshift.clusterquota.cpu.requests.used (gauge) | Observed cpu usage by cluster resource for request |
OpenShift チェックには、イベントは含まれません。
OpenShift チェックには、サービスのチェック機能は含まれません。
ご不明な点は、Datadog のサポートチームまでお問い合わせください。