Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a0a45b

Browse files
authored
[MySQL] Add SSL Support (#9453)
* add ssl var * bump package version * fix pr id * add ssl in agent config * format * add agent fields * remove redundant ecs fields
1 parent 9d10fb9 commit 8a0a45b

File tree

9 files changed

+260
-28
lines changed

9 files changed

+260
-28
lines changed

packages/mysql/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: 1.20.0
3+
changes:
4+
- description: Add SSL support.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/9453
27
- version: 1.19.0
38
changes:
49
- description: Enable secrets for sensitive fields. For more details, refer https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-secret-values

packages/mysql/data_stream/error/fields/ecs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
- external: ecs
1212
name: tags
1313
- external: ecs
14-
name: error.message
14+
name: error.message

packages/mysql/data_stream/galera_status/agent/stream/stream.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ raw: {{raw}}
1313
{{#if username}}
1414
username: {{username}}
1515
{{/if}}
16+
{{#if ssl}}
17+
{{ssl}}
18+
{{/if}}

packages/mysql/data_stream/performance/agent/stream/stream.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ raw: {{raw}}
1313
{{#if username}}
1414
username: {{username}}
1515
{{/if}}
16+
{{#if ssl}}
17+
{{ssl}}
18+
{{/if}}
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
- name: cloud
2+
title: Cloud
3+
group: 2
4+
description: Fields related to the cloud or infrastructure the events are coming from.
5+
footnote: 'Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.'
6+
type: group
7+
fields:
8+
- name: account.id
9+
level: extended
10+
type: keyword
11+
ignore_above: 1024
12+
dimension: true
13+
description: 'The cloud account or organization id used to identify different entities in a multi-tenant environment.
14+
15+
Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.'
16+
example: 666777888999
17+
- name: availability_zone
18+
level: extended
19+
type: keyword
20+
ignore_above: 1024
21+
dimension: true
22+
description: Availability zone in which this host is running.
23+
example: us-east-1c
24+
- name: instance.id
25+
level: extended
26+
type: keyword
27+
ignore_above: 1024
28+
description: Instance ID of the host machine.
29+
example: i-1234567890abcdef0
30+
dimension: true
31+
- name: instance.name
32+
level: extended
33+
type: keyword
34+
ignore_above: 1024
35+
description: Instance name of the host machine.
36+
- name: machine.type
37+
level: extended
38+
type: keyword
39+
ignore_above: 1024
40+
description: Machine type of the host machine.
41+
example: t2.medium
42+
- name: provider
43+
level: extended
44+
type: keyword
45+
ignore_above: 1024
46+
description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
47+
example: aws
48+
dimension: true
49+
- name: region
50+
level: extended
51+
type: keyword
52+
ignore_above: 1024
53+
dimension: true
54+
description: Region in which this host is running.
55+
example: us-east-1
56+
- name: project.id
57+
type: keyword
58+
description: Name of the project in Google Cloud.
59+
- name: image.id
60+
type: keyword
61+
description: Image ID for the cloud instance.
62+
- name: container
63+
title: Container
64+
group: 2
65+
description: 'Container fields are used for meta information about the specific container that is the source of information.
66+
67+
These fields help correlate data based containers from any runtime.'
68+
type: group
69+
fields:
70+
- name: id
71+
level: core
72+
type: keyword
73+
ignore_above: 1024
74+
description: Unique container id.
75+
dimension: true
76+
- name: image.name
77+
level: extended
78+
type: keyword
79+
ignore_above: 1024
80+
description: Name of the image the container was built on.
81+
- name: labels
82+
level: extended
83+
type: object
84+
object_type: keyword
85+
description: Image labels.
86+
- name: name
87+
level: extended
88+
type: keyword
89+
ignore_above: 1024
90+
description: Container name.
91+
- name: host
92+
title: Host
93+
group: 2
94+
description: 'A host is defined as a general computing instance.
95+
96+
ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.'
97+
type: group
98+
fields:
99+
- name: architecture
100+
level: core
101+
type: keyword
102+
ignore_above: 1024
103+
description: Operating system architecture.
104+
example: x86_64
105+
- name: domain
106+
level: extended
107+
type: keyword
108+
ignore_above: 1024
109+
description: 'Name of the domain of which the host is a member.
110+
111+
For example, on Windows this could be the host''s Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host''s LDAP provider.'
112+
example: CONTOSO
113+
default_field: false
114+
- name: hostname
115+
level: core
116+
type: keyword
117+
ignore_above: 1024
118+
description: 'Hostname of the host.
119+
120+
It normally contains what the `hostname` command returns on the host machine.'
121+
- name: id
122+
level: core
123+
type: keyword
124+
ignore_above: 1024
125+
description: 'Unique host id.
126+
127+
As hostname is not always unique, use values that are meaningful in your environment.
128+
129+
Example: The current usage of `beat.name`.'
130+
- name: ip
131+
level: core
132+
type: ip
133+
description: Host ip addresses.
134+
- name: mac
135+
level: core
136+
type: keyword
137+
ignore_above: 1024
138+
description: Host mac addresses.
139+
- name: name
140+
level: core
141+
type: keyword
142+
ignore_above: 1024
143+
dimension: true
144+
description: 'Name of the host.
145+
146+
It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.'
147+
- name: os.family
148+
level: extended
149+
type: keyword
150+
ignore_above: 1024
151+
description: OS family (such as redhat, debian, freebsd, windows).
152+
example: debian
153+
- name: os.kernel
154+
level: extended
155+
type: keyword
156+
ignore_above: 1024
157+
description: Operating system kernel version as a raw string.
158+
example: 4.4.0-112-generic
159+
- name: os.name
160+
level: extended
161+
type: keyword
162+
ignore_above: 1024
163+
multi_fields:
164+
- name: text
165+
type: text
166+
norms: false
167+
default_field: false
168+
description: Operating system name, without the version.
169+
example: Mac OS X
170+
- name: os.platform
171+
level: extended
172+
type: keyword
173+
ignore_above: 1024
174+
description: Operating system platform (such centos, ubuntu, windows).
175+
example: darwin
176+
- name: os.version
177+
level: extended
178+
type: keyword
179+
ignore_above: 1024
180+
description: Operating system version as a raw string.
181+
example: 10.14.1
182+
- name: type
183+
level: core
184+
type: keyword
185+
ignore_above: 1024
186+
description: 'Type of host.
187+
188+
For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.'
189+
- name: containerized
190+
type: boolean
191+
description: >
192+
If the host is a container.
193+
194+
- name: os.build
195+
type: keyword
196+
example: "18D109"
197+
description: >
198+
OS build information.
199+
200+
- name: os.codename
201+
type: keyword
202+
example: "stretch"
203+
description: >
204+
OS codename, if any.
205+
206+
- name: agent
207+
title: Agent
208+
type: group
209+
fields:
210+
- name: id
211+
type: keyword
212+
ignore_above: 1024
213+
dimension: true

packages/mysql/data_stream/performance/fields/ecs.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,3 @@
55
dimension: true
66
- external: ecs
77
name: service.type
8-
- external: ecs
9-
name: agent.id
10-
dimension: true
11-
- external: ecs
12-
name: cloud.account.id
13-
dimension: true
14-
- external: ecs
15-
name: cloud.region
16-
dimension: true
17-
- external: ecs
18-
name: cloud.instance.id
19-
dimension: true
20-
- external: ecs
21-
name: cloud.provider
22-
dimension: true
23-
- external: ecs
24-
name: container.id
25-
dimension: true
26-
- external: ecs
27-
name: host.name
28-
dimension: true
29-
- external: ecs
30-
name: cloud.availability_zone
31-
dimension: true

packages/mysql/data_stream/slowlog/fields/ecs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
- external: ecs
1616
name: error.message
1717
- external: ecs
18-
name: message
18+
name: message

packages/mysql/data_stream/status/agent/stream/stream.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ raw: {{raw}}
1313
{{#if username}}
1414
username: {{username}}
1515
{{/if}}
16+
{{#if ssl}}
17+
{{ssl}}
18+
{{/if}}

packages/mysql/manifest.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
format_version: "3.0.2"
22
name: mysql
33
title: MySQL
4-
version: "1.19.0"
4+
version: "1.20.0"
55
description: Collect logs and metrics from MySQL servers with Elastic Agent.
66
type: integration
77
categories:
88
- datastore
99
- observability
1010
conditions:
1111
kibana:
12-
version: "^8.12.0"
12+
version: "^8.14.0"
1313
elastic:
1414
subscription: basic
1515
screenshots:
@@ -55,6 +55,35 @@ policy_templates:
5555
title: Password
5656
secret: true
5757
default: test
58+
- name: ssl
59+
type: yaml
60+
title: SSL Configuration
61+
description: i.e. certificate_authorities, supported_protocols, verification_mode etc.
62+
multi: false
63+
required: false
64+
show_user: false
65+
default: |
66+
#certificate_authorities:
67+
# - |
68+
# -----BEGIN CERTIFICATE-----
69+
# MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF
70+
# ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2
71+
# MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB
72+
# BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n
73+
# fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl
74+
# 94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t
75+
# /D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP
76+
# PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41
77+
# CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O
78+
# BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux
79+
# 8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D
80+
# 874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw
81+
# 3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA
82+
# H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu
83+
# 8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0
84+
# yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk
85+
# sxSmbIUfc2SGJGCJD4I=
86+
# -----END CERTIFICATE-----
5887
owner:
5988
github: elastic/obs-infraobs-integrations
6089
type: elastic

0 commit comments

Comments
 (0)