From 7f55172e323491032170671dd168abf7d097aff7 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Fri, 4 Nov 2022 17:30:03 -0700 Subject: [PATCH 1/2] add custom processors and logs to log integration --- packages/log/changelog.yml | 5 +++++ .../data_stream/log/agent/stream/stream.yml.hbs | 10 ++++++++++ packages/log/data_stream/log/manifest.yml | 14 +++++++++++++- packages/log/manifest.yml | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/log/changelog.yml b/packages/log/changelog.yml index 058ba8e5bb2..2f0ecb8f41a 100644 --- a/packages/log/changelog.yml +++ b/packages/log/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.1.0" + changes: + - description: Add custom logs and processors + type: enhancement + link: https://github.com/elastic/integrations/pull/2538 - version: "1.0.0" changes: - description: Release Custom Logs as GA diff --git a/packages/log/data_stream/log/agent/stream/stream.yml.hbs b/packages/log/data_stream/log/agent/stream/stream.yml.hbs index 371933edee9..fcf34e24ab1 100644 --- a/packages/log/data_stream/log/agent/stream/stream.yml.hbs +++ b/packages/log/data_stream/log/agent/stream/stream.yml.hbs @@ -5,5 +5,15 @@ paths: data_stream: dataset: {{data_stream.dataset}} +{{#if processors.length}} +processors: +{{processors}} +{{/if}} +{{#if tags.length}} +tags: +{{#each tags as |tag i|}} +- {{tag}} +{{/each}} +{{/if}} {{custom}} diff --git a/packages/log/data_stream/log/manifest.yml b/packages/log/data_stream/log/manifest.yml index c3d93e36b7c..3280ec0b492 100644 --- a/packages/log/data_stream/log/manifest.yml +++ b/packages/log/data_stream/log/manifest.yml @@ -17,8 +17,20 @@ streams: title: Dataset name description: > Set the name for your dataset. Changing the dataset will send the data to a different index. You can't use `-` in the name of a dataset and only valid characters for [Elasticsearch index names](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html). - type: text + - name: tags + type: text + title: Tags + multi: true + show_user: false + - name: processors + type: yaml + title: Processors + multi: false + required: false + show_user: false + description: >- + Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details. - name: custom title: Custom configurations description: > diff --git a/packages/log/manifest.yml b/packages/log/manifest.yml index 9c2e128ef41..8a0ee836a6f 100644 --- a/packages/log/manifest.yml +++ b/packages/log/manifest.yml @@ -4,7 +4,7 @@ title: Custom Logs description: >- Collect custom logs with Elastic Agent. type: integration -version: 1.0.0 +version: 1.1.0 release: ga license: basic categories: From fda387ccf435da94ee5ba749e8085410a36fd094 Mon Sep 17 00:00:00 2001 From: Alex K <8418476+fearful-symmetry@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:37:19 -0800 Subject: [PATCH 2/2] Update packages/log/data_stream/log/manifest.yml Co-authored-by: Lee E Hinman <57081003+leehinman@users.noreply.github.com> --- packages/log/data_stream/log/manifest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/log/data_stream/log/manifest.yml b/packages/log/data_stream/log/manifest.yml index 3280ec0b492..fecaf4b9348 100644 --- a/packages/log/data_stream/log/manifest.yml +++ b/packages/log/data_stream/log/manifest.yml @@ -21,6 +21,7 @@ streams: - name: tags type: text title: Tags + description: Tags to include in the published event multi: true show_user: false - name: processors