This check monitors Cilium through the Datadog Agent. The integration can either collect metrics from the cilium-agent
or cilium-operator
.
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.
The Cilium check is included in the Datadog Agent package, but it requires additional setup steps to expose Prometheus metrics.
Starting with version 1.10.0, this OpenMetrics-based integration has a latest mode (use_openmetrics
: true) and a legacy mode (use_openmetrics
: false). To get all the most up-to-date features, Datadog recommends enabling the latest mode. For more information, see Latest and Legacy Versioning For OpenMetrics-based Integrations.
- In order to enable Prometheus metrics in both the
cilium-agent
andcilium-operator
, deploy Cilium with the following Helm values set according to your version of Cilium:- Cilium < v1.8.x:
global.prometheus.enabled=true
- Cilium >= v1.8.x and < v1.9.x:
global.prometheus.enabled=true
andglobal.operatorPrometheus.enabled=true
- Cilium >= 1.9.x:
prometheus.enabled=true
andoperator.prometheus.enabled=true
- Cilium < v1.8.x:
Or, separately enable Prometheus metrics in the Kubernetes manifests:
--prometheus-serve-addr=:9090
.-
In the
cilium-agent
add--prometheus-serve-addr=:9962
to theargs
section of the Cilium DaemonSet config:# [...] spec: containers: - args: - --prometheus-serve-addr=:9962
-
In the
cilium-operator
add--enable-metrics
to theargs
section of the Cilium deployment config:# [...] spec: containers: - args: - --enable-metrics
To configure this check for an Agent running on a host:
-
Edit the
cilium.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory to start collecting your Cilium performance data. See the sample cilium.d/conf.yaml for all available configuration options.- To collect
cilium-agent
metrics, enable theagent_endpoint
option. - To collect
cilium-operator
metrics, enable theoperator_endpoint
option.
instances: ## @param use_openmetrics - boolean - optional - default: false ## Use the latest OpenMetrics implementation for more features and better performance. ## ## Note: To see the configuration options for the legacy OpenMetrics implementation (Agent 7.33 or older), ## see https://github.com/DataDog/integrations-core/blob/7.33.x/cilium/datadog_checks/cilium/data/conf.yaml.example # - use_openmetrics: true # Enables OpenMetrics latest mode ## @param agent_endpoint - string - optional ## The URL where your application metrics are exposed by Prometheus. ## By default, the Cilium integration collects `cilium-agent` metrics. ## One of agent_endpoint or operator_endpoint must be provided. # agent_endpoint: http://localhost:9090/metrics ## @param operator_endpoint - string - optional ## Provide instead of `agent_endpoint` to collect `cilium-operator` metrics. ## Cilium operator metrics are exposed on port 6942. # operator_endpoint: http://localhost:6942/metrics
- To collect
Cilium contains two types of logs: cilium-agent
and cilium-operator
.
-
Collecting logs is disabled by default in the Datadog Agent. Enable it in your DaemonSet configuration:
# (...) env: # (...) - name: DD_LOGS_ENABLED value: "true" - name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL value: "true" # (...)
-
Mount the Docker socket to the Datadog Agent through the manifest or mount the
/var/log/pods
directory if you are not using Docker. For example manifests see the Kubernetes Installation instructions for DaemonSet.
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes Log Collection.
- Metric collection
Parameter | Value |
---|---|
<INTEGRATION_NAME> |
"cilium" |
<INIT_CONFIG> |
blank or {} |
<INSTANCE_CONFIG> |
{"agent_endpoint": "http://%%host%%:9090/metrics", "use_openmetrics": "true"} |
- Log collection
Parameter | Value |
---|---|
<LOG_CONFIG> |
{"source": "cilium-agent", "service": "cilium-agent"} |
- Metric collection
Parameter | Value |
---|---|
<INTEGRATION_NAME> |
"cilium" |
<INIT_CONFIG> |
blank or {} |
<INSTANCE_CONFIG> |
{"operator_endpoint": "http://%%host%%:6942/metrics", "use_openmetrics": "true"} |
- Log collection
Parameter | Value |
---|---|
<LOG_CONFIG> |
{"source": "cilium-operator", "service": "cilium-operator"} |
Run the Agent's status subcommand and look for cilium
under the Checks section.
See metadata.csv for a list of all metrics provided by this integration.
The Cilium integration does not include any events.
See service_checks.json for a list of service checks provided by this integration.
Need help? Contact Datadog support.