Can I pull data from PMM tool for own calculation?

I have PMM tool associated with RDS Mysql instances & monitoring it. Is there a way we can pull a particular metrics from PMM tool (i.e CPU Utilization) or database parameters (i.e. Max_connections)? I am asking because if I need to get the data for further analytics outside PMM, can I leverage PMM data somehow? In that case I dont have to create a job or connect to database again.


1 Like


I think it could be a two-step process for your use case, i.e.:

  1. Get the list of labels to see which ones you want to pull the metrics for
  2. Get all metrics for the given labels, exporting them out of PMM

So to get all labels would require you to run this command:

curl https://user:password@pmm-server-address/prometheus/api/v1/label/__name__/values

Then pick your metrics name, for example up.

And finally, to export the metrics you’d query a range of data:

curl https://user:password@pmm-server-address/prometheus/api/v1/query_range?query=up&start=2022-01-20T00:00:00.000Z&end=2022-01-20T00:40:00.000Z&step=15s' | jq .

You may want to refer to the following docs to get an idea of how powerful the queries can be:


1 Like

Thanks for the details. I will try to explore the same.

1 Like