To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.
Overview
このチェックは、Datadog Agent を通じて Calico を監視します。
Calico チェックは、Calico で設定した Kubernetes クラスターのネットワークやセキュリティに関するメトリクスを送信します。
セットアップ
インストール
The Calico check is included in the Datadog Agent package.
Kubernetes クラスターベースの Agent でのインストール
アノテーションを使用する:
クラスターに Calico をセットアップします。
Calico コンポーネントのメトリクスを監視するの手順で、Prometheus のメトリクスを有効にします。
有効にすると、クラスター内で felix-metrics-svc と prometheus-pod サービスが動作します。
オートディスカバリーを使用するには、prometheus-pod を修正します。Prometheus の YAML コンフィギュレーションファイルに以下のスニペットを追加してください。
metadata:
[...]
annotations:
ad.datadoghq.com/prometheus-pod.check_names: |
["openmetrics"]
ad.datadoghq.com/prometheus-pod.init_configs: |
[{}]
ad.datadoghq.com/prometheus-pod.instances: |
[
{
"prometheus_url": "http://<FELIX-SERVICE-IP>:<FELIX-SERVICE-PORT>/metrics",
"namespace": "calico",
"metrics": ["*"]
}
]
spec:
[....]
kubectl get all -all-namespaces を実行して、 <FELIX-SERVICE-IP> と <FELIX-SERVICE-PORT> の値を見つけることができます。
OS ベースの Agent でのインストール
kubectl get all --all-namespaces を使って felix-metrics-svc サービスが実行するまで Calico コンポーネントのメトリクスを監視するに従います。
minikube を使用している場合は、felix-metrics-svc にポート 9091 を転送する必要があります。
kubectl port-forward service/felix-metrics-svc 9091:9091 -n kube-system を実行します。
minikube を使用していない場合は、felix-metrics-svc が外部 IP を持っているかを確認してください。サービスが外部 IP を持っていない場合は、kubectl edit svc を使用して、そのタイプを ClusterIP から LoadBalancer に変更してください。
構成
ホストで実行中の Agent でこのチェックを構成する場合は、手順に従ってください。コンテナ環境の場合は、コンテナ化セクションを参照してください。
ホスト
ホストで実行中の Agent に対してこのチェックを構成するには
Calico のパフォーマンスデータの収集を開始するには、Agent の構成ディレクトリのルートにある conf.d/ フォルダーの calico.d/conf.yaml ファイルを編集します。
必須パラメーターは openmetrics_endpoint の URL のみです。利用可能なすべての構成オプションは sample calico.d/conf.yaml を参照してください。
minikube を使用している場合は、openmetrics_endpoint の URL として ‘http://localhost:9091/metrics’ を使用してください。
minikube を使用していない場合は、 openmetrics_endpoint の URL として http://<FELIX-METRICS-SVC-EXTERNAL-IP>:<PORT>/metrics を使用してください。
Agent を再起動します。
メトリクスの収集
The default configuration of your calico.d/conf.yaml file activate the collection of your Calico metrics. See the sample calico.d/conf.yaml for all available configuration options.
Agent を再起動します。
ログ収集
Calico の構造は Kubernetes クラスターで設定されているため、デプロイメント、ポッド、サービスなどで構築されています。Kubernetes インテグレーションでは、コンテナからログを取得します。
Kubernetes インテグレーションを設定すると、Datadog ログエクスプローラーで Calico のログが利用できるようになります。
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml ファイルでこれを有効にします。
コンテナ化
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
メトリクスの収集
| パラメーター | 値 |
|---|
<INTEGRATION_NAME> | calico |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {openmetrics_endpoint: <OPENMETRICS_ENDPOINT>} |
ログ収集
Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。
| パラメーター | 値 |
|---|
<LOG_CONFIG> | {"source": "calico", "service": "<SERVICE_NAME>"} |
検証
Agent の status サブコマンドを実行し、Checks セクションで calico を探します。
メトリクス
| |
|---|
calico.felix.active.local_endpoints (gauge) | Number of active endpoints on this host |
calico.felix.active.local_policies (gauge) | Number of policies on this host |
calico.felix.active.local_selectors (gauge) | Number of active selectors on this host |
calico.felix.active.local_tags (gauge) | Number of active tags on this host [versions < Calico v3.23] |
calico.felix.cluster.num_host_endpoints (gauge) | Total number of host endpoints cluster-wide |
calico.felix.cluster.num_hosts (gauge) | Total number of Calico hosts in the cluster |
calico.felix.cluster.num_workload_endpoints (gauge) | Total number of workload endpoints cluster-wide |
calico.felix.int_dataplane_failures.count (count) | Number of dataplane failures. |
calico.felix.ipset.calls.count (count) | Number of ipset commands executed |
calico.felix.ipset.errors.count (count) | Number of ipset command failures |
calico.felix.ipsets.calico (gauge) | Number of active Calico IP sets. |
calico.felix.ipsets.total (gauge) | Total number of active IP sets. |
calico.felix.iptables.chains (gauge) | Number of active iptables chains. |
calico.felix.iptables.restore_calls.count (count) | Number of iptables-restore calls. |
calico.felix.iptables.restore_errors.count (count) | Number of iptables-restore errors. |
calico.felix.iptables.rules (gauge) | Number of active iptables rules. |
calico.felix.iptables.save_calls.count (count) | Number of iptables-save calls. |
calico.felix.iptables.save_errors.count (count) | Number of iptables-save errors. |
イベント
Calico インテグレーションには、イベントは含まれません。
サービスチェック
See
service_checks.json for a list of service checks provided by this integration.
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問い合わせください。
その他の参考資料
お役に立つドキュメント、リンクや記事: