From 4c5e7517cdd14cd3dc5845bcd726d6dfb89fa697 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 29 May 2023 14:32:38 -0400 Subject: [PATCH 1/2] Add `condition` and `processors` settings to sql input --- packages/sql_input/agent/input/input.yml.hbs | 7 +++++++ packages/sql_input/changelog.yml | 5 +++++ packages/sql_input/manifest.yml | 17 ++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/sql_input/agent/input/input.yml.hbs b/packages/sql_input/agent/input/input.yml.hbs index 2f2e91d9569..2bf19a8f78a 100644 --- a/packages/sql_input/agent/input/input.yml.hbs +++ b/packages/sql_input/agent/input/input.yml.hbs @@ -3,6 +3,9 @@ hosts: {{#each hosts}} - {{this}} {{/each}} +{{#if condition}} +condition: {{ condition }} +{{/if}} driver: {{driver}} sql_queries: {{sql_queries}} raw_data.enabled: true @@ -10,3 +13,7 @@ period: {{period}} merge_results: {{merge_results}} data_stream: dataset: {{data_stream.dataset}} +{{#if processors}} +processors: +{{processors}} +{{/if}} diff --git a/packages/sql_input/changelog.yml b/packages/sql_input/changelog.yml index b8542469019..9658baa9530 100644 --- a/packages/sql_input/changelog.yml +++ b/packages/sql_input/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.4.0" + changes: + - description: Add `condition` and `processors` settings. + type: enhancement + link: https://github.com/elastic/integrations/pull/6358 - version: "0.3.0" changes: - description: Add merge_results feature diff --git a/packages/sql_input/manifest.yml b/packages/sql_input/manifest.yml index 2e6021fa6e6..bba030afe50 100644 --- a/packages/sql_input/manifest.yml +++ b/packages/sql_input/manifest.yml @@ -1,7 +1,7 @@ format_version: 2.0.0 name: sql title: "SQL Input" -version: "0.3.0" +version: "0.4.0" description: "Collects Metrics by Quering on SQL Databases" type: input categories: @@ -56,5 +56,20 @@ policy_templates: show_user: false default: false description: Merge results from multiple queries to a single event (restrictions apply) + - name: condition + title: Condition + description: Condition to filter when to apply this datastream. Refer to [Conditions](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html#conditions) on how to use the available keys in conditions. + type: text + multi: false + required: false + 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 events are shipped. See [Processors](https://www.elastic.co/guide/en/beats/metricbeat/current/filtering-and-enhancing-data.html) for details. owner: github: elastic/obs-infraobs-integrations From ea2bb0078d36ff024d7e80e1ce9bd796604906e8 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 5 Sep 2023 17:40:08 -0400 Subject: [PATCH 2/2] use fleet processor link --- packages/sql_input/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sql_input/manifest.yml b/packages/sql_input/manifest.yml index bba030afe50..77ab8e3dd10 100644 --- a/packages/sql_input/manifest.yml +++ b/packages/sql_input/manifest.yml @@ -70,6 +70,6 @@ policy_templates: 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 events are shipped. See [Processors](https://www.elastic.co/guide/en/beats/metricbeat/current/filtering-and-enhancing-data.html) for details. + 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 events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details. owner: github: elastic/obs-infraobs-integrations