Loading

MySQL OpenTelemetry Input Package

Version 0.2.1 (View all)
Subscription level
What's this?
Basic
Developed by
What's this?
Elastic
Minimum Kibana version(s) 9.4.0
The MySQL OpenTelemetry Input Package integration v0.2.1 is in technical preview

To use pre-release integrations, go to the Integrations page in Kibana, scroll down, and toggle on the Display beta integrations option.

The MySQL OpenTelemetry Input Package for Elastic enables collection of metrics and logs from MySQL database servers through OpenTelemetry protocols using the mysqlreceiver.

This package receives telemetry data from MySQL servers by configuring the MySQL endpoint and credentials in the Input Package, which then gets applied to the mysqlreceiver present in the EDOT collector, which then forwards the data to Elastic Agent. The Elastic Agent processes and enriches the data before sending it to Elasticsearch for indexing and analysis. Once the data arrives into Elasticsearch, its corresponding MySQL OpenTelemetry Assets Package gets auto installed and the dashboards light up.

The package collects both metrics (from SHOW GLOBAL STATUS and InnoDB tables) and logs (query samples and top queries). Log events are controlled by the Enable Query Sample Events and Enable Top Query Events settings:

  • db.server.query_sample: Current running database statements (enabled by default)
  • db.server.top_query: Queries that consumed the most CPU (disabled by default)
  • MySQL 8.0+ or MariaDB 10.11+
  • A MySQL user with permissions to run SHOW GLOBAL STATUS
  • For query sample collection, the performance_schema must be enabled

To collect log events (query samples and top queries), configure MySQL as follows. For additional details, see the upstream mysqlreceiver logs documentation.

Parameter Value Description
performance_schema Enabled Required for log collection
max_digest_length 4096 Recommended maximum length of digest text
performance_schema_max_digest_length 4096 Recommended maximum length of digest text on performance schema
performance_schema_max_sql_text_length 4096 Recommended maximum length of SQL text

Also grant the MySQL user access to the performance schema:

GRANT SELECT ON performance_schema.* TO <your-user>@'%';
		

For the full list of settings exposed for the receiver and examples, refer to the configuration section.

For a complete list of all available metrics, log events, and their detailed descriptions, refer to the MySQL Receiver documentation in the upstream OpenTelemetry Collector repository.