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

Migrate Grafana from using SQLite to PostgreSQL

Details

    • 10
    • Yes
    • Yes
    • No
    • Hide

      Please check PR: https://github.com/Percona-Lab/pmm-submodules/pull/3020

       

      Also from descr:

      It's quite a big change. It contains two parts:

      1. Change database encoding to UTF8
      2. Migrate to Postgres database for Grafana. 

      All PMM functions can be impacted. What I think is worth paying attention to when testing:

      1. Upgrade process. Especially with data (Mongo, Postgress, RDS instances).
      2. Adding/Editing new instances.
      3. Grafana works as expected (Adding new users, editing/creating dashboard, datasources, and so on).

       

      Show
      Please check PR: https://github.com/Percona-Lab/pmm-submodules/pull/3020   Also from descr: It's quite a big change. It contains two parts: Change database encoding to UTF8 Migrate to Postgres database for Grafana.  All PMM functions can be impacted. What I think is worth paying attention to when testing: Upgrade process. Especially with data (Mongo, Postgress, RDS instances). Adding/Editing new instances. Grafana works as expected (Adding new users, editing/creating dashboard, datasources, and so on).  
    • just release notes and later mention about it in whole HA notes

    Description

      User story:

      • As PMM developers, we want less complexity in the system with many different DB's used inside
      • as PMM is used, we need the better performance of Auth system and sessions. It's a known problem with Go and SQL like about concurrency, so the SQL lite is a problem for deployments with a significant number of users and services

      UI/UX:
      N/A

      Acceptance criteria

      • PMM Grafana storage changed from internal SQL lite to PG used inside PMM for Inventory data
      • All data migrated correctly and change of the component is transparent for the user and does not require additional actions from them, besides usual update

      Out of scope:

      • TBD

      Suggested implementation:
      TBD

      How to test:
      It's quite a big change. It contains two parts:

      1. Change database encoding to UTF8
      2. Migrate to Postgres database for Grafana. 

      All PMM functions can be impacted. What I think is worth paying attention to when testing:

      1. Upgrade process. Especially with data (Mongo, Postgress, RDS instances).
      2. Adding/Editing new instances.
      3. Grafana works as expected (Adding new users, editing/creating dashboard, datasources, and so on).

      Original report:

       

      With a lot of authentication requests, sqlite3 locks too often. We need to use PostgreSQL instead.

      For PG we need to use separate DB ('grafana')

      ------
      This will give us much better stability, especially for User Auth requests, and probably eliminate bugs with logged out users

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              roma.novikov Roma Novikov
              Votes:
              1 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist