Edge Delta Kubernetes Metrics Source
3 minute read
Overview
You can use the Kubernetes Metrics source node to scrape certain Kubernetes metrics. By default, the node scrapes kube_state_metrics
. The kubelet
, cadvisor
, and node_exporter
metrics are excluded by default. See the metrics list.
- outgoing_data_types: metric
See Ingest Kubernetes Metrics.
Example Configuration

nodes:
- name: ed_k8s_metrics
type: ed_k8s_metrics_input
include:
- "cadvisor=container_cpu.*"
resource_fields:
pod_labels:
- app.kubernetes.io/instance
- app.kubernetes.io/name
- helm.sh/chart
- kubernetes.io/.*
pod_annotations:
- cluster-autoscaler.kubernetes.io/safe-to-evict
- cluster-autoscaler.kubernetes.io/.*
node_labels:
- beta.kubernetes.io/arch
- beta.kubernetes.io/instance-type
- eks.amazonaws.com/.*
- topology.kubernetes.io/zone
namespace_labels:
- kubernetes.io/metadata.name
- name
scrape_interval: 1m
Required Parameters
name
A descriptive name for the node. This is the name that will appear in pipeline builder and you can reference this node in the YAML using the name. It must be unique across all nodes. It is a YAML list element so it begins with a -
and a space followed by the string. It is a required parameter for all nodes.
nodes:
- name: <node name>
type: <node type>
type: ed_k8s_metrics_input
The type
parameter specifies the type of node being configured. It is specified as a string from a closed list of node types. It is a required parameter.
nodes:
- name: <node name>
type: <node type>
Optional Parameters
exclude and include
The include
and exclude
parameters are used to filter metrics. They are specified with Golang regex or full text.
You must reference the common metric name such as
container_cpu_usage_seconds_total
rather thank8s.container.cpu.usage_seconds.value
from the metrics inventory. See the Metrics List.
- If neither
include
norexclude
are specified, then only the default metrics for powering the Kubernetes Overview Dashboard are ingested. - If
exclude
is specified it drops all metrics matching that the pattern. - If
include
is specified as well asexclude
, then metrics matching the pattern ininclude
are ingested unless dropped byexclude
. I.e.exclude
takes precedence.
nodes:
- name: ed_k8s_metrics
type: ed_k8s_metrics_input
include:
- "cadvisor=container_cpu.*"
- "cadvisor=container_network_(receive|transmit)_(bytes|error).(rate|value)"
Note: As of v1.27.0
kubelet
,cadvisor
, andnode_exporter
metrics are excluded by default.
resource_fields
The resource_fields
parameters define the labels and annotations to be collected as metadata fields and included. It is specified as a dictionary of regexes and is optional.
You can specify:
pod_labels
pod_annotations
node_labels
namespace_labels
nodes:
- name: ed_k8s_metrics
type: ed_k8s_metrics_input
resource_fields:
pod_labels:
- app.kubernetes.io/instance
- app.kubernetes.io/name
- helm.sh/chart
- kubernetes.io/.*
pod_annotations:
- cluster-autoscaler.kubernetes.io/safe-to-evict
- cluster-autoscaler.kubernetes.io/.*
node_labels:
- beta.kubernetes.io/arch
- beta.kubernetes.io/instance-type
- eks.amazonaws.com/.*
- topology.kubernetes.io/zone
namespace_labels:
- kubernetes.io/metadata.name
- name
scrape_interval
The scrape_interval
parameter is used to specify the interval at which the Edge Delta agent scrapes metric endpoints. It is specified as a duration and it is optional. The default is 1m.
nodes:
- name: <node name>
type: ed_k8s_metrics_input
scrape_interval: 1m
source_metadata
The source_metadata
parameter is used to define which detected resources and attributes to add to each data item as it is ingested by the Edge Delta agent. In the GUI you can select:
- Required Only: This option includes the minimum required resources and attributes for Edge Delta to operate.
- Default: This option includes the required resources and attributes plus those selected by Edge Delta
- High: This option includes the required resources and attributes along with a larger selection of common optional fields.
- Custom: With this option selected, you can choose which attributes and resources to include. The required fields are selected by default and can’t be unchecked.
Based on your selection in the GUI, the source_metadata
YAML is populated as two dictionaries (resource_attributes
and attributes
) with Boolean values.
See Choose Data Item Metadata for more information on selecting metadata.