Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
2.11.1
-
3
-
Yes
-
Yes
-
[obsolete] Implex
Description
The API and PMM Add Instance dashboard both assume that the Postgres instance to be added has a database called postgres. This is not alway true. For example, DigitalOcean DBaaS instances are created with a defaultdb database instead. The AddPostgreSQLService endpoint and the PMM Add Instance dashboard should both allow the user to specify the database name when adding a Postgres instance.
User impact:
If user dont have database called postgres then you can get broken exporter.
STR:
- Start posgresql which doesnt have database called "postgres"
- Try add this postgresql with pmm-admin
- Exporter doesnt work.
Suggested implementation:
- Add field in AddPostgreSQLServiceRequest in services.proto (PMM repo).
- Add field in AddPostgreSQLRequest in postgresql.proto (PMM repo).
- Add flag (PMM Admin repo).
- Use this field in postgresql.go, services.go, converters.go, service_helpers.go (PMM Managed repo).
- Use this field in function New in pgstatstatements.go, pgstatmonitor.go (PMM Agent repo).
Attachments
Issue Links
- is blocked by
-
PMM-7807 [SPIKE] Can't add Postgres instances without postgres DB to PMM
-
- Done
-
- is cloned by
-
PMM-7807 [SPIKE] Can't add Postgres instances without postgres DB to PMM
-
- Done
-
-
PMM-7669 [UI] Can't add Postgres instances without postgres DB to PMM
-
- Done
-
- relates to
-
PMM-7131 [ UI ] QAN for Postgresql attempts to connect to a database with the same name as the username
-
- Done
-