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.
- 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:
-
In the
cilium-agent
add--prometheus-serve-addr=:9090
to theargs
section of the Cilium DaemonSet config:# [...] spec: containers: - args: - --prometheus-serve-addr=:9090
-
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 V2 implementation for more features and better performance. ## ## Note: To see the configuration options for the legacy OpenMetrics implementation (Agent 7.33 or older), ## https://github.com/DataDog/integrations-core/blob/7.33.x/cilium/datadog_checks/cilium/data/conf.yaml.example # - use_openmetrics: true # Enables OpenMetrics V2 ## @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
NOTE: By default, the
use_openmetrics
option is enabled in the conf.yaml.example. Set theuse_openmetrics
configuration option tofalse
to use the OpenMetrics V1 implementation. To view the configuration parameters for OpenMetrics V1, see theconf.yaml.example
file.You can read more about OpenMetrics V2.
- 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.