# Adding PostgreSQL Queries Overview Dashboards to the PMM Plugin https://www.percona.com/blog/2019/04/23/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/

**URL:** <https://forums.percona.com/t/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin-https-www-percona-com-blog-2019-04-23-adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/14991>\
**Category:** Percona Monitoring and Management (PMM)\
**Tags:** closed-no-reply\
**Created:** [March 30, 2022, 1:46pm UTC](https://forums.percona.com/t/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin-https-www-percona-com-blog-2019-04-23-adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/14991 "2022-03-30T13:46:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Servet\_Kahraman\_Tura](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/servet_kahraman_tura/32/6159_2.png) [@Servet\_Kahraman\_Tura](https://forums.percona.com/u/Servet_Kahraman_Tura)\
**Post date:** [March 30, 2022, 1:46pm UTC](https://forums.percona.com/t/adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin-https-www-percona-com-blog-2019-04-23-adding-postgresql-queries-overview-dashboards-to-the-pmm-plugin/14991/1 "2022-03-30T13:46:45Z")

</div>

Hi,  
I want to add plugin on my Pmm but this is not work  
I connect my PostgreSQL  
I run select and result following

postgres=# SELECT \* FROM pg\_available\_extensions WHERE name = ‘pg\_stat\_statements’;  
name | default\_version | installed\_version | comment  
--------------------±----------------±------------------±----------------------------------------------------------  
pg\_stat\_statements | 1.7 | 1.7 | track execution statistics of all SQL statements executed

postgres=# \dx  
List of installed extensions  
Name | Version | Schema | Description  
--------------------±--------±-----------±-------------------------------------------------------------  
dblink | 1.2 | public | connect to other PostgreSQL databases from within a database  
pg\_stat\_statements | 1.7 | public | track execution statistics of all SQL statements executed  
plpgsql | 1.0 | pg\_catalog | PL/pgSQL procedural language  
(3 rows)

I run on root account following command;

pmm-admin add postgresql:metrics --user postgres HOSTNAME-postgrsql-- --extend.query-path /home/USERNAME/queries.yaml

Result :  
pmm-admin: error: expected command but got “postgresql:metrics”, try --help

I run on root account following command;  
pmm-admin add external:metrics –user pmm\_user –password ‘pmm\_user\_password’ postgres –host HOSTNAME –port 5432 –service-port 9187 –disable-ssl –extend.query-path /home/USERNAME/queries.yaml

Result :  
pmm-admin: error: expected command but got “postgresql:metrics”, try --help

I don’t understand  
I check with pmm-admin --help but there is not pmm-admin add postgresql:metrics command

pmm-admin --help  
usage: pmm-admin [] […]

Version 2.26.0

Flags:  
-h, --help Show context-sensitive help (also try --help-long and --help-man)  
–server-url=SERVER-URL PMM Server URL in `https://username:password@pmm-server-host/` format  
–server-insecure-tls Skip PMM Server TLS certificate validation  
–debug Enable debug logging  
–trace Enable trace logging (implies debug)  
–json Enable JSON output  
-v, --version Show application version

Commands:  
help […]  
Show help

annotate []   
Add an annotation to Grafana charts

config [] [] [] []  
Configure local pmm-agent

list []  
Show Services and Agents running on this Node

status []  
Show information about local pmm-agent

summary []  
Fetch system data for diagnostics

add external --listen-port=LISTEN-PORT []  
Add External source of data (like a custom exporter running on a port) to the monitoring

add external-serverless []  
Add External Service on Remote node to monitoring.

```
Usage example: sudo pmm-admin add external-serverless --url=http://1.2.3.4:9093/metrics

Also, individual parameters can be set instead of --url like: sudo pmm-admin add external-serverless --scheme=http --host=1.2.3.4 --listen-port=9093 --metrics-path=/metrics --container-name=ddd --external-name=e125

Notice that some parameters are mandatory depending on the context. For example, if you specify --url, --schema and other related parameters are not mandatory but, if you specify --host you must provide all other parameters
needed to build the destination URL or even you can specify --address instead of host and port as individual parameters.

```

add haproxy --listen-port=LISTEN-PORT [] []  
Add HAProxy to monitoring

add mongodb [] [] []  
Add MongoDB to monitoring

add mysql [] [] []  
Add MySQL to monitoring

add postgresql [] [] []  
Add PostgreSQL to monitoring

add proxysql [] [] []  
Add ProxySQL to monitoring

register [] [] [] []  
Register current Node at PMM Server

remove [] []  
Remove Service from monitoring

unregister []  
Unregister current Node from PMM Server

How do I add this plugin on pmm?
