department-of-veterans-affairs / abd-vro

To get Veterans benefits in minutes, VRO software uses health evidence data to help fast track disability claims.
Other
19 stars 6 forks source link

Explore a custom RDS monitoring solution so we can create a retention and storage policy #2116

Open dianagriffin opened 11 months ago

dianagriffin commented 11 months ago

As a VRO Platform team member, I want to explore ways to monitor RDS through a custom solution after discovering that I do not have access to RDS metrics from LHDI.

Acceptance Criteria:

the essential metrics for monitoring are CPU Utilization, Memory, and Storage. Outline the best approach and plan for implementing the custom monitoring solution. Include details on tools, technologies, and methods to be used. Provide an outline for an implementation path. Create tickets for subsequent work as needed (if possible) Amy mentioned whoever picks up this ticket should work with Cory on any ideas he may have. Collaborate with Megan to ensure this work is prioritized and integrated into the team's roadmap if possible

dianagriffin commented 11 months ago

Notes from team discussion:

msnwatson commented 2 months ago

The engineer working on this should at least look at native Postgres DB mechanisms for achieving retention such as partitioning by date with an expiration period or submitting jobs through AWS client libraries for performing operations on DB tables.

DB schema alterations should be carefully considered

meganhicks commented 2 months ago

might be good to pair with Mason, Cheng or Erik

nelsestu commented 3 weeks ago

pg_cron is a custom extension for PostgreSQL that allows you to schedule jobs directly within the database. While pg_cron would provide an ideal implementation path, we need someone to validate our RDS version and validate that we can pass the appropriate ACK config in through LHDI. This is because RDS does not support installing custom extensions directly.

Some very useful examples of using pg_cron include the following: Collect Native Postgresql Metrics pgwatch2 - a PostgreSQL metrics monitor implementation postgres_exporter - PostgreSQL metric exporter for Prometheus

From the examples listed above, confirm that we can capture all the metrics listed in the AC and feel free to specify your top recommendation.

PaulKBaumann commented 1 week ago

This is blocked because we need superuser access to the database in order to set up the pg_cron plugin.

https://github.com/department-of-veterans-affairs/lighthouse-di-tenant-support/issues/43

PaulKBaumann commented 2 days ago

Unblocked enough to continue making progress on this research. We're still missing a way to log into the prod RDS instance