Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to monitor mysql long transaction info by using mysqld_exporter? #556

Open
biaoyun opened this issue Jun 15, 2021 · 0 comments · May be fixed by #599
Open

How to monitor mysql long transaction info by using mysqld_exporter? #556

biaoyun opened this issue Jun 15, 2021 · 0 comments · May be fixed by #599

Comments

@biaoyun
Copy link

biaoyun commented Jun 15, 2021

mysqld_exporter version: output of mysqld_exporter --version

mysqld_exporter, version 0.12.1

MySQL server version

mysqld Ver 5.6.40-84.0-56 for Linux on x86_64 (Percona XtraDB Cluster (GPL)

What did you expect to see?

went to find some metrics about mysql transaction duration time,but did‘t find it

In daily work,I usually use to following sql to check long transaction whether exist and other info anout long transaction :
SELECT trx_id, trx_started, NOW() - trx_started AS trx_duration_seconds
, CONCAT('KILL ', id, ' ;') AS kill_session_id
, user
, IF(LEFT(HOST, LOCATE(':', host) - 1) = '', host, LEFT(HOST, LOCATE(':', host) - 1)) AS host
, command, time
, REPLACE(SUBSTRING(info, 1, 25), '
', '') AS info_25
FROM information_schema.innodb_trx
JOIN information_schema.processlist ON innodb_trx.trx_mysql_thread_id = processlist.id
WHERE NOW() - trx_started > 10
ORDER BY trx_started DESC;

Where i can find metrics about mysql transaction duration?

Looking forward to a reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant