Ok, I successfully got a custom query to run in my PMM.
I created a simpler query, and put it in my customQueries configmap.
xmysql_active_connections:
query: "SELECT 'active_connections' as label, COUNT(*) as count FROM information_schema.processlist WHERE COMMAND != 'Sleep';"
metrics:
- label:
usage: "LABEL"
description: "Static label identifying this metric"
- count:
usage: "GAUGE"
description: "Number of active (non-sleeping) MySQL connections"
I now see my custom query available in the Dropdown for Advanced Data Exploration:
To solve this issue, the query and label setup needed to be correct.
I will press on with getting my “real” custom queries integrated.
Thank you for your guidance.
