# PMM Client 2.x interop with external Prometheus server i.e. bypass PMM server usage

**URL:** <https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431>\
**Category:** Percona Operator for MongoDB\
**Tags:** pmm\
**Created:** [December 9, 2021, 5:09pm UTC](https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431 "2021-12-09T17:09:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ORich](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/orich/32/7918_2.png) [@ORich](https://forums.percona.com/u/ORich)\
**Post date:** [December 9, 2021, 5:09pm UTC](https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431/1 "2021-12-09T17:09:38Z")

</div>

Dear experts,  
I am deploying Percona MongoDB from Helm chart percona/psmdb-db 1.10.1. As part of my k8s cluster ecosystem, I do already have a Prometheus server which does collect Strimzi Kafka metrics.  
I would like to know if I have a chance to interop PMM Client 2.x (PMM client 1.x is EOL 2022 May) installed from Helm chart with the Prometheus server ?  
Taking a look to the [pmm custom resources](https://www.percona.com/doc/kubernetes-operator-for-psmongodb/operator.html#operator-pmm-section), I am pessimistic since I do not see any option regarding the mode (push/pull) … as far as I know, Prometheus is only able to pull data from agent exporter ?  
Many thanks for your support.  
Best regards. Richard

---

<div class="post-metadata">

**Author:** ![ORich](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/orich/32/7918_2.png) [@ORich](https://forums.percona.com/u/ORich)\
**Post date:** [December 13, 2021, 4:24pm UTC](https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431/2 "2021-12-13T16:24:50Z")

</div>

As confirmed by here under snapshots, a running VictoriaMetrics server is mandatory for pmm setup. No way to trigger pmm-client 2.21 in pull mode

```auto
pmm:
  enabled: true
  image:
    repository: percona/pmm-client
    tag: 2.21.0
  serverHost: 

```

```auto
Starting pmm-agent setup ...

INFO[2021-12-13T16:18:38.449+00:00] Loading configuration file /usr/local/percona/pmm2/config/pmm-agent.yaml. component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/node_exporter component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/mysqld_exporter component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/mongodb_exporter component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/postgres_exporter component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/proxysql_exporter component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/rds_exporter component=setup

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/azure_exporter component=setup

Checking local pmm-agent status...

INFO[2021-12-13T16:18:38.450+00:00] Using /usr/local/percona/pmm2/exporters/vmagent component=setup

pmm-agent is not running.

Registering pmm-agent on PMM Server...

Can't construct PMM Server URL. Please re-run with --server-address flag.

pmm-agent setup exited with 1.

```

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [December 13, 2021, 6:49pm UTC](https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431/3 "2021-12-13T18:49:38Z")

</div>

Hello @ORich ,

thanks for submitting this.

The best way here would be to utilize custom sidecar containers and run the exporter of your choice to ship metrics to Prometheus.

Please see this doc: [Frequently Asked Questions](https://www.percona.com/doc/kubernetes-operator-for-psmongodb/faq.html#how-can-i-add-custom-sidecar-containers-to-my-cluster)  
Also you can find a good example of running mongod\_exporter in the following blog post: [A Peek at Percona Operator for MongoDB New Features - Percona Database Performance Blog](https://www.percona.com/blog/2021/03/10/a-peek-at-percona-kubernetes-operator-for-percona-server-for-mongodb-new-features/)

---

<div class="post-metadata">

**Author:** ![ORich](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/orich/32/7918_2.png) [@ORich](https://forums.percona.com/u/ORich)\
**Post date:** [December 14, 2021, 8:44am UTC](https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431/4 "2021-12-14T08:44:45Z")

</div>

Hi @Sergey_Pronin,  
many thanks for your swift reply. I gonna investigate sidecar containers as this option is available from Helm chart values.  
By the way, don’t you plan to expose the option PMM\_AGENT\_SETUP\_METRICS\_MODE=push/pull as an Helm chart value so that we could configure the way to collect metrics from pmm-client ?  
I also created a [JIRAbug](https://jira.percona.com/browse/K8SPSMDB-610) about pmm image tag management.  
Have a good day.  
Best regards

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [December 15, 2021, 12:58pm UTC](https://forums.percona.com/t/pmm-client-2-x-interop-with-external-prometheus-server-i-e-bypass-pmm-server-usage/13431/5 "2021-12-15T12:58:51Z")

</div>

Hey @ORich ,

I will check internally about adding this pull/push option. I think there might be some hidden complexity.

Also with pull, how would you ensure that prometheus gets to the right endpoint?
