From 2da97c4df6b13ad58c7325bc2579fc3b2f81c996 Mon Sep 17 00:00:00 2001 From: Tetiana Kravchenko Date: Tue, 5 Sep 2023 17:18:24 +0200 Subject: [PATCH 1/2] Use ecs definition of the 'event.dataset' field Signed-off-by: Tetiana Kravchenko --- packages/prometheus/changelog.yml | 5 +++++ .../prometheus/data_stream/collector/fields/base-fields.yml | 4 ---- packages/prometheus/data_stream/collector/fields/ecs.yml | 2 ++ .../prometheus/data_stream/query/fields/base-fields.yml | 4 ---- packages/prometheus/data_stream/query/fields/ecs.yml | 2 ++ .../data_stream/remote_write/fields/base-fields.yml | 4 ---- packages/prometheus/data_stream/remote_write/fields/ecs.yml | 2 ++ packages/prometheus/docs/README.md | 6 +++--- packages/prometheus/manifest.yml | 2 +- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/packages/prometheus/changelog.yml b/packages/prometheus/changelog.yml index 58885fe6d52..7fbeae2b83b 100644 --- a/packages/prometheus/changelog.yml +++ b/packages/prometheus/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.12.0" + changes: + - description: Use ecs definition of the 'event.dataset' field + type: enhancement + link: https://github.com/elastic/integrations/pull/7598 - version: "1.11.0" changes: - description: Enable TSDB by default for remote_write datastreams. This improves storage usage and query performance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/current/tsds.html diff --git a/packages/prometheus/data_stream/collector/fields/base-fields.yml b/packages/prometheus/data_stream/collector/fields/base-fields.yml index d80b3f4fd9b..149aead8990 100644 --- a/packages/prometheus/data_stream/collector/fields/base-fields.yml +++ b/packages/prometheus/data_stream/collector/fields/base-fields.yml @@ -14,7 +14,3 @@ type: constant_keyword description: Event module. value: prometheus -- name: event.dataset - type: constant_keyword - description: Event dataset. - value: prometheus.collector diff --git a/packages/prometheus/data_stream/collector/fields/ecs.yml b/packages/prometheus/data_stream/collector/fields/ecs.yml index 3da8d090560..00a5f46cd71 100644 --- a/packages/prometheus/data_stream/collector/fields/ecs.yml +++ b/packages/prometheus/data_stream/collector/fields/ecs.yml @@ -8,3 +8,5 @@ - external: ecs name: agent.id dimension: true +- external: ecs + name: event.dataset diff --git a/packages/prometheus/data_stream/query/fields/base-fields.yml b/packages/prometheus/data_stream/query/fields/base-fields.yml index 713fd3fe02d..149aead8990 100644 --- a/packages/prometheus/data_stream/query/fields/base-fields.yml +++ b/packages/prometheus/data_stream/query/fields/base-fields.yml @@ -14,7 +14,3 @@ type: constant_keyword description: Event module. value: prometheus -- name: event.dataset - type: constant_keyword - description: Event dataset. - value: prometheus.query diff --git a/packages/prometheus/data_stream/query/fields/ecs.yml b/packages/prometheus/data_stream/query/fields/ecs.yml index 3da8d090560..00a5f46cd71 100644 --- a/packages/prometheus/data_stream/query/fields/ecs.yml +++ b/packages/prometheus/data_stream/query/fields/ecs.yml @@ -8,3 +8,5 @@ - external: ecs name: agent.id dimension: true +- external: ecs + name: event.dataset diff --git a/packages/prometheus/data_stream/remote_write/fields/base-fields.yml b/packages/prometheus/data_stream/remote_write/fields/base-fields.yml index 91357799423..149aead8990 100644 --- a/packages/prometheus/data_stream/remote_write/fields/base-fields.yml +++ b/packages/prometheus/data_stream/remote_write/fields/base-fields.yml @@ -14,7 +14,3 @@ type: constant_keyword description: Event module. value: prometheus -- name: event.dataset - type: constant_keyword - description: Event dataset. - value: prometheus.remote_write diff --git a/packages/prometheus/data_stream/remote_write/fields/ecs.yml b/packages/prometheus/data_stream/remote_write/fields/ecs.yml index a27448fb353..869623a49da 100644 --- a/packages/prometheus/data_stream/remote_write/fields/ecs.yml +++ b/packages/prometheus/data_stream/remote_write/fields/ecs.yml @@ -7,3 +7,5 @@ - external: ecs name: agent.id dimension: true +- external: ecs + name: event.dataset diff --git a/packages/prometheus/docs/README.md b/packages/prometheus/docs/README.md index 2bbb8563c8f..a26b9bdffc4 100644 --- a/packages/prometheus/docs/README.md +++ b/packages/prometheus/docs/README.md @@ -200,7 +200,7 @@ The fields reported are: | 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.dataset | Name of the dataset. If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from. It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name. | keyword | | | event.module | Event module. | constant_keyword | | | host.architecture | Operating system architecture. | keyword | | | host.containerized | If the host is a container. | boolean | | @@ -414,7 +414,7 @@ The fields reported are: | 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.dataset | Name of the dataset. If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from. It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name. | keyword | | | event.module | Event module. | constant_keyword | | | host.architecture | Operating system architecture. | keyword | | | host.containerized | If the host is a container. | boolean | | @@ -637,7 +637,7 @@ The fields reported are: | 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.dataset | Name of the dataset. If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from. It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name. | keyword | | | event.module | Event module. | constant_keyword | | | host.architecture | Operating system architecture. | keyword | | | host.containerized | If the host is a container. | boolean | | diff --git a/packages/prometheus/manifest.yml b/packages/prometheus/manifest.yml index 156ce8bd150..5010a81f9fd 100644 --- a/packages/prometheus/manifest.yml +++ b/packages/prometheus/manifest.yml @@ -1,7 +1,7 @@ format_version: 2.10.0 name: prometheus title: Prometheus -version: 1.11.0 +version: 1.12.0 description: Collect metrics from Prometheus servers with Elastic Agent. type: integration categories: From 896581e0c4d6439ea8a5e9ebe1ad7d9d99f27f8c Mon Sep 17 00:00:00 2001 From: Tetiana Kravchenko Date: Tue, 5 Sep 2023 17:23:58 +0200 Subject: [PATCH 2/2] Update changelog.yml --- packages/prometheus/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/prometheus/changelog.yml b/packages/prometheus/changelog.yml index 7fbeae2b83b..0a84003458f 100644 --- a/packages/prometheus/changelog.yml +++ b/packages/prometheus/changelog.yml @@ -3,7 +3,7 @@ changes: - description: Use ecs definition of the 'event.dataset' field type: enhancement - link: https://github.com/elastic/integrations/pull/7598 + link: https://github.com/elastic/integrations/pull/7667 - version: "1.11.0" changes: - description: Enable TSDB by default for remote_write datastreams. This improves storage usage and query performance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/current/tsds.html