# Patroni metrics, why not?

**URL:** <https://forums.percona.com/t/patroni-metrics-why-not/17882>\
**Category:** PMM 2.x\
**Tags:** postgres\
**Created:** [October 6, 2022, 12:16pm UTC](https://forums.percona.com/t/patroni-metrics-why-not/17882 "2022-10-06T12:16:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [October 6, 2022, 12:16pm UTC](https://forums.percona.com/t/patroni-metrics-why-not/17882/1 "2022-10-06T12:16:27Z")

</div>

Hello,  
It is very good to see PostgreSQL Cluster manager Patroni’s metrics inside PostgreSQL dashboards. I got patroni metrics from [patroni\_exporter](https://github.com/ccakes/patroni_exporter) and using Grafana dashboard (ID 66). Is it possible to do that?

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [October 6, 2022, 1:37pm UTC](https://forums.percona.com/t/patroni-metrics-why-not/17882/2 "2022-10-06T13:37:43Z")

</div>

Hi @Cihan_Tunali , thanks for posting to the Percona forums!  
What you’re asking for is completely possible with PMM! You’ll want to use what is known as External Services. You’ll need to set up the exporter, then you can add it to PMM via the following example command:  
`pmm-admin add external --listen-port=9393 --service-name=db1-patroni`

> **[External Services - Percona Monitoring and Management](https://docs.percona.com/percona-monitoring-and-management/setting-up/client/external.html)**
>
> Documentation

As you’ve already identified a dashboard, you simply need to be logged into PMM with an admin account and you can import the dashboard. Note you may need to change the name of the Data Source to Metrics in order to properly source the data.  
Best of luck and let us know how you make out!

---

<div class="post-metadata">

**Author:** ![Momo\_El](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/momo_el/32/6361_2.png) [@Momo\_El](https://forums.percona.com/u/Momo_El)\
**Post date:** [April 26, 2024, 6:52am UTC](https://forums.percona.com/t/patroni-metrics-why-not/17882/3 "2024-04-26T06:52:14Z")

</div>

Hello,

In the recent version of PMM 2.41.2  
I tried to add a patroni node into PMM, but unfortunately our Patroni is using https, when using external it uses [https://127.0.0.1](https://127.0.0.1) and sadly 127.0.0.1 is not defined in SAN of the certificate so it cannot be trusted,  
Is there a way to connect a patroni api through https with a custom server name using the “external service” ?  
Thanks
