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.
This node requires Edge Delta agent version v0.1.72 or higher.
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_totalrather thank8s.container.cpu.usage_seconds.valuefrom the metrics inventory. See the Metrics List.
- If neither
includenorexcludeare specified, then only the default metrics for powering the Kubernetes Overview Dashboard are ingested. - If
excludeis specified it drops all metrics matching that the pattern. - If
includeis specified as well asexclude, then metrics matching the pattern inincludeare ingested unless dropped byexclude. I.e.excludetakes 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_exportermetrics 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_labelspod_annotationsnode_labelsnamespace_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
This option is used to define which detected resources and attributes to add to each data item as it is ingested by Edge Delta. 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.