This check monitors Calico through the Datadog Agent.
The Calico check sends metrics concerning network and security in a Kubernetes cluster set up with Calico.
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions. A setup using Autodiscovery Integration is also below.
Installation with a Kubernetes cluster-based Agent
Set up Calico on your cluster if you have not already.
If you are using minikube, you must forward port 9091 to felix-metrics-svc.
Run kubectl port-forward service/felix-metrics-svc 9091:9091 -n kube-system.
If you are not using minikube, check that felix-metrics-svc has an external IP. If the service does not have an external IP, use kubectl edit svc to change its type from ClusterIP to LoadBalancer.
Once installation is complete, you can continue to configuration (see below).
Configuration for host based setup
Edit the calico.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your Calico performance data. The only required parameter is the openmetrics_endpoint URL. See the sample calico.d/conf.yaml for all available configuration options.
If you are using minikube, use ‘http://localhost:9091/metrics’ as your openmetrics_endpoint URL.
If you are not using minikube, use http://<FELIX-METRICS-SVC-EXTERNAL-IP>:<PORT>/metrics as your openmetrics_endpoint URL.
The Calico integration does not include any events.
Since Calico structure is setup in a kubernetes cluster, it is built with deployments, pods, service.
Kubernetes integration makes a great job at fetching logs from containers Therefore, when Kubernetes integration is setup, calico logs are automatically available in datadoghq Log section. You should proceed this way.