[UI] Can't add Postgres instances without postgres DB to PMM

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:

  1. Start posgresql which doesnt have database called "postgres"

  2. Try add this postgresql with pmm-admin

  3. Exporter doesnt work.

 

Suggested implementation:

  1. TBD

How to test

None

How to document

None

Attachments

3

Smart Checklist

Activity

Show:

Former user November 19, 2021 at 2:50 PM
Edited

I was able to add a remote instance via UI but have no metrics on dashboards or QAN.

1. Used this docker-compose:

2. Dropped the postgres db:

3. When trying to add it as remote instance and leaving Database field blank, I'm getting error "Connection check failed: pq: database "postgres" does not exist." as expected. When using pmm-agent as Database, the instance is added;

but no metrics are collected.

Can you please check what could be wrong?

AM October 10, 2021 at 8:09 PM

Please see PR

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Fix versions

Story Points

Sprint

Affects versions

Smart Checklist

Created March 9, 2021 at 9:46 PM
Updated March 6, 2024 at 3:04 AM
Resolved November 30, 2021 at 3:46 PM