Skip to content

Commit e193098

Browse files
[Azure] [monitor] Add dimension and metric_type metadata to the monitor datastream (#7473)
* Add dimension and metric_type metadata to the monitor datastream Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * fix pr url in cahangelog; add ingest pipeline Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * address pr review Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> --------- Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
1 parent bcd0bbd commit e193098

File tree

9 files changed

+148
-131
lines changed

9 files changed

+148
-131
lines changed

packages/azure_metrics/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- version: "1.0.34"
2+
changes:
3+
- description: Add dimension and metric_type metadata to the monitor datastream
4+
type: enhancement
5+
link: https://github.com/elastic/integrations/pull/7473
16
- version: "1.0.33"
27
changes:
38
- description: Add missing region dimension, remove outdated azure metrics for the database_account datastream
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Pipeline for parsing azure monitor metrics.
3+
processors:
4+
- fingerprint:
5+
fields: ["azure.dimensions"]
6+
target_field: 'azure.dimensions.fingerprint'
7+
ignore_missing: true
8+
on_failure:
9+
- set:
10+
field: event.kind
11+
value: pipeline_error
12+
- set:
13+
field: error.message
14+
value: '{{{ _ingest.on_failure_message }}}'

packages/azure_metrics/data_stream/monitor/fields/agent.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
ignore_above: 1024
4949
description: Region in which this host is running.
5050
example: us-east-1
51+
dimension: true
5152
- name: project.id
5253
type: keyword
5354
description: Name of the project in Google Cloud.
@@ -62,26 +63,11 @@
6263
These fields help correlate data based containers from any runtime.'
6364
type: group
6465
fields:
65-
- name: id
66-
level: core
67-
type: keyword
68-
ignore_above: 1024
69-
description: Unique container id.
70-
- name: image.name
71-
level: extended
72-
type: keyword
73-
ignore_above: 1024
74-
description: Name of the image the container was built on.
7566
- name: labels
7667
level: extended
7768
type: object
7869
object_type: keyword
7970
description: Image labels.
80-
- name: name
81-
level: extended
82-
type: keyword
83-
ignore_above: 1024
84-
description: Container name.
8571
- name: host
8672
title: Host
8773
group: 2

packages/azure_metrics/data_stream/monitor/fields/ecs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@
1515
external: ecs
1616
- name: host
1717
external: ecs
18+
- name: agent.id
19+
external: ecs
20+
dimension: true

packages/azure_metrics/data_stream/monitor/fields/fields.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/azure_metrics/data_stream/monitor/fields/package-fields.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
fields:
55
- name: timegrain
66
type: keyword
7+
dimension: true
78
description: >
89
The Azure metric timegrain
910
@@ -25,6 +26,7 @@
2526
2627
- name: id
2728
type: keyword
29+
dimension: true
2830
description: >
2931
The id of the resource
3032
@@ -42,6 +44,7 @@
4244
4345
- name: namespace
4446
type: keyword
47+
dimension: true
4548
description: >
4649
The namespace selected
4750
@@ -62,10 +65,17 @@
6265
description: >
6366
Azure metric dimensions.
6467
68+
- name: dimensions.fingerprint
69+
type: keyword
70+
description: |
71+
Autogenerated ID representing the fingerprint of the azure.dimensions object
72+
dimension: true
73+
6574
- name: metrics.*.*
6675
type: object
6776
object_type: float
6877
object_type_mapping_type: "*"
78+
metric_type: gauge
6979
description: >
7080
Metrics returned.
7181

packages/azure_metrics/docs/README.md

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -57,61 +57,63 @@ aggregation list, namespaces and metric dimensions. The monitor metrics will hav
5757

5858
**Exported fields**
5959

60-
| Field | Description | Type |
61-
|---|---|---|
62-
| @timestamp | Event timestamp. | date |
63-
| azure.application_id | The application ID | keyword |
64-
| azure.dimensions.\* | Azure metric dimensions. | object |
65-
| azure.metrics.\*.\* | Metrics returned. | object |
66-
| azure.namespace | The namespace selected | keyword |
67-
| azure.resource.group | The resource group | keyword |
68-
| azure.resource.id | The id of the resource | keyword |
69-
| azure.resource.name | The name of the resource | keyword |
70-
| azure.resource.tags.\* | Azure resource tags. | object |
71-
| azure.resource.type | The type of the resource | keyword |
72-
| azure.subscription_id | The subscription ID | keyword |
73-
| azure.timegrain | The Azure metric timegrain | keyword |
74-
| 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 |
75-
| cloud.availability_zone | Availability zone in which this host is running. | keyword |
76-
| cloud.image.id | Image ID for the cloud instance. | keyword |
77-
| cloud.instance.id | Instance ID of the host machine. | keyword |
78-
| cloud.instance.name | Instance name of the host machine. | keyword |
79-
| cloud.machine.type | Machine type of the host machine. | keyword |
80-
| cloud.project.id | Name of the project in Google Cloud. | keyword |
81-
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword |
82-
| cloud.region | Region in which this host is running. | keyword |
83-
| container.id | Unique container id. | keyword |
84-
| container.image.name | Name of the image the container was built on. | keyword |
85-
| container.labels | Image labels. | object |
86-
| container.name | Container name. | keyword |
87-
| container.runtime | Runtime managing this container. | keyword |
88-
| data_stream.dataset | Data stream dataset name. | constant_keyword |
89-
| data_stream.namespace | Data stream namespace. | constant_keyword |
90-
| data_stream.type | Data stream type. | constant_keyword |
91-
| dataset.name | Dataset name. | constant_keyword |
92-
| dataset.namespace | Dataset namespace. | constant_keyword |
93-
| dataset.type | Dataset type. | constant_keyword |
94-
| 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 |
95-
| host | A host is defined as a general computing instance. ECS host.\* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes. | group |
96-
| host.architecture | Operating system architecture. | keyword |
97-
| host.containerized | If the host is a container. | boolean |
98-
| 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 |
99-
| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword |
100-
| 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 |
101-
| host.ip | Host ip addresses. | ip |
102-
| host.mac | Host mac addresses. | keyword |
103-
| 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 |
104-
| host.os.build | OS build information. | keyword |
105-
| host.os.codename | OS codename, if any. | keyword |
106-
| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword |
107-
| host.os.kernel | Operating system kernel version as a raw string. | keyword |
108-
| host.os.name | Operating system name, without the version. | keyword |
109-
| host.os.name.text | Multi-field of `host.os.name`. | text |
110-
| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword |
111-
| host.os.version | Operating system version as a raw string. | keyword |
112-
| 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 |
113-
| service.address | Service address | keyword |
114-
| 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 |
60+
| Field | Description | Type | Metric Type |
61+
|---|---|---|---|
62+
| @timestamp | Event timestamp. | date | |
63+
| agent.id | Unique identifier of this agent (if one exists). Example: For Beats this would be beat.id. | keyword | |
64+
| azure.application_id | The application ID | keyword | |
65+
| azure.dimensions.\* | Azure metric dimensions. | object | |
66+
| azure.dimensions.fingerprint | Autogenerated ID representing the fingerprint of the azure.dimensions object | keyword | |
67+
| azure.metrics.\*.\* | Metrics returned. | object | gauge |
68+
| azure.namespace | The namespace selected | keyword | |
69+
| azure.resource.group | The resource group | keyword | |
70+
| azure.resource.id | The id of the resource | keyword | |
71+
| azure.resource.name | The name of the resource | keyword | |
72+
| azure.resource.tags.\* | Azure resource tags. | object | |
73+
| azure.resource.type | The type of the resource | keyword | |
74+
| azure.subscription_id | The subscription ID | keyword | |
75+
| azure.timegrain | The Azure metric timegrain | keyword | |
76+
| 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 | |
77+
| cloud.availability_zone | Availability zone in which this host is running. | keyword | |
78+
| cloud.image.id | Image ID for the cloud instance. | keyword | |
79+
| cloud.instance.id | Instance ID of the host machine. | keyword | |
80+
| cloud.instance.name | Instance name of the host machine. | keyword | |
81+
| cloud.machine.type | Machine type of the host machine. | keyword | |
82+
| cloud.project.id | Name of the project in Google Cloud. | keyword | |
83+
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | |
84+
| cloud.region | Region in which this host is running. | keyword | |
85+
| container.id | Unique container id. | keyword | |
86+
| container.image.name | Name of the image the container was built on. | keyword | |
87+
| container.labels | Image labels. | object | |
88+
| container.name | Container name. | keyword | |
89+
| container.runtime | Runtime managing this container. | keyword | |
90+
| data_stream.dataset | Data stream dataset name. | constant_keyword | |
91+
| data_stream.namespace | Data stream namespace. | constant_keyword | |
92+
| data_stream.type | Data stream type. | constant_keyword | |
93+
| dataset.name | Dataset name. | constant_keyword | |
94+
| dataset.namespace | Dataset namespace. | constant_keyword | |
95+
| dataset.type | Dataset type. | constant_keyword | |
96+
| 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 | |
97+
| host | A host is defined as a general computing instance. ECS host.\* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes. | group | |
98+
| host.architecture | Operating system architecture. | keyword | |
99+
| host.containerized | If the host is a container. | boolean | |
100+
| 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 | |
101+
| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | |
102+
| 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 | |
103+
| host.ip | Host ip addresses. | ip | |
104+
| host.mac | Host mac addresses. | keyword | |
105+
| 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 | |
106+
| host.os.build | OS build information. | keyword | |
107+
| host.os.codename | OS codename, if any. | keyword | |
108+
| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | |
109+
| host.os.kernel | Operating system kernel version as a raw string. | keyword | |
110+
| host.os.name | Operating system name, without the version. | keyword | |
111+
| host.os.name.text | Multi-field of `host.os.name`. | text | |
112+
| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | |
113+
| host.os.version | Operating system version as a raw string. | keyword | |
114+
| 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 | |
115+
| service.address | Service address | keyword | |
116+
| 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 | |
115117

116118

117119
`compute_vm`

0 commit comments

Comments
 (0)