Custom-Query not enabled into percona dashboard

  1. I have created a simple custom query in the path: /usr/local/percona/pmm2/collectors/custom-queries/postgresql/low-resolution.
  2. Then restarted PMM_server.
  3. Then verified with percona dashboard [Insight][Advanced Data Exploration]—customized metrics not enabled into Percona Dashboard.

  • Did I miss anything? Kindly help me with this.
1 Like

Hi, did you restart PMM Client?

Hi Nurlan,

Thank you for your response.

  • Yes, I have restarted the PMM client.

Hi Nurlan,
In the Percona Dashboard, custom queries are still not enabled.

FYI.

  1. I have installed PMM-Server as docker image.
  2. Set-up PMM-Client as Package manager.
  3. Registered node with PMM-Server.
  4. Set-up Completed to monitor postgresql.
  5. Verified with Dashboard, all metrics has been monitored as per documentation.
  6. But tried to create custom queries to create custom metrics in percona dashboard using YAML file into the path : /usr/local/percona/pmm2/collectors/custom-queries/postgresql/low-resolution and also restarted both pmm-server and pmm-client. but customized metrics not enabled into Percona Dashboard.
  • Kindly help me with this.

Hey,
Your query definition seems to be invalid.
In “metrics” section you have to include all values that will be returned by the query.
For example:

metrics:
  - database_name:
      usage: "LABEL"
      description: "Database name"
  - size:
      usage: "GAUGE"
      description: "Size of the database"

Also try to match your metric name with the output of query, so use
datname as database_name etc.

Hope it helps!