# Can I pull data from PMM tool for own calculation?

**URL:** <https://forums.percona.com/t/can-i-pull-data-from-pmm-tool-for-own-calculation/14003>\
**Category:** Percona Monitoring and Management (PMM)\
**Tags:** pmm, mysql\
**Created:** [January 19, 2022, 9:42pm UTC](https://forums.percona.com/t/can-i-pull-data-from-pmm-tool-for-own-calculation/14003 "2022-01-19T21:42:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avik\_Biswas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/avik_biswas/32/5633_2.png) [@Avik\_Biswas](https://forums.percona.com/u/Avik_Biswas)\
**Post date:** [January 19, 2022, 9:42pm UTC](https://forums.percona.com/t/can-i-pull-data-from-pmm-tool-for-own-calculation/14003/1 "2022-01-19T21:42:31Z")

</div>

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.

Thanks!!

---

<div class="post-metadata">

**Author:** ![ademidoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ademidoff/32/14234_2.png) [@ademidoff](https://forums.percona.com/u/ademidoff)\
**Post date:** [January 20, 2022, 12:51am UTC](https://forums.percona.com/t/can-i-pull-data-from-pmm-tool-for-own-calculation/14003/2 "2022-01-20T00:51:29Z")

</div>

Hey!

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:

```auto
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:

```auto
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:

> **[GitHub - VictoriaMetrics/VictoriaMetrics: VictoriaMetrics: fast,...](https://github.com/VictoriaMetrics/VictoriaMetrics#prometheus-querying-api-usage)**
>
> VictoriaMetrics: fast, cost-effective monitoring solution and time series database - GitHub - VictoriaMetrics/VictoriaMetrics: VictoriaMetrics: fast, cost-effective monitoring solution and time ser...

> **[HTTP API | Prometheus](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries)**
>
> An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.

Regards,  
Alex

---

<div class="post-metadata">

**Author:** ![Avik\_Biswas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/avik_biswas/32/5633_2.png) [@Avik\_Biswas](https://forums.percona.com/u/Avik_Biswas)\
**Post date:** [January 20, 2022, 5:20pm UTC](https://forums.percona.com/t/can-i-pull-data-from-pmm-tool-for-own-calculation/14003/3 "2022-01-20T17:20:27Z")

</div>

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