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 >= 5.7

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
screen entities lists
6
list screen layout
2
metric metadata
33
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
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
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
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

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.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
Hub HomeGet data into DynatraceBuild your own app
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

All

2 Results filtered by:

OutSystems Cloud Metrics logo

OutSystems Cloud Metrics

OutSystems is a leading low-code application platform. With this integration, their Cloud API data becomes available inside Dynatrace.

How fast is your app? logo

How fast is your app?

Measure your native mobile app performance and availability on real Android and iPhone devices, with no instrumentation.

Reach out to certified Dynatrace partners to solve your unique use-case

Moviri logo

Moviri

Certified individuals: 14
Advanced Sales Partner
Alanata logo

Alanata

Certified individuals: 30Endorsements: Services Endorsed Partner
Premier Sales Partner
Spica Solutions logo

Spica Solutions

Certified individuals: 30Endorsements: Services Endorsed Partner
Authorized Sales Partner
Matrix logo

Matrix

Certified individuals: 14
Premier Sales Partner
Omnilogy logo

Omnilogy

Certified individuals: 38Endorsements: Services Endorsed Partner
Premier Sales Partner
AHEAD logo

AHEAD

Certified individuals: 8
Premier Sales Partner
Arctiq logo

Arctiq

Certified individuals: 19
Authorized Sales Partner
Eviden logo

Eviden

Certified individuals: 79Endorsements: Services Endorsed Partner
Premier Sales Partner
Phenisys logo

Phenisys

Certified individuals: 32Endorsements: Services Endorsed Partner
Premier Sales Partner
Accenture logo

Accenture

Certified individuals: 156
Premier Sales Partner
AsiaPac Technology Pte Ltd logo

AsiaPac Technology Pte Ltd

Certified individuals: 3
Advanced Sales Partner
AskMe Solutions & Consultants Co Ltd logo

AskMe Solutions & Consultants Co Ltd

Certified individuals: 30Endorsements: Services Endorsed Partner
Authorized Sales Partner
Asper Technologia logo

Asper Technologia

Certified individuals: 20
Advanced Sales Partner
Avocado logo

Avocado

Certified individuals: 9
Authorized Sales Partner
avodaq AG logo

avodaq AG

Certified individuals: 31Endorsements: Services Endorsed Partner
Advanced Sales Partner
Carahsoft logo

Carahsoft

Certified individuals: 21
Authorized Sales Partner
Deutsche Telekom MMS gmbh logo

Deutsche Telekom MMS gmbh

Certified individuals: 18Endorsements: Services Endorsed Partner
Premier Sales Partner
DPM logo

DPM

Certified individuals: 30Endorsements: Services Endorsed Partner, SaaS Upgrade specialization
Premier Sales Partner
DXC logo

DXC

Certified individuals: 341
Premier Sales Partner
Evolane logo

Evolane

Certified individuals: 29
Authorized Sales Partner
Galaxy Software Services Corporation (GSS) logo

Galaxy Software Services Corporation (GSS)

Certified individuals: 9
Advanced Sales Partner
ISATEC logo

ISATEC

Certified individuals: 20Endorsements: Services Endorsed Partner
Premier Sales Partner
Konsalt logo

Konsalt

Certified individuals: 13
Authorized Sales Partner
Kyndryl logo

Kyndryl

Certified individuals: 202
Premier Sales Partner
PRAGMA INFORMATICA SA logo

PRAGMA INFORMATICA SA

Certified individuals: 10
Authorized Sales Partner
PT. Mitra Integrasi Informatika logo

PT. Mitra Integrasi Informatika

Certified individuals: 24
Premier Sales Partner
Scala logo

Scala

Certified individuals: 7
Advanced Sales Partner
Spindox logo

Spindox

Certified individuals: 11
Authorized Sales Partner
TestCrew logo

TestCrew

Certified individuals: 30
Authorized Sales Partner
TI724 logo

TI724

Certified individuals: 11
Authorized Sales Partner
Tsoft logo

Tsoft

Certified individuals: 31
Authorized Sales Partner
VS Data logo

VS Data

Certified individuals: 12
Authorized Sales Partner
Your Compass logo

Your Compass

Certified individuals: 68Endorsements: Services Endorsed Partner, CloudOps specialization
Premier Sales Partner