You are viewing docs on Elastic's new documentation system, currently in technical preview. For all other Elastic docs, visit elastic.co/guide.

Kubernetes Event Metrics

Collect events related metrics from Kubernetes API server with Elastic Agent.

Version
1.58.0 (View all)
Compatible Kibana version(s)
8.12.0 or higher
Supported Serverless project types

Security
Observability
Subscription level
Basic

Metrics

event

This is the event dataset of the Kubernetes package. It collects Kubernetes events related metrics.

If Leader Election is activated (default behaviour) only the elastic agent which holds the leadership lock will retrieve events related metrics. This is relevant in multi-node kubernetes cluster and prevents duplicate data.

An example event for event looks as following:

{
    "@timestamp": "2020-06-25T12:30:27.575Z",
    "metricset": {
        "name": "event"
    },
    "agent": {
        "type": "metricbeat",
        "version": "8.0.0",
        "ephemeral_id": "644323b5-5d6a-4dfb-92dd-35ca602db487",
        "id": "a6147a6e-6626-4a84-9907-f372f6c61eee",
        "name": "agent-ingest-management-clusterscope-674dbb75df-rp8cc"
    },
    "ecs": {
        "version": "1.5.0"
    },
    "event": {
        "dataset": "kubernetes.event",
        "module": "kubernetes"
    },
    "service": {
        "type": "kubernetes"
    },
    "kubernetes": {
        "event": {
            "metadata": {
                "uid": "604e39e0-862f-4615-9cec-8cb62299dea3",
                "resource_version": "485630",
                "timestamp": {
                    "created": "2020-06-25T07:20:25.000Z"
                },
                "name": "monitor.161bb862545e3099",
                "namespace": "beats",
                "self_link": "/api/v1/namespaces/beats/events/monitor.161bb862545e3099",
                "generate_name": ""
            },
            "timestamp": {
                "first_occurrence": "2020-06-25T07:20:25.000Z",
                "last_occurrence": "2020-06-25T12:30:27.000Z"
            },
            "message": "Failed to find referenced backend beats/monitor: Elasticsearch.elasticsearch.k8s.elastic.co \"monitor\" not found",
            "reason": "AssociationError",
            "type": "Warning",
            "count": 1861,
            "source": {
                "host": "",
                "component": "kibana-association-controller"
            },
            "involved_object": {
                "api_version": "kibana.k8s.elastic.co/v1",
                "resource_version": "101842",
                "name": "monitor",
                "kind": "Kibana",
                "uid": "45a19de5-5eef-4090-a2d3-dbceb0a28af8"
            }
        }
    },
    "host": {
        "id": "b0e83d397c054b8a99a431072fe4617b",
        "containerized": false,
        "ip": [
            "172.17.0.11"
        ],
        "mac": [
            "02:42:ac:11:00:0b"
        ],
        "hostname": "agent-ingest-management-clusterscope-674dbb75df-rp8cc",
        "name": "agent-ingest-management-clusterscope-674dbb75df-rp8cc",
        "architecture": "x86_64",
        "os": {
            "platform": "centos",
            "version": "7 (Core)",
            "family": "redhat",
            "name": "CentOS Linux",
            "kernel": "4.19.81",
            "codename": "Core"
        }
    }
}

Exported fields

FieldDescriptionTypeMetric Type
@timestamp
Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events.
date
agent.id
Unique identifier of this agent (if one exists). Example: For Beats this would be beat.id.
keyword
cloud.account.id
The cloud account or organization id used to identify different entities in a multi-tenant environment. Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.
keyword
cloud.availability_zone
Availability zone in which this host, resource, or service is located.
keyword
cloud.image.id
Image ID for the cloud instance.
keyword
cloud.instance.id
Instance ID of the host machine.
keyword
cloud.instance.name
Instance name of the host machine.
keyword
cloud.machine.type
Machine type of the host machine.
keyword
cloud.project.id
The cloud project identifier. Examples: Google Cloud Project id, Azure Project id.
keyword
cloud.provider
Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
keyword
cloud.region
Region in which this host, resource, or service is located.
keyword
container.id
Unique container id.
keyword
container.image.name
Name of the image the container was built on.
keyword
container.labels
Image labels.
object
container.name
Container name.
keyword
data_stream.dataset
The field can contain anything that makes sense to signify the source of the data. Examples include nginx.access, prometheus, endpoint etc. For data streams that otherwise fit, but that do not have dataset set we use the value "generic" for the dataset value. event.dataset should have the same value as data_stream.dataset. Beyond the Elasticsearch data stream naming criteria noted above, the dataset value has additional restrictions: * Must not contain - * No longer than 100 characters
constant_keyword
data_stream.namespace
A user defined namespace. Namespaces are useful to allow grouping of data. Many users already organize their indices this way, and the data stream naming scheme now provides this best practice as a default. Many users will populate this field with default. If no value is used, it falls back to default. Beyond the Elasticsearch index naming criteria noted above, namespace value has the additional restrictions: * Must not contain - * No longer than 100 characters
constant_keyword
data_stream.type
An overarching type for the data stream. Currently allowed values are "logs" and "metrics". We expect to also add "traces" and "synthetics" in the near future.
constant_keyword
ecs.version
ECS version this event conforms to. ecs.version is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events.
keyword
host.architecture
Operating system architecture.
keyword
host.containerized
If the host is a container.
boolean
host.domain
Name of the domain of which the host is a member. For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider.
keyword
host.hostname
Hostname of the host. It normally contains what the hostname command returns on the host machine.
keyword
host.id
Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of beat.name.
keyword
host.ip
Host ip addresses.
ip
host.mac
Host MAC addresses. The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
keyword
host.name
Name of the host. It can contain what hostname returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.
keyword
host.os.build
OS build information.
keyword
host.os.codename
OS codename, if any.
keyword
host.os.family
OS family (such as redhat, debian, freebsd, windows).
keyword
host.os.kernel
Operating system kernel version as a raw string.
keyword
host.os.name
Operating system name, without the version.
keyword
host.os.name.text
Multi-field of host.os.name.
match_only_text
host.os.platform
Operating system platform (such centos, ubuntu, windows).
keyword
host.os.version
Operating system version as a raw string.
keyword
host.type
Type of host. For Cloud providers this can be the machine type like t2.medium. If vm, this could be the container, for example, or other information meaningful in your environment.
keyword
kubernetes.annotations.*
Kubernetes annotations map
object
kubernetes.container.image
Kubernetes container image
keyword
kubernetes.container.name
Kubernetes container name
keyword
kubernetes.deployment.name
Kubernetes deployment name
keyword
kubernetes.event.count
Count field records the number of times the particular event has occurred
long
counter
kubernetes.event.involved_object.api_version
API version of the object
keyword
kubernetes.event.involved_object.kind
API kind of the object
keyword
kubernetes.event.involved_object.name
name of the object
keyword
kubernetes.event.involved_object.resource_version
resource version of the object
keyword
kubernetes.event.involved_object.uid
uid version of the object
keyword
kubernetes.event.message
Message recorded for the given event
text
kubernetes.event.metadata.generate_name
Generate name of the event
keyword
kubernetes.event.metadata.name
Name of the event
keyword
kubernetes.event.metadata.namespace
Namespace in which event was generated
keyword
kubernetes.event.metadata.resource_version
Version of the event resource
keyword
kubernetes.event.metadata.self_link
URL representing the event
keyword
kubernetes.event.metadata.timestamp.created
Timestamp of creation of the given event
date
kubernetes.event.metadata.uid
Unique identifier to the event object
keyword
kubernetes.event.reason
Reason recorded for the given event
keyword
kubernetes.event.source.component
Component from which the event is generated
keyword
kubernetes.event.source.host
Node name on which the event is generated
keyword
kubernetes.event.timestamp.first_occurrence
Timestamp of first occurrence of event
date
kubernetes.event.timestamp.last_occurrence
Timestamp of last occurrence of event
date
kubernetes.event.type
Type of the given event
keyword
kubernetes.labels.*
Kubernetes labels map
object
kubernetes.namespace
Kubernetes namespace
keyword
kubernetes.node.hostname
Kubernetes hostname as reported by the node’s kernel
keyword
kubernetes.node.name
Kubernetes node name
keyword
kubernetes.pod.ip
Kubernetes pod IP
ip
kubernetes.pod.name
Kubernetes pod name
keyword
kubernetes.pod.uid
Kubernetes pod UID
keyword
kubernetes.replicaset.name
Kubernetes replicaset name
keyword
kubernetes.selectors.*
Kubernetes Service selectors map
object
kubernetes.statefulset.name
Kubernetes statefulset name
keyword
orchestrator.cluster.name
Name of the cluster.
keyword
orchestrator.cluster.url
URL of the API used to manage the cluster.
keyword
service.type
The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, service.type would be elasticsearch.
keyword

Changelog

VersionDetailsKibana version(s)

1.58.0

Enhancement View pull request
Migrate to format_version v3.

8.12.0 or higher

1.57.0

Enhancement View pull request
Container logs preserve original content based on pod annotations.

8.12.0 or higher

1.56.0

Enhancement View pull request
Add new fields to API server, state_node and persistent volume claim data streams.

8.12.0 or higher

1.55.1

Enhancement View pull request
Modify the field definitions to reference ECS.

8.11.0 or higher

1.55.0

Enhancement View pull request
Remove extra base fields from state data streams.

8.11.0 or higher

1.54.0

Enhancement View pull request
Expand condition support to remaining inputs

8.11.0 or higher

1.53.0

Enhancement View pull request
Update size of the metric visualizations

8.11.0 or higher

1.52.0

Enhancement View pull request
Add new data stream state_namespace.

8.11.0 or higher

1.51.0

Enhancement View pull request
Migrate Deployments dashboard visualizations to lens.

8.10.2 or higher

1.50.0

Enhancement View pull request
Migrate Cronjobs dashboard visualizations to lens

8.10.2 or higher

1.49.0

Enhancement View pull request
Migrate DaemonSets dashboard visualizations to lens.

8.10.2 or higher

1.48.0

Enhancement View pull request
Migrate StatefulSets dashboard visualizations to lens.

8.10.2 or higher

1.47.0

Enhancement View pull request
Migrate Jobs dashboard visualizations to lens.

8.10.2 or higher

1.46.0

Enhancement View pull request
Adapt fields for changes in file system info

8.10.1 or higher

1.45.0

Enhancement View pull request
Reroute container logs based on pod annotations.

8.10.0 or higher

1.44.0

Enhancement View pull request
Introducing kubernetes.deployment.status.* metrics

8.10.0 or higher

1.43.1

Enhancement View pull request
Updating index pattern for adHocDataviews for CCS use case

8.8.0 or higher

1.43.0

Enhancement View pull request
Expand index pattern for adHocDataviews for CCS use case

8.8.0 or higher

1.42.0

Enhancement View pull request
Add permissions to reroute events to logs-- for container_logs datastream

8.8.0 or higher

1.41.0

Enhancement View pull request
Enable time series data streams for the metrics datasets. This improves storage usage and query performance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/current/tsds.html

8.8.0 or higher

1.40.0

Bug fix View pull request
Fix system tests for kubernetes integration for k8s v1.27.0

8.8.0 or higher

1.40.0-beta.2

Bug fix View pull request
Fix volume dashboard.

1.40.0-beta.1

Bug fix View pull request
Fix proxy and scheduler visualization with missing sort field.

1.40.0-beta

Enhancement View pull request
Enable TSDS for metrics data_streams, except events for beta testing

1.39.0

Enhancement View pull request
Remove container.name as a dimension.

8.6.1 or higher

1.38.1

Enhancement View pull request
Switch max to last value on counter formulas and add missing sort field to proxy, controller manager and scheduler dashboard.

8.6.1 or higher

1.38.0

Enhancement View pull request
Fix Pod dashboard and remove some visualisations from Api Server dashboard to support TSDB migration

8.6.1 or higher

1.37.0

Enhancement View pull request
Update proxy, controller manager and scheduler dashboard to support TSDB.

8.6.1 or higher

1.36.0

Enhancement View pull request
Add container.name dimension to container data stream

8.6.1 or higher

1.35.0

Enhancement View pull request
Add NetworkUnavailable condition to state node

8.6.1 or higher

1.34.1

Enhancement View pull request
Add support for TSDB on all metric data streams except the state ones

8.6.1 or higher

1.34.0

Enhancement View pull request
Add support for TSDB on all state metric data streams

8.6.1 or higher

1.33.0

Enhancement View pull request
Add data_stream.dataset setting and custom yaml input.

8.6.1 or higher

1.32.2

Enhancement View pull request
Added link to docs for condition filter

8.6.1 or higher

1.32.1

Enhancement View pull request
Added categories and/or subcategories.

8.6.1 or higher

1.32.0

Enhancement View pull request
Add documentation for how to install alerts

8.6.1 or higher

1.31.2

Enhancement View pull request
Add system testing for state service datastream

8.6.1 or higher

1.31.1

Enhancement View pull request
Update controller manager, proxy and scheduler metrics and dashboards

8.6.1 or higher

1.31.0

Enhancement View pull request
Use datas_tream.dataset as pre filters for dashboards and remove tags

8.6.0 or higher

1.30.0

Enhancement View pull request
Add missing namespace_uid and namespace_labels fields

8.6.0 or higher

1.29.2

Bug fix View pull request
Fix function for memory node usage

8.5.0 or higher

1.29.1

Bug fix View pull request
Fix removed condition setting for container_logs

8.5.0 or higher

1.29.0

Bug fix View pull request
Remove "Control Plane" column from Node Information table

8.5.0 or higher

1.28.2

Bug fix View pull request
Fix Pod Memory usage panel title

8.5.0 or higher

1.28.1

Enhancement View pull request
Delete statefulset, job and cronjob visualizations from Cluster Overview dashboard

8.5.0 or higher

1.28.0

Enhancement View pull request
Adding banner for Kube-state metrics

8.5.0 or higher

1.27.1

Enhancement View pull request
Fix typo in cluster overview dashboard

8.5.0 or higher

1.27.0

Enhancement View pull request
New cluster overview dashboard

8.5.0 or higher

1.26.0

Enhancement View pull request
Add processors configuration option for Kubernetes data_streams

8.4.0 or higher

1.25.0

Enhancement View pull request
Add condition configuration option to container logs data stream

8.4.0 or higher

1.24.0

Enhancement View pull request
Add fields to audit logs data stream

8.4.0 or higher

1.23.1

Enhancement View pull request
Add missing dimension fields

8.4.0 or higher

1.23.0

Enhancement View pull request
Add fields to audit logs data stream

8.4.0 or higher

1.22.1

Enhancement View pull request
Fix overlapping fields in state_job data stream

8.4.0 or higher

1.22.0

Enhancement View pull request
Update apiserver and controllermanaged deprecated fields and dashboards

8.4.0 or higher

1.21.2

Bug fix View pull request
add container ID and pod name as part of Kubernetes Cotainer Logs filestream input

8.3.0 or higher

1.21.1

Enhancement View pull request
improved the wording of the link to Kubernetes documentation

8.3.0 or higher

1.21.0

Enhancement View pull request
Add new dashboards

8.3.0 or higher

1.20.0

Enhancement View pull request
Change fields type for audit_logs data_stream to use requestObject and responseObject fields of audit events. Disable dynamic mapping for audit_logs data_stream. Drop kubernetes.audit.responseObject.metadata and kubernetes.audit.requestObject.metadata

8.2.0 or higher

1.19.1

Enhancement View pull request
Add documentation for volume field

8.2.0 or higher

1.19.0

Enhancement View pull request
Add missed ecs fields

8.2.0 or higher

1.18.1

Enhancement View pull request
Add documentation for multi-fields

8.2.0 or higher

1.18.0

Enhancement View pull request
Fix k8s overview dashboard

8.2.0 or higher

1.17.3

Bug fix View pull request
Remove incorrectly tagged boolean dimension

7.16.0 or higher
8.0.0 or higher

1.17.2

Bug fix View pull request
Add missing metadata fields

7.16.0 or higher
8.0.0 or higher

1.17.1

Enhancement View pull request
Improve default ndjson parser configuration

1.17.0

Enhancement View pull request
Disable audit logs collection by default

1.16.0

Enhancement View pull request
Documentation improvements

1.15.0

Enhancement View pull request
Add ssl.certificate_authorities configuration

1.14.3

Bug fix View pull request
Add missing job.name and cronjob.name fields to state_container datastream

1.14.2

Bug fix View pull request
Add missing job.name and cronjob.name fields to container related datastreams

1.14.1

Bug fix View pull request
Add missing job.name and cronjob.name fields added by metadata generators

1.14.0

Enhancement View pull request
Tune state_metrics settings

1.13.0

Enhancement View pull request
Update to ECS 8.0

1.12.0

Enhancement View pull request
Expose add_recourse_metadata configuration option

1.11.0

Enhancement View pull request
Add memory.working_set.limit.pct for pod and container data streams

1.10.0

Enhancement View pull request
Add leader election in state_job data stream

1.9.0

Enhancement View pull request
Add missing fields

7.16.0 or higher
8.0.0 or higher

1.8.1

Bug fix View pull request
Set kubernetes.volume.fs.used.pct to scaled_float

7.16.0 or higher
8.0.0 or higher

1.8.0

Enhancement View pull request
Support json logs parsing

7.16.0 or higher
8.0.0 or higher

1.7.0

Enhancement View pull request
Add new audit logs data stream in kubernetes integration

7.16.0 or higher
8.0.0 or higher

1.6.0

Enhancement View pull request
Add skip_older option for event datastream

7.16.0 or higher
8.0.0 or higher

1.5.0

Enhancement View pull request
Revert Kubernetes namespace field breaking change

7.16.0 or higher
8.0.0 or higher

1.4.2

Enhancement View pull request
Add dimension fields

1.4.1

Enhancement View pull request
Remove overriding of index pattern on the Kubernetes overview dashboard

8.0.0 or higher

1.4.0

Enhancement View pull request
Use filestream input for container_logs data stream

1.3.3

Bug fix View pull request
Fix conditions of data_streams that are based on k8s labels & add condition in pipelines

1.3.2

Enhancement View pull request
Set default host for proxy to localhost

1.3.1

Enhancement View pull request
Uniform with guidelines

1.3.0

Enhancement View pull request
Add container_logs ecs fields

1.2.1

Bug fix View pull request
Update Kubernetes cluster_ip field type

1.2.0

Enhancement View pull request
Update Kubernetes namespace field

1.1.1

Bug fix View pull request
Update Kubernetes integration Readme

1.1.0

Enhancement View pull request
Update to ECS 1.12.0

7.15.0 or higher

1.0.0

Enhancement View pull request
Release Kubernetes as GA

0.14.1

Enhancement View pull request
Update default host in kubernetes proxy data stream in kubernetes integration

0.14.0

Enhancement View pull request
Add new container logs data stream in kubernetes integration

0.13.0

Enhancement View pull request
Leverage dynamic kubernetes provider for controller and scheduler datastream

0.12.2

Bug fix View pull request
Add missing field "kubernetes.daemonset.name" field for pod and container data streams

0.12.1

Bug fix View pull request
Add missing cluster filter for "orchestrator.cluster.name" field in [Metrics Kubernetes] Overview dashboard and Dashboard section in the integration overview page

0.12.0

Enhancement View pull request
Update kubernetes package ecs fields with orchestrator.cluster.url and orchestrator.cluster.name

0.11.1

Enhancement View pull request
Escape special characters in docs

0.11.0

Enhancement View pull request
Update documentation to fit mdx spec

0.10.0

Enhancement View pull request
Update integration description

0.9.1

Bug fix View pull request
Add missing field "kubernetes.daemonset.name" field for state_pod and state_container

0.9.0

Enhancement View pull request
Enhance kubernetes package with state_job data stream

0.8.0

Enhancement View pull request
Leverage leader election in kubernetes integration

0.7.0

Enhancement View pull request
Add _meta information to Kubernetes fields

0.6.0

Enhancement View pull request
Introduce kubernetes package granularity using input_groups

0.5.3

Enhancement View pull request
Add missing field "kubernetes.statefulset.replicas.ready"

0.5.2

Bug fix View pull request
Fix stack compatability

0.5.1

Bug fix View pull request
Fix references to env variables

0.5.0

Enhancement View pull request
Add missing field "kubernetes.selectors.*" and extra https settings for controllermanager and scheduler datastreams

0.4.5

Enhancement View pull request
Add missing field "kubernetes.pod.ip"

0.4.4

Enhancement View pull request
Updating package owner

0.4.3

Bug fix View pull request
Correct sample event file.

0.4.2

Bug fix View pull request
Change kibana.version constraint to be more conservative.

0.4.1

Enhancement View pull request
Add missing fields

0.1.0

Enhancement View pull request
initial release

On this page