Skip to content

Commit

Permalink
[NATS] Add subscriptions data stream dimensions (#7748)
Browse files Browse the repository at this point in the history
* add dimensions

* update docs

* bump package version

* remove ecs cloud fields

* Revert "remove ecs cloud fields"

This reverts commit e2d48ca.
  • Loading branch information
gpop63 authored Oct 12, 2023
1 parent eb62107 commit 557e492
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/nats/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.4.2"
changes:
- description: Add dimensions mappings and additional ECS fields to subscriptions data stream.
type: enhancement
link: https://github.com/elastic/integrations/pull/7748
- version: "1.4.1"
changes:
- description: Add metric_type mappings to stats data stream.
Expand Down
25 changes: 25 additions & 0 deletions packages/nats/data_stream/subscriptions/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,30 @@
name: ecs.version
- external: ecs
name: service.address
dimension: true
- external: ecs
name: service.type
- external: ecs
name: agent.id
dimension: true
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.region
dimension: true
- external: ecs
name: cloud.availability_zone
dimension: true
- external: ecs
name: cloud.instance.id
dimension: true
- external: ecs
name: cloud.provider
dimension: true
- external: ecs
name: container.id
dimension: true
- external: ecs
name: host.name
dimension: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
fields:
- name: server.id
type: keyword
dimension: true
description: |
The server ID
- name: server.time
Expand Down
8 changes: 8 additions & 0 deletions packages/nats/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,20 @@ An example event for `subscriptions` looks as following:
| Field | Description | Type |
|---|---|---|
| @timestamp | Event timestamp. | 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.instance.id | Instance ID of the host machine. | 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 |
| data_stream.dataset | Data stream dataset. | constant_keyword |
| data_stream.namespace | Data stream namespace. | constant_keyword |
| data_stream.type | Data stream 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 |
| event.dataset | Event dataset | constant_keyword |
| event.module | Event module | constant_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 |
| nats.server.id | The server ID | keyword |
| nats.server.time | Server time of metric creation | date |
| nats.subscriptions.cache.fanout.avg | The average fanout served by cache | double |
Expand Down
2 changes: 1 addition & 1 deletion packages/nats/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nats
title: NATS
version: 1.4.1
version: 1.4.2
release: ga
description: Collect logs and metrics from NATS servers with Elastic Agent.
type: integration
Expand Down

0 comments on commit 557e492

Please sign in to comment.