Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [mysql] add support for condition #12881

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/mysql/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: 1.27.0
changes:
- description: Add ability to set condition for logs and metrics.
type: enhancement
link: https://github.com/elastic/integrations/pull/9704
- version: 1.26.0
changes:
- description: Add support for Kibana `9.0.0`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ processors:
- add_locale: ~
{{#if processors}}
{{processors}}
{{/if}}
{{/if}}
{{#if condition}}
condition: {{ condition }}
{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ username: {{username}}
processors:
{{processors}}
{{/if}}
{{#if condition}}
condition: {{ condition }}
{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ username: {{username}}
processors:
{{processors}}
{{/if}}
{{#if condition}}
condition: {{ condition }}
{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ processors:
driver: "mysql"
sql_queries:
- query: {{replication_status_query}}
response_format: "table"
response_format: "table"
{{#if condition}}
condition: {{ condition }}
{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ processors:
- add_locale: ~
{{#if processors}}
{{processors}}
{{/if}}
{{/if}}
{{#if condition}}
condition: {{ condition }}
{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ username: {{username}}
processors:
{{processors}}
{{/if}}
{{#if condition}}
condition: {{ condition }}
{{/if}}
16 changes: 15 additions & 1 deletion packages/mysql/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: "3.0.2"
name: mysql
title: MySQL
version: "1.26.0"
version: "1.27.0"
description: Collect logs and metrics from MySQL servers with Elastic Agent.
type: integration
categories:
Expand Down Expand Up @@ -88,6 +88,13 @@ policy_templates:
# yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk
# sxSmbIUfc2SGJGCJD4I=
# -----END CERTIFICATE-----
- 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: sql/metrics
title: Collect replica status metrics from MySQL hosts
description: Collecting replica status metrics
Expand Down Expand Up @@ -137,6 +144,13 @@ policy_templates:
# yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk
# sxSmbIUfc2SGJGCJD4I=
# -----END CERTIFICATE-----
- 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
owner:
github: elastic/obs-infraobs-integrations
type: elastic