Skip to content

监控项增加、调整建议 #23

Open
@ianholyoung

Description

@ianholyoung
  1. 增加监控状态、配置信息:read_only、server_id
    获取方式
    show variables like 'server_id'
    show global status like 'read_only'

  2. 用户会话非空闲状态的top3持续时间
    目前进取show processlist或select * from Information_schema.processlist输出中time字段,并未进行过滤
    建议
    获取show processlist或select * from Information_schema.processlist输出中time字段,根据以下条件过滤
    states not in ('','sleep') and user not in ('root','repl')
    并且展示数据建议使用用户与时间关联,而非TOP

  3. 未提交事务最长持续时间
    建议监控未提交事务的状态,如果存在多值取top3即可。
    SELECT p.user,p.time FROM information_schema.innodb_trx t INNER JOIN information_schema.processlist p ON t.trx_mysql_thread_id = p.id WHERE t.trx_state = 'RUNNING' AND p.time > 10 AND p.command = 'Sleep';
    展示数据建议使用用户与时间关联

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions