Comments on: Adding PostgreSQL Queries Overview Dashboards to the PMM Plugin https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/ Sat, 10 Feb 2024 00:31:24 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Savo https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972758 Thu, 08 Oct 2020 08:20:34 +0000 https://www.percona.com/blog/?p=55929#comment-10972758 Great, will test it. Thanks Vadim! 🙂

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972756 Wed, 07 Oct 2020 16:26:46 +0000 https://www.percona.com/blog/?p=55929#comment-10972756 Hi Savo,

You should be able to use these dashboards. It were designed for PMM1 so no specific PMM2 variables are used yet (e.g. node_name, service_name …)

]]>
By: Savo https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972753 Wed, 07 Oct 2020 10:56:55 +0000 https://www.percona.com/blog/?p=55929#comment-10972753 Hello,

Is it possible to use this dashboard with already installed postgres_exporter from scratch, together with modified queries.yaml? Not to install PMM client separately? This is because i already have Prometheus and Grafana in environment and we have no need for PMM Server.

BR.
Savo

]]>
By: Siddesh https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972024 Wed, 01 Apr 2020 07:52:15 +0000 https://www.percona.com/blog/?p=55929#comment-10972024 Hi Vadim,

First , Thanks for the reply. It resolved after increasing the METRICS_RESOLUTION=5s

Thanks
Siddesh

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972016 Tue, 31 Mar 2020 12:05:27 +0000 https://www.percona.com/blog/?p=55929#comment-10972016 Hello Siddesh,

Maybe the issue is related to amount of information as a result of used custom query.
Could you test with a simple custom query?
e.g.
https://gist.github.com/adivinho/6e6b938f276932b867fb44b8e007df65

]]>
By: Siddesh https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972014 Tue, 31 Mar 2020 09:41:50 +0000 https://www.percona.com/blog/?p=55929#comment-10972014 Hi Vadim,

i tried with same Server and client version 1.17.3 .. with extend-query-path not working …

time=”2020-03-31T09:35:20Z” level=info msg=”Starting postgres_exporter (version=, branch=, revision=)” source=”postgres_exporter.go:1132″
time=”2020-03-31T09:35:20Z” level=info msg=”Build context (go=go1.10.1, user=, date=)” source=”postgres_exporter.go:1133″
time=”2020-03-31T09:35:20Z” level=info msg=”Established new database connection.” source=”postgres_exporter.go:1015″
time=”2020-03-31T09:35:20Z” level=info msg=”Semantic Version Changed: 0.0.0 -> 11.2.0″ source=”postgres_exporter.go:945″
time=”2020-03-31T09:35:20Z” level=info msg=”Starting HTTP server for http://1x.1xx.1xx.2×1:9187/metrics …” source=”server.go:121″

]]>
By: Siddesh https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972007 Mon, 30 Mar 2020 14:30:14 +0000 https://www.percona.com/blog/?p=55929#comment-10972007 Hi ,

Typo in my pmm-server version .. its pmm-server-1.16.0-12

Thanks
Siddesh

]]>
By: Siddesh https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10972004 Mon, 30 Mar 2020 12:02:53 +0000 https://www.percona.com/blog/?p=55929#comment-10972004 Hi Vadim,

Please help …

I have installed PMM1.6 and PMM client 1.71 , Node exprter working fine . Postgresql_exprters also working fine.

But when i removed and added postgresql exporter with extend query pmm-admin check-network showing down..

[root@sl73gseldbd192 prometheus]# pmm-admin add postgresql:metrics –user pmm_user –password secret postgres –host slxxxldbd192 –port 5432 –service-port 9187 –disable-ssl –extend.query-path /pgworkspace/software/prometheus/queries.yaml

* Connection: Client <– Server
——————- ————— ——————— ——- ———- ———
SERVICE TYPE NAME REMOTE ENDPOINT STATUS HTTPS/TLS PASSWORD
——————- ————— ——————— ——- ———- ———
linux:metrics slxxxldbd192 10.160.109.221:9100 OK NO –
postgresql:metrics postgres 10.160.109.221:9187 DOWN NO –

PMM Server | slxxxeldbd217 (insecure SSL)
Client Name | sxxxseldbd192.visa.com
Client Address | 10.1xx0.1xx9.xx21
Service Manager | linux-systemd

——————- ————— ———– ——– ——————————————– ————
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
——————- ————— ———– ——– ——————————————– ————
linux:metrics sl7xxldbd192 9100 YES – scheme=http
postgresql:metrics postgres 9187 YES postgresql:***@sl73gxxxd192:5432/postgres scheme=http

pmm_user=# show is_superuser
pmm_user-# ;
is_superuser
————–
on
(1 row)

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971987 Wed, 25 Mar 2020 12:04:52 +0000 https://www.percona.com/blog/?p=55929#comment-10971987 Hi Nick,
We don’t have a docker container for our version of postgres exporter.

]]>
By: Nick https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971978 Tue, 24 Mar 2020 10:18:34 +0000 https://www.percona.com/blog/?p=55929#comment-10971978 Hi Vadim,

Great tutorial.

Can I and/or how can I add –extend.query-path on linux docker postgres exporter?

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971925 Fri, 13 Mar 2020 11:33:53 +0000 https://www.percona.com/blog/?p=55929#comment-10971925 Hi Nenad,

What PMM version is used?

Here are commands for PMM 2.x versions
$ pmm-admin remove postgresql
$ docker exec -it pmm-server pmm-admin list –server-url=http://username:password@localhost/

]]>
By: Nenad https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971924 Fri, 13 Mar 2020 10:48:57 +0000 https://www.percona.com/blog/?p=55929#comment-10971924 Hi Vadim,

thank you for this nice tutorial!

I have a question regarding pmm-admin rm postgresql:metrics PS_NODE-1 part….I get a massage :

pmm-admin: error: enum value must be one of mysql,mongodb,postgresql,proxysql, got ‘postgresql:metrics’, try –help

Also when I try docker exec -it pmm-server pmm-admin list , it says: Unauthorized. Please check username and password.

BR

Nenad

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971432 Thu, 14 Nov 2019 13:12:43 +0000 https://www.percona.com/blog/?p=55929#comment-10971432 Hi Rushi,
Please make sure that your PostgreSQL instance was added to monitoring with a user that has superuser rights.
So this user can get information from pg_stat_statements.

e.g.
pguser=# show is_superuser;
is_superuser
————–
on
(1 row)

pguser=# select count(*) from pg_stat_statements;
-[ RECORD 1 ]
count | 36

]]>
By: Rushi https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971427 Wed, 13 Nov 2019 19:06:10 +0000 https://www.percona.com/blog/?p=55929#comment-10971427 Rushi Reply
Hi Vadim, Yalovets, I have pg_stat_statements version 1.3 installed.. should it work ?

I actually installed and when i ran postgres_exporter with –extend.query-path its still throwing error
INFO[0173] Error running query on database “localhost:5432”: pg_stat_statements pq: relation “pg_stat_statements” does not exist source=”postgres_exporter.go:1286″

]]>
By: Rushi https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971426 Wed, 13 Nov 2019 19:05:08 +0000 https://www.percona.com/blog/?p=55929#comment-10971426 Hi Vadim, Yalovets, I have pg_stat_statements version 1.3 installed.. should it work ?

I actually installed and when i ran postgres_exporter with –extend.query-path its still throwing error
INFO[0173] Error running query on database “localhost:5432”: pg_stat_statements pq: relation “pg_stat_statements” does not exist source=”postgres_exporter.go:1286″

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971359 Thu, 31 Oct 2019 08:12:53 +0000 https://www.percona.com/blog/?p=55929#comment-10971359 Hello Dinesh,

Could you use a full path to your file for the flag extend.query-path?
e.g.
–extend.query-path /home/username/queries2.yaml

]]>
By: dinesh https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10971240 Fri, 27 Sep 2019 02:02:06 +0000 https://www.percona.com/blog/?p=55929#comment-10971240 i have done the setup as instructed above i could see dashboard but with no datapoints i have used the below commands with extend querypath with the yaml file provided above but still getting the no datapoints can you throw some light on this
pmm-admin list doesnt show the options value does it have anything to do with missing data points

[~]# pmm-admin add postgresql:metrics –host=localhost –password=yyy –port=5432 –user=xxx — –extend.query-path ./queries2.yaml
OK, now monitoring PostgreSQL metrics using DSN postgresql:***@localhost:5432/postgres
[root@db0pg1-1-prd ~]# pmm-admin list
pmm-admin 1.17.0

PMM Server | 10.252.203.232
Client Name | db0pg1-1-prd.eng.sfdc.net
Client Address | 10.252.203.232
Service Manager | linux-systemd

——————- ————————– ———– ——– ————————————— ——–
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
——————- ————————– ———– ——– ————————————— ——–
linux:metrics xxxxxx 42000 YES –
postgresql:metrics xxxxx 42005 YES postgresql:***@localhost:5432/postgres

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10970984 Sun, 14 Jul 2019 17:56:50 +0000 https://www.percona.com/blog/?p=55929#comment-10970984 It’s 42005.

]]>
By: Vadim Yalovets https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10970983 Sun, 14 Jul 2019 13:15:21 +0000 https://www.percona.com/blog/?p=55929#comment-10970983 The default TCP port for PostgreSQL is usually 5432. It can be checked in the file postgresql.conf
e.g.
# grep “port = ” /etc/postgresql/10/main/postgresql.conf
port = 5432 # (change requires restart)

]]>
By: andrypein https://www.percona.com/blog/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/#comment-10970980 Sat, 13 Jul 2019 14:08:40 +0000 https://www.percona.com/blog/?p=55929#comment-10970980 which port number should be opened on firewall?
if mysql are 42002 and 42000, then what about postgre?

]]>