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

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, 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

1 Like

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

pmm:
  enabled: true
  image:
    repository: percona/pmm-client
    tag: 2.21.0
  serverHost: 
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.
1 Like

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
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

1 Like

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 about pmm image tag management.
Have a good day.
Best regards

1 Like

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?

1 Like