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

[BE] Amazon RDS PostgreSQL monitoring

    XMLWordPrintable

    Details

      Description

      User story:
      As PMM Admin user I need to be able to use the Discovery feature and add to the Monitoring AWS based PostgreSQL instances so I can monitor their performance

      UI/UX:
      N/A, same as existed

      Acceptance criteria

      • User needs to be able to provide AWS credentials and see all list of supported DB, including Postgresql related of all versions (Discovery
      • User able to proceed to add RDS PG instances without  filling all fields needed for rds monitoring  (same as for MySQL)
      • User able to use API to add RDS PG instances to the monitoring  
      • need to be tested with: 
        • AWS RDS PostgreSQL - Versions: 11.10, 12.5 (latest )
        • AWS Aurora ( PostgreSQL)  - Versions: 11.9, 12.4 (latest)

      Out of scope:

      • TBD

      Suggested implementation:
      TBD

      How to test:
      TBD

      Details:

       

       

      Currently the RDS exporter is only being used when adding MySQL RDS instances.

       However, there's a workaround to collect Postgres RDS cloudwatch metrics with the rds_exporter bundled with PMM: 

      • Add the PG RDS instance normally with the "Add a remote instance" button from the PMM Add Instance Dashboard
      • Once added, find out the node id, for example: /node_id/7c65ee37-5b15-4632-862a-af1dba2452c3
      • Use the API method /v1/inventory/Agents/AddRDSExporter. Pass the node id, and the access/secret aws keys
      • Agent will be added

      Now, here's the workaround: The configuration file created inside the container in /tmp/rds_exporter/pmm-server/rds/config needs a tweak. It will add as "instance" the eds endpoint, not the db identifier:

       

      - region: us-west-2
       instance: my-rds-instance.xxxxxxxx.us-west-2.rds.amazonaws.com <---HERE
       aws_access_key: XXXXXXX
       aws_secret_key: XXXXXXXX
       disable_basic_metrics: false
       disable_enhanced_metrics: false
       labels:
       agent_id: /agent_id/cdc91933-b973-4414-a2cc-e5462541dbaa
       agent_type: rds_exporter
       node_id: /node_id/69f2d5a0-e518-44f7-b6b1-530bcc62f0f5
       node_model: db.m5.xlarge
       node_type: remote

      The fix is to modify the "instance" by changing the endpoint to the actual db identifier (the part before the first dot) and force the rds_exporter process to be restarted (i do it with a kill -9 <pid>)

      Once that is done, CloudWatch metrics starts to become collected

      So, it will only takes to fix the agent code to use the db instance name instead of the endpoint to make it work with Postgres RDS

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              carlos.salguero Carlos Salguero
              Reporter:
              nethalo Daniel Guzman Burgos
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 3 hours, 30 minutes
                  3h 30m

                    Smart Checklist