Skip to content

Commit 11a2715

Browse files
[mysql_otel] MySQL OpenTelemetry Content Pack (#14729)
1 parent c63bb1b commit 11a2715

11 files changed

+6598
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@
317317
/packages/mongodb @elastic/obs-infraobs-integrations
318318
/packages/mongodb_atlas @elastic/obs-infraobs-integrations
319319
/packages/mysql @elastic/obs-infraobs-integrations
320+
/packages/mysql_otel @elastic/obs-infraobs-integrations
320321
/packages/mysql_enterprise @elastic/sec-windows-platform
321322
/packages/nagios_xi @elastic/obs-infraobs-integrations
322323
/packages/nats @elastic/obs-infraobs-integrations

packages/mysql_otel/LICENSE.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Elastic License 2.0
2+
3+
URL: https://www.elastic.co/licensing/elastic-license
4+
5+
## Acceptance
6+
7+
By using the software, you agree to all of the terms and conditions below.
8+
9+
## Copyright License
10+
11+
The licensor grants you a non-exclusive, royalty-free, worldwide,
12+
non-sublicensable, non-transferable license to use, copy, distribute, make
13+
available, and prepare derivative works of the software, in each case subject to
14+
the limitations and conditions below.
15+
16+
## Limitations
17+
18+
You may not provide the software to third parties as a hosted or managed
19+
service, where the service provides users with access to any substantial set of
20+
the features or functionality of the software.
21+
22+
You may not move, change, disable, or circumvent the license key functionality
23+
in the software, and you may not remove or obscure any functionality in the
24+
software that is protected by the license key.
25+
26+
You may not alter, remove, or obscure any licensing, copyright, or other notices
27+
of the licensor in the software. Any use of the licensor’s trademarks is subject
28+
to applicable law.
29+
30+
## Patents
31+
32+
The licensor grants you a license, under any patent claims the licensor can
33+
license, or becomes able to license, to make, have made, use, sell, offer for
34+
sale, import and have imported the software, in each case subject to the
35+
limitations and conditions in this license. This license does not cover any
36+
patent claims that you cause to be infringed by modifications or additions to
37+
the software. If you or your company make any written claim that the software
38+
infringes or contributes to infringement of any patent, your patent license for
39+
the software granted under these terms ends immediately. If your company makes
40+
such a claim, your patent license ends immediately for work on behalf of your
41+
company.
42+
43+
## Notices
44+
45+
You must ensure that anyone who gets a copy of any part of the software from you
46+
also gets a copy of these terms.
47+
48+
If you modify the software, you must include in any modified copies of the
49+
software prominent notices stating that you have modified the software.
50+
51+
## No Other Rights
52+
53+
These terms do not imply any licenses other than those expressly granted in
54+
these terms.
55+
56+
## Termination
57+
58+
If you use the software in violation of these terms, such use is not licensed,
59+
and your licenses will automatically terminate. If the licensor provides you
60+
with a notice of your violation, and you cease all violation of this license no
61+
later than 30 days after you receive that notice, your licenses will be
62+
reinstated retroactively. However, if you violate these terms after such
63+
reinstatement, any additional violation of these terms will cause your licenses
64+
to terminate automatically and permanently.
65+
66+
## No Liability
67+
68+
*As far as the law allows, the software comes as is, without any warranty or
69+
condition, and the licensor will not be liable to you for any damages arising
70+
out of these terms or the use or nature of the software, under any kind of
71+
legal claim.*
72+
73+
## Definitions
74+
75+
The **licensor** is the entity offering these terms, and the **software** is the
76+
software the licensor makes available under these terms, including any portion
77+
of it.
78+
79+
**you** refers to the individual or entity agreeing to these terms.
80+
81+
**your company** is any legal entity, sole proprietorship, or other kind of
82+
organization that you work for, plus all organizations that have control over,
83+
are under the control of, or are under common control with that
84+
organization. **control** means ownership of substantially all the assets of an
85+
entity, or the power to direct its management and policies by vote, contract, or
86+
otherwise. Control can be direct or indirect.
87+
88+
**your licenses** are all the licenses granted to you for the software under
89+
these terms.
90+
91+
**use** means anything you do with the software requiring one of your licenses.
92+
93+
**trademark** means trademarks, service marks, and similar rights.

packages/mysql_otel/changelog.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# newer versions go on top
2+
- version: "0.1.0"
3+
changes:
4+
- description: Initial draft of the MySQL OTEL content package
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/14729

packages/mysql_otel/docs/README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# MYSQL metrics for OpenTelemetry Collector
2+
3+
The MySQL metrics from MySQL OTEL receiver allows you to monitor [MySQL](https://www.mysql.com), an open-source Relational Database Management System (RDBMS) that enables users to store, manage, and retrieve structured data efficiently.
4+
5+
The MySQL OpenTelemetry assets provide a visual representation of MySQL metrics collected via OpenTelemetry ([MySQL receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/mysqlreceiver)), enabling you to monitor database performance and troubleshoot issues effectively in real time.
6+
7+
## Compatibility
8+
9+
The content pack has been tested with [OpenTelemetry MySQL receiver v0.129.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.129.0/receiver/mysqlreceiver/README.md).
10+
11+
Databases tested against:
12+
- MySQL 8.0, 9.4
13+
- MariaDB 10.11, 11.8
14+
15+
## Requirements
16+
17+
You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it.
18+
You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware.
19+
20+
## Setup
21+
22+
1. Install and configure the EDOT Collector or upstream Collector to export metrics to ElasticSearch, as shown in the following example:
23+
24+
```yaml
25+
receivers:
26+
mysql:
27+
endpoint: localhost:3306
28+
username: <MYSQL_USER>
29+
password: <MYSQL_PASSWORD>
30+
database: <your database name>
31+
collection_interval: 10s
32+
initial_delay: 1s
33+
statement_events:
34+
digest_text_limit: 120
35+
time_limit: 24h
36+
limit: 250
37+
metrics:
38+
mysql.query.client.count:
39+
enabled: true
40+
mysql.client.network.io:
41+
enabled: true
42+
mysql.commands:
43+
enabled: true
44+
mysql.max_used_connections:
45+
enabled: true
46+
mysql.connection.errors:
47+
enabled: true
48+
mysql.table_open_cache:
49+
enabled: true
50+
mysql.replica.sql_delay:
51+
enabled: true
52+
mysql.replica.time_behind_source:
53+
enabled: true
54+
exporters:
55+
debug:
56+
verbosity: detailed
57+
elasticsearch/otel:
58+
endpoints: https://elasticsearch:9200
59+
user: <userid>
60+
password: <pwd>
61+
mapping:
62+
mode: otel
63+
metrics_dynamic_index:
64+
enabled: true
65+
service:
66+
pipelines:
67+
metrics:
68+
exporters: [debug, elasticsearch/otel]
69+
receivers: [mysql]
70+
```
71+
72+
Use this configuration to run the collector.
73+
74+
The following metrics should be enabled in the `mysqlreceiver` configuration for the dashboards to be populated:
75+
76+
For Database Overview dashboard:
77+
```yaml
78+
mysql.query.client.count:
79+
enabled: true
80+
mysql.client.network.io:
81+
enabled: true
82+
mysql.commands:
83+
enabled: true
84+
mysql.max_used_connections:
85+
enabled: true
86+
mysql.connection.errors:
87+
enabled: true
88+
mysql.table_open_cache:
89+
enabled: true
90+
```
91+
92+
For Replica Status dashboard:
93+
```yaml
94+
mysql.replica.sql_delay:
95+
enabled: true
96+
mysql.replica.time_behind_source:
97+
enabled: true
98+
```
99+
100+
## Metrics reference
101+
102+
### MySQL metrics
103+
104+
Please refer to [the documentation of the OpenTelemetry's MySQL receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/mysqlreceiver/documentation.md).
Lines changed: 16 additions & 0 deletions
Loading
264 KB
Loading
115 KB
Loading
122 KB
Loading

0 commit comments

Comments
 (0)