From fe801d4ec5c52810457ee43df9f8db35e30c0262 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 22 Feb 2023 12:51:48 -0500 Subject: [PATCH 1/4] Add `condition` configuration for logs and metrics --- packages/kibana/changelog.yml | 5 +++++ .../data_stream/audit/agent/stream/log.yml.hbs | 3 +++ .../cluster_actions/agent/stream/stream.yml.hbs | 3 +++ .../cluster_rules/agent/stream/stream.yml.hbs | 4 +++- .../data_stream/log/agent/stream/log.yml.hbs | 3 +++ .../node_actions/agent/stream/stream.yml.hbs | 4 +++- .../node_rules/agent/stream/stream.yml.hbs | 4 +++- .../stats/agent/stream/stream.yml.hbs | 4 +++- .../status/agent/stream/stream.yml.hbs | 3 +++ packages/kibana/manifest.yml | 17 ++++++++++++++++- 10 files changed, 45 insertions(+), 5 deletions(-) diff --git a/packages/kibana/changelog.yml b/packages/kibana/changelog.yml index 7e4dd17416e..0e3bfcbece2 100644 --- a/packages/kibana/changelog.yml +++ b/packages/kibana/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "2.3.0-preview1" + changes: + - description: Add `condition` configuration for logs and metrics + type: enhancement + link: https://github.com/elastic/integrations/issues/4666 - version: "2.2.1-preview1" changes: - description: Add period variable to define polling frequency diff --git a/packages/kibana/data_stream/audit/agent/stream/log.yml.hbs b/packages/kibana/data_stream/audit/agent/stream/log.yml.hbs index 73fc525450e..d83f7094d6c 100644 --- a/packages/kibana/data_stream/audit/agent/stream/log.yml.hbs +++ b/packages/kibana/data_stream/audit/agent/stream/log.yml.hbs @@ -6,4 +6,7 @@ exclude_files: [".gz$"] {{#if processors}} processors: {{processors}} +{{/if}} +{{#if condition}} +condition: {{ condition }} {{/if}} \ No newline at end of file diff --git a/packages/kibana/data_stream/cluster_actions/agent/stream/stream.yml.hbs b/packages/kibana/data_stream/cluster_actions/agent/stream/stream.yml.hbs index 9f4963a62d8..33dfecc30f3 100644 --- a/packages/kibana/data_stream/cluster_actions/agent/stream/stream.yml.hbs +++ b/packages/kibana/data_stream/cluster_actions/agent/stream/stream.yml.hbs @@ -16,4 +16,7 @@ period: {{period}} {{#if ssl}} ssl: {{ssl}} {{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} diff --git a/packages/kibana/data_stream/cluster_rules/agent/stream/stream.yml.hbs b/packages/kibana/data_stream/cluster_rules/agent/stream/stream.yml.hbs index 5b1571fd286..23929fe2ee6 100644 --- a/packages/kibana/data_stream/cluster_rules/agent/stream/stream.yml.hbs +++ b/packages/kibana/data_stream/cluster_rules/agent/stream/stream.yml.hbs @@ -16,4 +16,6 @@ period: {{period}} {{#if ssl}} ssl: {{ssl}} {{/if}} - +{{#if condition}} +condition: {{ condition }} +{{/if}} \ No newline at end of file diff --git a/packages/kibana/data_stream/log/agent/stream/log.yml.hbs b/packages/kibana/data_stream/log/agent/stream/log.yml.hbs index 73fc525450e..d83f7094d6c 100644 --- a/packages/kibana/data_stream/log/agent/stream/log.yml.hbs +++ b/packages/kibana/data_stream/log/agent/stream/log.yml.hbs @@ -6,4 +6,7 @@ exclude_files: [".gz$"] {{#if processors}} processors: {{processors}} +{{/if}} +{{#if condition}} +condition: {{ condition }} {{/if}} \ No newline at end of file diff --git a/packages/kibana/data_stream/node_actions/agent/stream/stream.yml.hbs b/packages/kibana/data_stream/node_actions/agent/stream/stream.yml.hbs index b461f906e80..699e19cf258 100644 --- a/packages/kibana/data_stream/node_actions/agent/stream/stream.yml.hbs +++ b/packages/kibana/data_stream/node_actions/agent/stream/stream.yml.hbs @@ -16,4 +16,6 @@ period: {{period}} {{#if ssl}} ssl: {{ssl}} {{/if}} - +{{#if condition}} +condition: {{ condition }} +{{/if}} \ No newline at end of file diff --git a/packages/kibana/data_stream/node_rules/agent/stream/stream.yml.hbs b/packages/kibana/data_stream/node_rules/agent/stream/stream.yml.hbs index 8cd21356dff..df77f13fc1d 100644 --- a/packages/kibana/data_stream/node_rules/agent/stream/stream.yml.hbs +++ b/packages/kibana/data_stream/node_rules/agent/stream/stream.yml.hbs @@ -16,4 +16,6 @@ period: {{period}} {{#if ssl}} ssl: {{ssl}} {{/if}} - +{{#if condition}} +condition: {{ condition }} +{{/if}} \ No newline at end of file diff --git a/packages/kibana/data_stream/stats/agent/stream/stream.yml.hbs b/packages/kibana/data_stream/stats/agent/stream/stream.yml.hbs index d64a83e5941..7f78285a221 100644 --- a/packages/kibana/data_stream/stats/agent/stream/stream.yml.hbs +++ b/packages/kibana/data_stream/stats/agent/stream/stream.yml.hbs @@ -16,4 +16,6 @@ period: {{period}} {{#if ssl}} ssl: {{ssl}} {{/if}} - +{{#if condition}} +condition: {{ condition }} +{{/if}} \ No newline at end of file diff --git a/packages/kibana/data_stream/status/agent/stream/stream.yml.hbs b/packages/kibana/data_stream/status/agent/stream/stream.yml.hbs index 6283ed1d3df..c16e373bcdf 100644 --- a/packages/kibana/data_stream/status/agent/stream/stream.yml.hbs +++ b/packages/kibana/data_stream/status/agent/stream/stream.yml.hbs @@ -16,3 +16,6 @@ period: {{period}} {{#if ssl}} ssl: {{ssl}} {{/if}} +{{#if condition}} +condition: {{ condition }} +{{/if}} \ No newline at end of file diff --git a/packages/kibana/manifest.yml b/packages/kibana/manifest.yml index e768eb42acb..2b95d5dc587 100644 --- a/packages/kibana/manifest.yml +++ b/packages/kibana/manifest.yml @@ -1,6 +1,6 @@ name: kibana title: Kibana -version: 2.2.1-preview1 +version: 2.3.0-preview1 description: Collect logs and metrics from Kibana with Elastic Agent. type: integration icons: @@ -21,6 +21,14 @@ policy_templates: - type: logfile title: "Collect Kibana logs" description: "Collecting audit and application logs from Kibana instances" + vars: + - name: condition + title: Condition + description: Condition to filter when to apply this datastream + type: text + multi: false + required: false + show_user: false - type: kibana/metrics title: Collect Kibana metrics description: Collecting stats, status and alert metrics from Kibana instances @@ -58,5 +66,12 @@ policy_templates: #certificate_authorities: ["/etc/ca.crt"] #certificate: "/etc/client.crt" #key: "/etc/client.key" + - name: condition + title: Condition + description: Condition to filter when to apply this datastream + type: text + multi: false + required: false + show_user: false owner: github: elastic/infra-monitoring-ui From de60ab3de3d576f094a46279a0d976c3c6579571 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 22 Feb 2023 12:57:11 -0500 Subject: [PATCH 2/4] Update changelog.yml --- packages/kibana/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kibana/changelog.yml b/packages/kibana/changelog.yml index 0e3bfcbece2..8a605ae0750 100644 --- a/packages/kibana/changelog.yml +++ b/packages/kibana/changelog.yml @@ -3,7 +3,7 @@ changes: - description: Add `condition` configuration for logs and metrics type: enhancement - link: https://github.com/elastic/integrations/issues/4666 + link: https://github.com/elastic/integrations/issues/5359 - version: "2.2.1-preview1" changes: - description: Add period variable to define polling frequency From a303f1be464e0005882da36344eaab49b83509a0 Mon Sep 17 00:00:00 2001 From: BenB196 <8277432+BenB196@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:45:49 -0500 Subject: [PATCH 3/4] Update packages/kibana/manifest.yml Co-authored-by: Kevin Lacabane --- packages/kibana/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kibana/manifest.yml b/packages/kibana/manifest.yml index 2b95d5dc587..d92f1975ab1 100644 --- a/packages/kibana/manifest.yml +++ b/packages/kibana/manifest.yml @@ -68,7 +68,7 @@ policy_templates: #key: "/etc/client.key" - name: condition title: Condition - description: Condition to filter when to apply this datastream + description: Condition to filter when to collect this input type: text multi: false required: false From 0594e6d79da4a58303c8d14290f0caca18fd34b2 Mon Sep 17 00:00:00 2001 From: BenB196 <8277432+BenB196@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:45:55 -0500 Subject: [PATCH 4/4] Update packages/kibana/manifest.yml Co-authored-by: Kevin Lacabane --- packages/kibana/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kibana/manifest.yml b/packages/kibana/manifest.yml index d92f1975ab1..76aaf52b31c 100644 --- a/packages/kibana/manifest.yml +++ b/packages/kibana/manifest.yml @@ -24,7 +24,7 @@ policy_templates: vars: - name: condition title: Condition - description: Condition to filter when to apply this datastream + description: Condition to filter when to collect this input type: text multi: false required: false