From 47f2bed47c3efd6ca9b0c62bcacef272ef488a7a Mon Sep 17 00:00:00 2001 From: Andrew Rumble Date: Wed, 26 Mar 2025 10:42:08 +0000 Subject: [PATCH] Monitor backup status in health check GitOrigin-RevId: 1a90b2fcf85bfa5ec1e5aabcfe4183d406da95e6 --- services/history-v1/backupVerifier/healthCheck.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/history-v1/backupVerifier/healthCheck.mjs b/services/history-v1/backupVerifier/healthCheck.mjs index 48cd187c9a..41f5db6d0c 100644 --- a/services/history-v1/backupVerifier/healthCheck.mjs +++ b/services/history-v1/backupVerifier/healthCheck.mjs @@ -1,5 +1,10 @@ import config from 'config' import { verifyProjectWithErrorContext } from '../storage/lib/backupVerifier.mjs' +import { + measureNeverBackedUpProjects, + measurePendingChangesBeforeTime, +} from './ProjectMetrics.mjs' +import { getEndDateForRPO, RPO } from './utils.mjs' /** @type {Array} */ const HEALTH_CHECK_PROJECTS = JSON.parse(config.get('healthCheckProjects')) @@ -21,4 +26,7 @@ export async function healthCheck() { for (const historyId of HEALTH_CHECK_PROJECTS) { await verifyProjectWithErrorContext(historyId) } + + await measurePendingChangesBeforeTime(getEndDateForRPO()) + await measureNeverBackedUpProjects(RPO) }