Skip to content

Instantly share code, notes, and snippets.

@dotmanila
Created October 18, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotmanila/00b61b37e1a56c0053781bf30283f5d6 to your computer and use it in GitHub Desktop.
Save dotmanila/00b61b37e1a56c0053781bf30283f5d6 to your computer and use it in GitHub Desktop.
PMM Custom Queries
multi_source_repl:
query: "SELECT service_state, COUNT(service_state) AS service_state_count FROM performance_schema.replication_connection_status GROUP BY service_state;"
metrics:
- service_state:
usage: "LABEL"
description: "Replication thread state name"
- service_state_count:
usage: "COUNTER"
description: "Count by service state name"
multi_source_repl_delay:
query: "SELECT channel_name, Sql_delay, Number_of_workers FROM mysql.slave_relay_log_info;"
metrics:
- channel_name:
usage: "LABEL"
description: "Replication channel name"
- Sql_delay:
usage: "COUNTER"
description: "SQL Thread delay in seconds"
- Number_of_workers:
usage: "COUNTER"
description: "Parallel replication workers count for this channel"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment