Skip to technology filters Skip to main content
Dynatrace Hub

Extend the platform,
empower your team.

Popular searches:
Home hero bg
MySQL (remote monitoring)MySQL (remote monitoring)
MySQL (remote monitoring)

MySQL (remote monitoring)

Remotely monitor your MySQL instances, collect key KPIs and slow queries details

Extension
Free trialDocumentation
Overview dashboardInstance statistics on the new platformSlow queries viewExecution plan details
  • Product information
  • Release notes

Overview

Remotely monitor MySQL databases where you cannot install an OneAgent.

Get started

Activating the extension

  • Activate Extension in the Hub by going to:
  • Extensions → MySQL → Add to environment
  • Add a new monitoring configuration for every MySQL instance you'd like to monitor

Creating a MySQL user

Create a user that is identified by a native password, customize the username and password as you please

CREATE USER 'dynatrace'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

Give the user the permissions:

  • GRANT SELECT ON performance_schema.* TO 'dynatrace'@'%';
    • Allows the user to query the performance_schema schema
  • GRANT PROCESS ON *.* TO 'dynatrace'@'%';
    • Allows the user to see thread and connection metrics for other users
  • GRANT SHOW DATABASES ON *.* TO 'dynatrace'@'%';
    • Allows the user to see database metrics for all databases
  • GRANT SELECT ON mysql.slow_log TO 'dynatrace'@'%';
    • Allows the user to query slow queries
  • GRANT SELECT ON sys.x$memory_global_by_current_bytes TO 'dynatrace'@'%';
    • Allow the user to query memory statistics

NOTE: Due to a MySQL limitation, to calculate database sizes you MUST grant SELECT permissions on the individual databases where you want to collect size from.

Collecting Infrastructure metrics

To enable CPU metrics collection, run this query on the MySQL instance:

SET GLOBAL innodb_monitor_enable='cpu%';

Collecting Top Slow Queries

Enable slow queries logging to a table:

SET GLOBAL log_output = 'TABLE';
SET GLOBAL slow_query_log = 'ON';

The default slow query threshold is 10 seconds You can chose the threshold of what is a "slow query" by executing:

SET GLOBAL long_query_time = 2;

This would set slow queries threshold to 2 seconds.

Execution Plan Fetching

To fetch execution plans, you must create a stored procedure for the dynatrace user:

CREATE SCHEMA IF NOT EXISTS dynatrace;
DELIMITER $$
CREATE PROCEDURE dynatrace.dynatrace_execution_plan(IN query TEXT)
    SQL SECURITY DEFINER
BEGIN
    SET @explain := CONCAT('EXPLAIN FORMAT=JSON ', query);
    PREPARE stmt FROM @explain;
    EXECUTE stmt;
    DEALLOCATE PREPARE stmt;
END $$
DELIMITER ;

And then grant execution permission for the dynatrace user

GRANT EXECUTE ON PROCEDURE dynatrace.dynatrace_execution_plan TO 'dynatrace'@'%';

Compatibility information

  • MySQL >= 8.0

FAQ

Why don't I see Waits metrics?

To gather wait metrics, data collection need to be enabled for the MySQL instance, please refer to the documentation: https://dev.mysql.com/doc/mysql-perfschema-excerpt/8.0/en/performance-schema-wait-tables.html

Can I monitor MariaDB with this extension?

This extension was only tested against MySQL instances, MariaDB is not officially supported via this extension.

I get an error "RSA public key is not available client side"

This means that the username is not identified by a native password, please refer to Get Started.

I can't see CPU and Memory metrics

Make sure that data collection is enabled for your instance.

  • For CPU: SET GLOBAL innodb_monitor_enable='cpu%';
  • For Memory: Visit https://dev.mysql.com/doc/refman/8.0/en/monitor-mysql-memory-use.html

You can test that you can query the data by running:

SELECT * FROM information_schema.INNODB_METRICS WHERE name IN ('cpu_utime_abs', 'cpu_stime_abs');

And:

SELECT SUBSTRING_INDEX(event_name,'/',2) AS code_area,
                SUM(current_alloc) AS current_alloc
          FROM sys.x$memory_global_by_current_bytes
          GROUP BY SUBSTRING_INDEX(event_name,'/',2)
          ORDER BY SUM(current_alloc) DESC;

I can't see slow queries

Refer to the Collecting Top Slow Queries in the Getting Started session.

Dynatrace
Documentation
By Dynatrace
Dynatrace support center
Subscribe to new releases
Copy to clipboard

Extension content

Content typeNumber of items included
screen chart groups
13
screen logs cards
4
screen injections
1
screen layout
3
alerts
1
screen entities lists
6
metric metadata
34
list screen layout
2
generic relationship
3
screen custom cards
2
dashboards
1
screen actions
2
screen properties
3
generic type
2
screen dql table
4

Feature sets

Below is a complete list of the feature sets provided in this version. To ensure a good fit for your needs, individual feature sets can be activated and deactivated by your administrator during configuration.

Feature setsNumber of metrics included
Metric nameMetric keyDescriptionUnit
-mysql.global_status.queries.count--
Slow Queriesmysql.global_status.slow_queries.countThe number of queries that have taken more than long_query_time seconds. This counter increments regardless of whether the slow query log is enabled. For information about that log, see Section 5.4.5, The Slow Query Log.Count
Table Locks Waitedmysql.global_status.table_locks_waited.countThe number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.Count
Table Locks Immediatemysql.global_status.table_locks_immediate.countThe number of times that a request for a table lock could be granted immediately.Count
Current Connectionsmysql.global_status.current_connectionsThe number of currently open connections.Count
Threads Runningmysql.global_status.threads_runningThe number of threads that are not sleeping.Count
Innodb Buffer Pool Pages Datamysql.global_status.innodb_buffer_pool_pages_dataThe number of pages in the InnoDB buffer pool containing data. The number includes both dirty and clean pages. When using compressed tables, the reported Innodb_buffer_pool_pages_data value may be larger than Innodb_buffer_pool_pages_totalCount
Innodb Buffer Pool Pages Dirtymysql.global_status.innodb_buffer_pool_pages_dirtyThe current number of dirty pages in the InnoDB buffer pool.Count
Innodb Buffer Pool Pages Freemysql.global_status.innodb_buffer_pool_pages_freeThe number of free pages in the InnoDB buffer pool.Count
Innodb Buffer Pool Pages Totalmysql.global_status.innodb_buffer_pool_pages_totalThe total size of the InnoDB buffer pool, in pages. When using compressed tables, the reported Innodb_buffer_pool_pages_data value may be larger than Innodb_buffer_pool_pages_totalCount
Innodb Data Readsmysql.global_status.innodb_data_reads.countThe total number of data reads (OS file reads).Count
Innodb Data Writesmysql.global_status.innodb_data_writes.countThe total number of data writes.Count
Innodb Data Readmysql.global_status.innodb_data_read.countThe total amount of data read from files.Byte
Innodb Data Writtenmysql.global_status.innodb_data_written.countThe total amount of data written.Byte
Availabilitymysql.global_status.availabilityWhether or not a connection can be made to the databasePercent
Statusmysql.global_status.statusA status of AVAILABLE is returned if we can query the databaseState
Uptimemysql.global_status.uptimeThe time in seconds that the MySQL server has been running since it was started.Second
Metric nameMetric keyDescriptionUnit
CPU Usermysql.infrastructure.cpu.userThe total CPU time spent in user mode.Percent
CPU Systemmysql.infrastructure.cpu.systemThe total CPU time spent in system mode.Percent
Memorymysql.infrastructure.memoryThe amount of memory used per each code area.Byte
Metric nameMetric keyDescriptionUnit
Database Sizemysql.databases.sizeThe size of the DatabaseMegaByte
Metric nameMetric keyDescriptionUnit
Waits IOmysql.waits.waits_io.countThe number of times that the server has waited for an I/O operation to complete.Count
Waits IO Timemysql.waits.waits_io_time.countThe total time the server has waited for I/O operations to complete.MilliSecond
Waits Syncmysql.waits.waits_sync.countThe number of times that the server has waited for a synchronization operation to complete.Count
Waits Sync Timemysql.waits.waits_sync_time.countThe total time the server has waited for synchronization operations to complete.MilliSecond
Metric nameMetric keyDescriptionUnit
Commitsmysql.statements.commit.countThe number of COMMIT statements executed by this serverCount
Deletesmysql.statements.delete.countThe number of DELETE statements executed by this serverCount
Multi-Table Deletesmysql.statements.delete_multi.countThe number of multi-table DELETE statements executed by this serverCount
Insertsmysql.statements.insert.countThe number of INSERT statements executed by this serverCount
Selectsmysql.statements.select.countThe number of SELECT statements executed by this serverCount
Updatesmysql.statements.update.countThe number of UPDATE statements executed by this serverCount
Executesmysql.statements.execute.countThe number of EXECUTE statements executed by this serverCount
Multi-Table Updatesmysql.statements.update_multi.countThe number of multi-table UPDATE statements executed by this serverCount
Bytes Sentmysql.statements.bytes_sent.countThe number of bytes sent to all clientsByte
Bytes Receivedmysql.statements.bytes_received.countThe number of bytes received from all clientsByte

Full version history

To have more information on how to install the downloaded package, please follow the instructions on this page.
ReleaseDate

Full version history

Version 2.1.2

  • Add variables for the data collection frequency

Full version history

Version 2.1.1

  • Fix an issue where the wait times metrics were not correctly converted to Milliseconds

Full version history

Changes

  • The bytes sent visualization no longer shows negative values

Full version history

Version 2.0.6

🚀 Features

  • There is a now a SAME_AS relationship between a MySQL instance and its Process Group Instance.

Full version history

Fixed in this version:

  • Sorting SQL statements would produce duplicate results

Full version history

Version 2.0.1

  • Add support for execution plan fetching, please check the hub page for details
  • Add screen definitions for the 3rd gen platform

Note: these features require Activegate 1.293+

Full version history

Version 1.1.3

  • Fix an issue with the configure extension link in the overview dashboard

Full version history

Version 1.1.2

Add metrics:

  • mysql.global_status.availability
  • mysql.global_status.status

Full version history

Version 1.1.1

  • Fix an issue where MySQL entities were created from unrelated logs

Full version history

Version 1.1.0

  • Add CPU metrics
  • Add Memory metrics
  • Add Slow Queries (log events)

Full version history

Version 1.0.0

  • First release, instance and database metrics
Dynatrace Hub
Get data into DynatraceBuild your own app
All (773)Log Management and AnalyticsKubernetesAI and LLM ObservabilityInfrastructure ObservabilitySoftware DeliveryApplication ObservabilityApplication SecurityDigital ExperienceBusiness Analytics
Filter
Type
Built and maintained by
Deployment model
SaaS
  • SaaS
  • Managed
Partner FinderBecome a partnerDynatrace Developer

Discover recent additions to Dynatrace

Problems logo

Problems

Analyze abnormal system behavior and performance problems detected by Davis AI.

Logs logo

Logs

Explore all your logs without writing a single query.

Security Investigator logo

Security Investigator

Fast and precise forensics for security and logs on Grail data with DQL queries.

Business Flow logo

Business Flow

Track, analyze, and optimize your critical business processes.

Cost & Carbon Optimization logo

Cost & Carbon Optimization

Track, analyze, and optimize your IT carbon footprint and public cloud costs.

Davis Anomaly Detection logo

Davis Anomaly Detection

Detect anomalies in timeseries using the Davis AI

Analyze your data

Understand your data better with deep insights and clear visualizations.

Notebooks logo

Notebooks

Create powerful, data-driven documents for custom analytics and collaboration.

Dashboards logo

Dashboards

Transform complex data into clear visualizations with custom dashboards.

Automate your processes

Turn data and answers into actions, securely, and at scale.

Workflows logo

Workflows

Automate tasks in your IT landscape, remediate problems, and visualize processes

Jira logo

Jira

Create, query, comment, transition, and resolve Jira tickets within workflows.

Slack logo

Slack

Automate Slack messaging for security incidents, attacks, remediation, and more.

Secure your cloud application

See vulnerabilities and attacks in your environment.

Security Overview logo

Security Overview

Get a comprehensive overview of the security of your applications.

Code-Level Vulnerabilities logo

Code-Level Vulnerabilities

Detect vulnerabilities in your code in real time.

Threats & Exploits logo

Threats & Exploits

Understand, triage, and investigate application security findings and alerts.

Are you looking for something different?

We have hundreds of apps, extensions, and other technologies to customize your environment

Leverage our newest innovations of Dynatrace Saas

Kick-start your app creation

Kick-start your app creation

Whether you’re a beginner or a pro, Dynatrace Developer has the tools and support you need to create incredible apps with minimal effort.
Go to Dynatrace Developer
Upgrading from Dynatrace Managed to SaaS

Upgrading from Dynatrace Managed to SaaS

Drive innovation, speed, and agility in your organization by seamlessly and securely upgrading.
Learn More
Log Management and Analytics

Log Management and Analytics

Innovate faster and more efficiently with unified log management and log analytics for actionable insights and automation.
Learn more