Skip to content

Commit 5c9fd3a

Browse files
committed
Added metric_type mapping for datastream consumer_group
1 parent 6cf89a6 commit 5c9fd3a

File tree

3 files changed

+76
-56
lines changed

3 files changed

+76
-56
lines changed

packages/kafka/changelog.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# newer versions go on top
2+
- version: "1.5.1"
3+
changes:
4+
- description: Add metric_type mapping for consumer_group datastream.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/5925
7+
- version: "1.5.0"
8+
changes:
9+
- description: Add metric_type mapping for broker datastream.
10+
type: enhancement
11+
link: https://github.com/elastic/integrations/pull/5923
212
- version: "1.4.1"
313
changes:
414
- description: Added categories and/or subcategories.

packages/kafka/data_stream/consumergroup/fields/fields.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
description: Consumer Group ID
77
- name: offset
88
type: long
9+
metric_type: gauge
910
description: consumer offset into partition being read
1011
- name: meta
1112
type: keyword
1213
description: custom consumer meta data string
1314
- name: consumer_lag
1415
type: long
16+
metric_type: gauge
1517
description: consumer lag for partition/topic calculated as the difference between the partition offset and consumer offset
1618
- name: error.code
1719
type: long

packages/kafka/docs/README.md

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,21 @@ An example event for `broker` looks as following:
129129
| Field | Description | Type |
130130
|---|---|---|
131131
| @timestamp | Event timestamp. | date |
132+
<<<<<<< HEAD
133+
=======
134+
| agent.id | Unique identifier of this agent (if one exists). Example: For Beats this would be beat.id. | keyword |
135+
>>>>>>> 53136fb29... Added metric_type mapping for datastream consumer_group
132136
| 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 |
133137
| cloud.availability_zone | Availability zone in which this host is running. | keyword |
134138
| cloud.image.id | Image ID for the cloud instance. | keyword |
135139
| cloud.instance.id | Instance ID of the host machine. | keyword |
136140
| cloud.instance.name | Instance name of the host machine. | keyword |
137141
| cloud.machine.type | Machine type of the host machine. | keyword |
142+
<<<<<<< HEAD
138143
| cloud.project.id | Name of the project in Google Cloud. | keyword |
144+
=======
145+
| cloud.project.id | The cloud project identifier. Examples: Google Cloud Project id, Azure Project id. | keyword |
146+
>>>>>>> 53136fb29... Added metric_type mapping for datastream consumer_group
139147
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword |
140148
| cloud.region | Region in which this host is running. | keyword |
141149
| container.id | Unique container id. | keyword |
@@ -259,62 +267,62 @@ An example event for `consumergroup` looks as following:
259267

260268
**Exported fields**
261269

262-
| Field | Description | Type |
263-
|---|---|---|
264-
| @timestamp | Event timestamp. | date |
265-
| 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 |
266-
| cloud.availability_zone | Availability zone in which this host is running. | keyword |
267-
| cloud.image.id | Image ID for the cloud instance. | keyword |
268-
| cloud.instance.id | Instance ID of the host machine. | keyword |
269-
| cloud.instance.name | Instance name of the host machine. | keyword |
270-
| cloud.machine.type | Machine type of the host machine. | keyword |
271-
| cloud.project.id | Name of the project in Google Cloud. | keyword |
272-
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword |
273-
| cloud.region | Region in which this host is running. | keyword |
274-
| container.id | Unique container id. | keyword |
275-
| container.image.name | Name of the image the container was built on. | keyword |
276-
| container.labels | Image labels. | object |
277-
| container.name | Container name. | keyword |
278-
| data_stream.dataset | Data stream dataset. | constant_keyword |
279-
| data_stream.namespace | Data stream namespace. | constant_keyword |
280-
| data_stream.type | Data stream type. | constant_keyword |
281-
| 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 |
282-
| event.dataset | Event dataset | constant_keyword |
283-
| event.module | Event module | constant_keyword |
284-
| host.architecture | Operating system architecture. | keyword |
285-
| host.containerized | If the host is a container. | boolean |
286-
| 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 |
287-
| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword |
288-
| 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 |
289-
| host.ip | Host ip addresses. | ip |
290-
| host.mac | Host mac addresses. | keyword |
291-
| 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 |
292-
| host.os.build | OS build information. | keyword |
293-
| host.os.codename | OS codename, if any. | keyword |
294-
| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword |
295-
| host.os.kernel | Operating system kernel version as a raw string. | keyword |
296-
| host.os.name | Operating system name, without the version. | keyword |
297-
| host.os.name.text | Multi-field of `host.os.name`. | text |
298-
| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword |
299-
| host.os.version | Operating system version as a raw string. | keyword |
300-
| 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 |
301-
| kafka.broker.address | Broker advertised address | keyword |
302-
| kafka.broker.id | Broker id | long |
303-
| kafka.consumergroup.client.host | Client host | keyword |
304-
| kafka.consumergroup.client.id | Client ID (kafka setting client.id) | keyword |
305-
| kafka.consumergroup.client.member_id | internal consumer group member ID | keyword |
306-
| kafka.consumergroup.consumer_lag | consumer lag for partition/topic calculated as the difference between the partition offset and consumer offset | long |
307-
| kafka.consumergroup.error.code | kafka consumer/partition error code. | long |
308-
| kafka.consumergroup.id | Consumer Group ID | keyword |
309-
| kafka.consumergroup.meta | custom consumer meta data string | keyword |
310-
| kafka.consumergroup.offset | consumer offset into partition being read | long |
311-
| kafka.partition.id | Partition id. | long |
312-
| kafka.partition.topic_broker_id | Unique id of the partition in the topic and the broker. | keyword |
313-
| kafka.partition.topic_id | Unique id of the partition in the topic. | keyword |
314-
| kafka.topic.error.code | Topic error code. | long |
315-
| kafka.topic.name | Topic name | keyword |
316-
| service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword |
317-
| 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 |
270+
| Field | Description | Type | Metric Type |
271+
|---|---|---|---|
272+
| @timestamp | Event timestamp. | date | |
273+
| 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 | |
274+
| cloud.availability_zone | Availability zone in which this host is running. | keyword | |
275+
| cloud.image.id | Image ID for the cloud instance. | keyword | |
276+
| cloud.instance.id | Instance ID of the host machine. | keyword | |
277+
| cloud.instance.name | Instance name of the host machine. | keyword | |
278+
| cloud.machine.type | Machine type of the host machine. | keyword | |
279+
| cloud.project.id | Name of the project in Google Cloud. | keyword | |
280+
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | |
281+
| cloud.region | Region in which this host is running. | keyword | |
282+
| container.id | Unique container id. | keyword | |
283+
| container.image.name | Name of the image the container was built on. | keyword | |
284+
| container.labels | Image labels. | object | |
285+
| container.name | Container name. | keyword | |
286+
| data_stream.dataset | Data stream dataset. | constant_keyword | |
287+
| data_stream.namespace | Data stream namespace. | constant_keyword | |
288+
| data_stream.type | Data stream type. | constant_keyword | |
289+
| 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 | |
290+
| event.dataset | Event dataset | constant_keyword | |
291+
| event.module | Event module | constant_keyword | |
292+
| host.architecture | Operating system architecture. | keyword | |
293+
| host.containerized | If the host is a container. | boolean | |
294+
| 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 | |
295+
| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | |
296+
| 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 | |
297+
| host.ip | Host ip addresses. | ip | |
298+
| host.mac | Host mac addresses. | keyword | |
299+
| 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 | |
300+
| host.os.build | OS build information. | keyword | |
301+
| host.os.codename | OS codename, if any. | keyword | |
302+
| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | |
303+
| host.os.kernel | Operating system kernel version as a raw string. | keyword | |
304+
| host.os.name | Operating system name, without the version. | keyword | |
305+
| host.os.name.text | Multi-field of `host.os.name`. | text | |
306+
| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | |
307+
| host.os.version | Operating system version as a raw string. | keyword | |
308+
| 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 | |
309+
| kafka.broker.address | Broker advertised address | keyword | |
310+
| kafka.broker.id | Broker id | long | |
311+
| kafka.consumergroup.client.host | Client host | keyword | |
312+
| kafka.consumergroup.client.id | Client ID (kafka setting client.id) | keyword | |
313+
| kafka.consumergroup.client.member_id | internal consumer group member ID | keyword | |
314+
| kafka.consumergroup.consumer_lag | consumer lag for partition/topic calculated as the difference between the partition offset and consumer offset | long | gauge |
315+
| kafka.consumergroup.error.code | kafka consumer/partition error code. | long | |
316+
| kafka.consumergroup.id | Consumer Group ID | keyword | |
317+
| kafka.consumergroup.meta | custom consumer meta data string | keyword | |
318+
| kafka.consumergroup.offset | consumer offset into partition being read | long | gauge |
319+
| kafka.partition.id | Partition id. | long | |
320+
| kafka.partition.topic_broker_id | Unique id of the partition in the topic and the broker. | keyword | |
321+
| kafka.partition.topic_id | Unique id of the partition in the topic. | keyword | |
322+
| kafka.topic.error.code | Topic error code. | long | |
323+
| kafka.topic.name | Topic name | keyword | |
324+
| service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | |
325+
| 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 | |
318326

319327

320328
### partition

0 commit comments

Comments
 (0)