diff --git a/packages/mysql/changelog.yml b/packages/mysql/changelog.yml index 02bbe151663..43743210da2 100644 --- a/packages/mysql/changelog.yml +++ b/packages/mysql/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: 1.26.0 + changes: + - description: Add ability to set condition for logs and metrics. + type: enhancement + link: https://github.com/elastic/integrations/pull/9704 - version: 1.25.0 changes: - description: Add `schemaname` field in the performance data stream. diff --git a/packages/mysql/data_stream/error/agent/stream/stream.yml.hbs b/packages/mysql/data_stream/error/agent/stream/stream.yml.hbs index 81687ef37af..bd4782f34d8 100644 --- a/packages/mysql/data_stream/error/agent/stream/stream.yml.hbs +++ b/packages/mysql/data_stream/error/agent/stream/stream.yml.hbs @@ -22,4 +22,7 @@ processors: - add_locale: ~ {{#if processors}} {{processors}} -{{/if}} \ No newline at end of file +{{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} diff --git a/packages/mysql/data_stream/galera_status/agent/stream/stream.yml.hbs b/packages/mysql/data_stream/galera_status/agent/stream/stream.yml.hbs index d7fcfc32840..b5030f05a28 100644 --- a/packages/mysql/data_stream/galera_status/agent/stream/stream.yml.hbs +++ b/packages/mysql/data_stream/galera_status/agent/stream/stream.yml.hbs @@ -13,6 +13,9 @@ raw: {{raw}} {{#if username}} username: {{username}} {{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} {{#if ssl}} {{ssl}} {{/if}} diff --git a/packages/mysql/data_stream/performance/agent/stream/stream.yml.hbs b/packages/mysql/data_stream/performance/agent/stream/stream.yml.hbs index fcf0f429e02..65e887b1266 100644 --- a/packages/mysql/data_stream/performance/agent/stream/stream.yml.hbs +++ b/packages/mysql/data_stream/performance/agent/stream/stream.yml.hbs @@ -13,6 +13,9 @@ raw: {{raw}} {{#if username}} username: {{username}} {{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} {{#if ssl}} {{ssl}} {{/if}} diff --git a/packages/mysql/data_stream/slowlog/agent/stream/stream.yml.hbs b/packages/mysql/data_stream/slowlog/agent/stream/stream.yml.hbs index 985e9f2b43d..e849a68aa9a 100644 --- a/packages/mysql/data_stream/slowlog/agent/stream/stream.yml.hbs +++ b/packages/mysql/data_stream/slowlog/agent/stream/stream.yml.hbs @@ -22,4 +22,7 @@ processors: - add_locale: ~ {{#if processors}} {{processors}} -{{/if}} \ No newline at end of file +{{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} diff --git a/packages/mysql/data_stream/status/agent/stream/stream.yml.hbs b/packages/mysql/data_stream/status/agent/stream/stream.yml.hbs index 67edd68d4bd..5d571694372 100644 --- a/packages/mysql/data_stream/status/agent/stream/stream.yml.hbs +++ b/packages/mysql/data_stream/status/agent/stream/stream.yml.hbs @@ -13,6 +13,9 @@ raw: {{raw}} {{#if username}} username: {{username}} {{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} {{#if ssl}} {{ssl}} {{/if}} diff --git a/packages/mysql/manifest.yml b/packages/mysql/manifest.yml index 0e7192f2d36..d0e15784418 100644 --- a/packages/mysql/manifest.yml +++ b/packages/mysql/manifest.yml @@ -1,7 +1,7 @@ format_version: "3.0.2" name: mysql title: MySQL -version: "1.25.0" +version: "1.26.0" description: Collect logs and metrics from MySQL servers with Elastic Agent. type: integration categories: @@ -38,6 +38,14 @@ policy_templates: - type: logfile title: Collect logs from MySQL hosts description: Collecting MySQL error and slowlog logs + vars: + - name: condition + title: Condition + description: Condition to filter when to collect this input. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details. + type: text + multi: false + required: false + show_user: false - type: mysql/metrics title: Collect metrics from MySQL hosts description: Collecting MySQL status and galera_status metrics @@ -59,6 +67,13 @@ policy_templates: title: Password secret: true default: test + - name: condition + title: Condition + description: Condition to filter when to collect this input. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details. + type: text + multi: false + required: false + show_user: false - name: ssl type: yaml title: SSL Configuration