Skip to content

Ensure enhanced monitoring is enabled

Description

Ensure enhanced monitoring is enabled on an Aws Rds instance.

Rationale

Enabling enhanced monitoring is important because it allows for metrics that can help identify issues in the DB.

Applies To

  • Databases

Tags

This rule is applied when the following tags are present:

Tag With Value
secureclouddb/provider aws
secureclouddb/service rds
secureclouddb/resource-type db

Default Rule

/**
 * @param {Object} databaseSettings - database settings object
 * @returns {boolean} true if database instance has deletion protection enabled
 */
function validate(databaseSettings) {
    const success = databaseSettings.awsDatabaseInstance &&
        databaseSettings.awsDatabaseInstance.rdsDatabaseInstance &&
        databaseSettings.awsDatabaseInstance.rdsDatabaseInstance.monitoring &&
        databaseSettings.awsDatabaseInstance.rdsDatabaseInstance.monitoring.interval > 0

    return {
        success,
    }
}

// invoke
validate(databaseSettings);