Correct flags to register a node

Hello.
I’m trying to deploy a Percona server in a brand new project, but I’m getting a problem with the node registry.

I’ve deploy pmm-server in a docker. Then registered a node with sudo pmm-admin config --server-insecure-tls --server-url=https://admin:admin@127.0.0.1:443. I’ve installed the pmm-client at same machine that is my docker server.

When I add a new postgre to get metrics, the “Home” dashboard shows a new “DB instance monitored”. The number get increased.
But I just cant find the postgre in any node overview, the new service donst appear in service dropdown at postgres summary page.

I follow the docs to deploy everything. Is there some mistake?

Hi @AND,

Could you provide an output of the next command?
pmm-admin status

1 Like

and@pmm-apalache-dev:~$ pmm-admin status
Agent ID: /agent_id/2eb448e2-96bc-4ec1-8b34-df9614e2649a
Node ID : /node_id/eebdbaa6-11cc-463f-b528-643501c96f99

PMM Server:
URL : https://127.0.0.1:443/
Version: 2.17.0

PMM Client:
Connected : true
Time drift : 13.8µs
Latency : 389.231µs
pmm-admin version: 2.17.0
pmm-agent version: 2.17.0
Agents:
/agent_id/81b8ae0b-c715-406f-a67c-2b4080b80216 postgresql_pgstatements_agent Running
/agent_id/a0ba186a-cab1-433c-80cd-1767981aa719 node_exporter Running
/agent_id/a9f14e1e-cefe-4892-93da-0cd7a90eb397 vmagent Running
/agent_id/d7d65ef4-2734-4229-8779-9e0c55de9114 postgres_exporter Running

Adition info:

1 Like

Change the time period to 5m (upper right corner). Do you see the server now?

1 Like

No, my new node with the postgres db added does not appear on the list.

He was shown in the System Node overview, but with “0 DB instances”.

1 Like

I have found something, but dont know how to fix.
My list at https://localhost/prometheus/targets dont grow up when I add new services.
Is there a mistake during pmm-node register?

1 Like

It looks like IP address of your node wasn’t correctly detected.
You may check the auto detected IP on the inventory page.

Also you may specify node’s IP manually in the config command.

1 Like

Hi
I have my node running in the host machine, and I can ping my pmm-server.

I have registered my node using this command: sudo pmm-admin config --server-insecure-tls --server-url=https://admin:admin@127.0.0.1:443 172.17.0.1 generic Postgre1

I have added this node, and registered a postgre to monitor.
sudo pmm-admin add postgresql --username=pmm --password=pmm2021 --service-name=postgre1-dev Postgre1 172.18.0.2:5432

But in addres https://localhost/prometheus/targets my new target does not appear.

Where can I found all ports used by pmm?

1 Like

Here are shown targets in pull mode.
The mode (push/pull) is controlled by the --metrics-mode flag for the pmm-admin config and pmm-admin add commands. Push mode is used by default.

You may check used port in an output of command pmm-admin list
Screenshot_20210513_191344

1 Like

When I try to run pmm-admin list inside server container, I’ve go
t this:
image

I tryed to deploy a pmm-client in a docker container, registered a new node and then added a postgre to monitoring, still dont getting any metrics, and also the node with a postgres db dont show on Postgres Overview

1 Like

I think I have found the issue, but dont know how to fix it.

I had another post talking about the bug with SSL conection with GCP SQL Instances that currently dont work with percona.

I’ve deployed a new agent within’a docker container, and watching logs:

This DB was previously with SSL Only Conections, but Percona dont work whit this. Then I have open it to all conection type, but GCP “looks like” keep forcing the conection trough SSL.

PS: Used flags --tls --tls-skip-verify but keep bloking in SSL.
How do I proceed withing percona side?

1 Like

Are you able to directly connect to the postgresql service in SSL mode from pmm-client host?

1 Like

Are you able to directly connect to the postgresql service in SSL mode from pmm-client host? yes sir.

I cant conect to a Cloud SQL DB in GCP, pg_hba.conf was refusing my conection with pmm_user.
found in error line, percona trying to conect to cloudsqladmin db…

In comand line to create an agent pmm add postgre, so my conection was going to cloudsqladmin, the “default” by google.
Its happening because I’ve used CREATE EXTENSION pg_stat_statements; with my db-admin acount, and GCP dont swith defaultness to this extension.

To solve this problem, CREATE EXTENSION pg_stat_statements; should run with postgres user for GCP.

But know I’m facing a new challenge:

How can I set pmm-admin to ignore the database cloudsqladmin?

1 Like

db=cloudsqladmin,user=wiser_pmm_user FATAL: pg_hba.conf rejects connection for host "XXX.XXX.XXX.XXX"
Whats the necessary roles for pmm user in CloudSQL?

1 Like

The error seems like pg_hba.conf is rejecting the connection requested. Is there a configuration statement that explicitly rejects connections?

The server logs will have more details about the connection requested, including the user name.

1 Like

Deeply analyzing, isnt a flag issue, but somethign with the postgre_exporter

Solved at:

1 Like