Skip to content

Commit

Permalink
[Azure] [Container_instance] Add dimensions and metric_type metadata …
Browse files Browse the repository at this point in the history
…for the container_instance data_stream (#7127)

* add dimensions and metric_type metadata for the container_instance data_stream

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* address review comments

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add agent.id field

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* extend azure.container_instance field

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
  • Loading branch information
tetianakravchenko committed Aug 2, 2023
1 parent 2877d7e commit 1ca98fb
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 148 deletions.
5 changes: 5 additions & 0 deletions packages/azure_metrics/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: "1.0.17"
changes:
- description: Add dimension and metric_type metadata to the container_instance datastream
type: enhancement
link: https://github.com/elastic/integrations/pull/7127
- version: "1.0.16"
changes:
- description: Added categories and/or subcategories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
ignore_above: 1024
description: Region in which this host is running.
example: us-east-1
dimension: true
- name: project.id
type: keyword
description: Name of the project in Google Cloud.
Expand All @@ -62,26 +63,11 @@
These fields help correlate data based containers from any runtime.'
type: group
fields:
- name: id
level: core
type: keyword
ignore_above: 1024
description: Unique container id.
- name: image.name
level: extended
type: keyword
ignore_above: 1024
description: Name of the image the container was built on.
- name: labels
level: extended
type: object
object_type: keyword
description: Image labels.
- name: name
level: extended
type: keyword
ignore_above: 1024
description: Container name.
- name: host
title: Host
group: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
external: ecs
- name: host
external: ecs
- name: agent.id
external: ecs
dimension: true
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
- name: azure.container_instance.*.*
type: object
object_type: float
object_type_mapping_type: "*"
description: >
container instance
- name: azure.container_instance
type: group
fields:
- name: cpu_usage.avg
type: float
metric_type: gauge
description: CPU usage on all cores in millicores.
- name: memory_usage.avg
type: float
metric_type: gauge
unit: byte
description: Total memory usage in byte.
- name: network_bytes_received_per_second.avg
type: float
metric_type: gauge
unit: byte
description: The network bytes received per second.
- name: network_bytes_transmitted_per_second.avg
type: float
metric_type: gauge
unit: byte
description: The network bytes transmitted per second.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
type: group
description: ""
fields:
# Reason to add as a dimension field: the same metric can be pulled multiple times, but with the different granularity
- name: timegrain
dimension: true
type: keyword
description: >
The Azure metric timegrain
Expand All @@ -23,8 +25,11 @@
description: >
The name of the resource
# Reason to add as a dimension field: it is an unique global resource identifier in the region
# format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- name: id
type: keyword
dimension: true
description: >
The id of the resource
Expand Down Expand Up @@ -55,17 +60,33 @@
description: >
The application ID
- name: dimensions.*
type: object
object_type: keyword
object_type_mapping_type: "*"
description: >
Azure metric dimensions.
- name: metrics.*.*
type: object
object_type: float
object_type_mapping_type: "*"
description: >
Metrics returned.
- name: dimensions
type: group
fields:
- name: container_name
type: keyword
dimension: true
description: The container name

- name: metrics
type: group
fields:
- name: cpu_usage.avg
type: float
metric_type: gauge
description: CPU usage on all cores in millicores.
- name: memory_usage.avg
type: float
metric_type: gauge
unit: byte
description: Total memory usage in byte.
- name: network_bytes_received_per_second.avg
type: float
metric_type: gauge
unit: byte
description: The network bytes received per second.
- name: network_bytes_transmitted_per_second.avg
type: float
metric_type: gauge
unit: byte
description: The network bytes transmitted per second.
119 changes: 63 additions & 56 deletions packages/azure_metrics/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,62 +312,69 @@ so the `period` for `container_instance` should be `300s` or multiples of `300s`

**Exported fields**

| Field | Description | Type |
|---|---|---|
| @timestamp | Event timestamp. | date |
| azure.application_id | The application ID | keyword |
| azure.container_instance.\*.\* | container instance | object |
| azure.dimensions.\* | Azure metric dimensions. | object |
| azure.metrics.\*.\* | Metrics returned. | object |
| azure.namespace | The namespace selected | keyword |
| azure.resource.group | The resource group | keyword |
| azure.resource.id | The id of the resource | keyword |
| azure.resource.name | The name of the resource | keyword |
| azure.resource.tags.\* | Azure resource tags. | object |
| azure.resource.type | The type of the resource | keyword |
| azure.subscription_id | The subscription ID | keyword |
| azure.timegrain | The Azure metric timegrain | 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 is running. | 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 | Name of the project in Google Cloud. | keyword |
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword |
| cloud.region | Region in which this host is running. | 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 |
| container.runtime | Runtime managing this container. | keyword |
| data_stream.dataset | Data stream dataset name. | constant_keyword |
| data_stream.namespace | Data stream namespace. | constant_keyword |
| data_stream.type | Data stream type. | constant_keyword |
| dataset.name | Dataset name. | constant_keyword |
| dataset.namespace | Dataset namespace. | constant_keyword |
| dataset.type | Dataset type. | 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 | 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 |
| 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. | 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`. | 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 |
| service.address | Service address | 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 |
| Field | Description | Type | Unit | Metric Type |
|---|---|---|---|---|
| @timestamp | Event timestamp. | date | | |
| agent.id | Unique identifier of this agent (if one exists). Example: For Beats this would be beat.id. | keyword | | |
| azure.application_id | The application ID | keyword | | |
| azure.container_instance.cpu_usage.avg | CPU usage on all cores in millicores. | float | | gauge |
| azure.container_instance.memory_usage.avg | Total memory usage in byte. | float | byte | gauge |
| azure.container_instance.network_bytes_received_per_second.avg | The network bytes received per second. | float | byte | gauge |
| azure.container_instance.network_bytes_transmitted_per_second.avg | The network bytes transmitted per second. | float | byte | gauge |
| azure.dimensions.container_name | The container name | keyword | | |
| azure.metrics.cpu_usage.avg | CPU usage on all cores in millicores. | float | | gauge |
| azure.metrics.memory_usage.avg | Total memory usage in byte. | float | byte | gauge |
| azure.metrics.network_bytes_received_per_second.avg | The network bytes received per second. | float | byte | gauge |
| azure.metrics.network_bytes_transmitted_per_second.avg | The network bytes transmitted per second. | float | byte | gauge |
| azure.namespace | The namespace selected | keyword | | |
| azure.resource.group | The resource group | keyword | | |
| azure.resource.id | The id of the resource | keyword | | |
| azure.resource.name | The name of the resource | keyword | | |
| azure.resource.tags.\* | Azure resource tags. | object | | |
| azure.resource.type | The type of the resource | keyword | | |
| azure.subscription_id | The subscription ID | keyword | | |
| azure.timegrain | The Azure metric timegrain | 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 is running. | 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 | Name of the project in Google Cloud. | keyword | | |
| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | | |
| cloud.region | Region in which this host is running. | 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 | | |
| container.runtime | Runtime managing this container. | keyword | | |
| data_stream.dataset | Data stream dataset name. | constant_keyword | | |
| data_stream.namespace | Data stream namespace. | constant_keyword | | |
| data_stream.type | Data stream type. | constant_keyword | | |
| dataset.name | Dataset name. | constant_keyword | | |
| dataset.namespace | Dataset namespace. | constant_keyword | | |
| dataset.type | Dataset type. | 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 | 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 | | |
| 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. | 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`. | 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 | | |
| service.address | Service address | 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 | | |


`container_registry`
Expand Down

0 comments on commit 1ca98fb

Please sign in to comment.