Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-6937

Can't add PostgreSQL instances to PMM without `postgres` DB in PostgreSQL server

Details

    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. Add field in AddPostgreSQLServiceRequest in services.proto (PMM repo).
      2. Add field in AddPostgreSQLRequest in postgresql.proto (PMM repo).
      3. Add flag (PMM Admin repo).
      4. Use this field in postgresql.go, services.go, converters.go, service_helpers.go (PMM Managed repo).
      5. Use this field in function New in pgstatstatements.go, pgstatmonitor.go (PMM Agent repo).

      Attachments

        Issue Links

          Activity

            People

              oleksii.mukas Alexey Mukas (Inactive)
              dankow Daniel Kowalewski
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist