Skip to content

AWS MemoryDB

Use the script package series of 「Guance Cloud Sync」in the script market to synchronize cloud monitoring and cloud asset data to Guance

Configuration

Install Func

It is recommended to activate the Guance integration - extension - hosted version Func: all prerequisites are automatically installed. Please continue with the script installation.

If you deploy Func by yourself, refer to Self-deployed Func

Install Script

Note: Please prepare an Amazon AK that meets the requirements in advance (for simplicity, you can directly grant global read-only permission ReadOnlyAccess)

Hosted Version Activation Script

  1. Log in to Guance console
  2. Click on the 【Integration】 menu, select 【Cloud Account Management】
  3. Click 【Add Cloud Account】, select 【AWS】, fill in the required information on the interface. If cloud account information has been configured before, skip this step.
  4. Click 【Test】, after a successful test click 【Save】. If the test fails, check whether the related configuration information is correct and retest.
  5. In the 【Cloud Account Management】 list, you can see the added cloud account. Click on the corresponding cloud account to enter the details page.
  6. Click the 【Integration】 button on the cloud account detail page. Under the Not Installed list, find AWS MemoryDB, click the 【Install】 button. An installation interface will pop up for installation.

Manual Activation Script

  1. Log in to the Func console, click 【Script Market】, enter the official script market, search for guance_aws_memorydb

  2. After clicking 【Install】, input the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】, the system will automatically create a Startup script set and automatically configure the corresponding startup scripts.

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute once without waiting for the scheduled time. Wait a moment, then you can view the execution task records and corresponding logs.

We default collect some configurations, for more details see the Metrics section.

Verification

  1. In 「Management / Automatic Trigger Configuration」 confirm if the corresponding task has the corresponding automatic trigger configuration. You can also check the task records and logs for any abnormalities.
  2. In Guance, 「Infrastructure / Custom」 check if there is asset information.
  3. In Guance, 「Metrics」 check if there is corresponding monitoring data.

Metrics

After configuring Amazon-CloudWatch, the default metric set is as follows. You can collect more metrics through configuration Amazon Cloud Monitoring Metric Details

Metrics Description Units
ActiveDefragHits The number of times per minute that the active defragmentation process reallocates values. This is derived from the active_defrag_hits statistic in Redis INFO. Number
AuthenticationFailures Total number of failed attempts to authenticate with Redis using the AUTH command. You can use the ACL LOG command to find more information about individual authentication failures. We recommend setting alarms for this to detect unauthorized access attempts. Count
BytesUsedForMemoryDB Total number of bytes allocated by MemoryDB for all purposes, including datasets, buffers, etc. Bytes
CommandAuthorizationFailures Number of failed attempts by users to call commands they do not have permission for. You can use the ACL LOG command to find more information about individual authorization failures. We recommend setting alarms for this to detect unauthorized access attempts. Count
CurrConnections Number of client connections, excluding those from read-only replicas. MemoryDB uses two to four connections to monitor various cluster conditions. This is derived from the connected_clients statistic in Redis INFO. Count
CurrItems Number of items in the cache. This value is derived from Redis keyspace statistics by summing all keys across the key space. Count
DatabaseMemoryUsagePercentage Percentage of available memory used by the cluster. This is calculated using used_memory/maxmemory from Redis INFO. Percentage
EngineCPUUtilization Provides CPU utilization of Redis engine threads. Since Redis is single-threaded, you can use this metric to analyze the load on the Redis process itself. The EngineCPUUtilization metric more accurately reflects Redis processes. It can be used in conjunction with the CPUUtilization metric. CPUUtilization exposes overall CPU usage of the server instance, including other operating system and management processes. For larger node types with four or more vCPUs, the EngineCPUUtilization metric can be used to monitor and set scaling thresholds. Note that on MemoryDB hosts, background processes monitor the host to provide a managed database experience. These background processes may consume a significant portion of the CPU workload. This has less impact on large hosts with more than two vCPUs but more on small hosts with no more than two vCPUs. If only the EngineCPUUtilization metric is monitored, high CPU usage caused by Redis or background monitoring processes leading to host overload might go unnoticed. Therefore, we recommend monitoring the CPUUtilization metric for hosts with no more than two vCPUs. Percentage
Evictions Number of keys evicted due to maxmemory limit. This is derived from the evicted_keys statistic in Redis INFO. Count
IsPrimary Indicates whether the node is the primary node for the current shard. The metric can be 0 (not primary) or 1 (primary). Count
KeyAuthorizationFailures Number of failed attempts by users to access keys they do not have permission for. You can use the ACL LOG command to find more information about individual authorization failures. We recommend setting alarms for this to detect unauthorized access attempts. Count
KeyspaceHits Number of successful read-only key lookups in the main dictionary. This is derived from the keyspace_hits statistic in Redis INFO. Count
KeyspaceMisses Number of failed read-only key lookups in the main dictionary. This is derived from the keyspace_misses statistic in Redis INFO. Count
KeysTracked Percentage of keys tracked by Redis key tracking relative to tracking-table-max-keys. Key tracking helps client-side caching and notifies clients when keys are modified. Count
MaxReplicationThroughput Maximum replication throughput observed during the last measurement period. Bytes per second
MemoryFragmentationRatio Indicates the efficiency of Redis engine's memory allocation. Certain thresholds indicate different behaviors. The recommended value is for fragmentation greater than 1.0. This is calculated from the mem_fragmentation_ratio statistic in Redis INFO. Number
NewConnections Total number of connections accepted by the server during this period. This is derived from the total_connections_received statistic in Redis INFO. Count
PrimaryLinkHealthStatus This status has two values: 0 or 1. A value of 0 indicates that the data in the MemoryDB primary node is not synchronized with Redis on EC2. A value of 1 indicates that the data is synchronized. Boolean
Reclaimed Total number of key expiration events. This is derived from the expired_keys statistic in Redis INFO. Count
ReplicationBytes For nodes in a replica configuration, ReplicationBytes reports the number of bytes sent by the master to all its replicas. This metric represents the write load on the cluster. This is derived from the master_repl_offset statistic in Redis INFO. Bytes
ReplicationDelayedWriteCommands Number of commands delayed due to exceeding maximum replication throughput. Count
ReplicationLag This metric applies only to nodes running as read-only replicas. It represents the time lag (in seconds) in applying changes from the primary node. Seconds
CPUUtilization Overall percentage of CPU usage on the host. Since Redis is single-threaded, we recommend monitoring the EngineCPUUtilization metric for nodes with 4 or more vCPUs. Percentage
FreeableMemory Available idle memory on the host. This is derived from RAM, buffer pools reported as free by the operating system. Bytes
NetworkBytesIn Number of bytes read from the network by the host. Bytes
NetworkBytesOut Number of bytes sent over all network interfaces by the instance. Bytes
NetworkConntrackAllowanceExceeded Number of packets dropped because connection tracking exceeded the maximum allowed for the instance and new connections could not be established. This may cause packet loss for traffic entering or leaving the instance. Count
SwapUsage Swap space usage on the host. Bytes

Objects

Collected AWS MemoryDB object data structure, which can be seen in the 「Infrastructure-Custom」 section.

{
  "measurement": "aws_memorydb",
  "tags": {
    "RegionId"              : "cn-north-1",
    "Status"                : "xxxx",
    "ClusterName"           : "xxxxxx",
    "AvailabilityMode"      : "xxxxxx",
    "NodeType"              : "xxxxxx",
    "EngineVersion"         : "xxxxxx",
    "EnginePatchVersion"    : "xxxxxx",
    "ParameterGroupName"    : "xxxxxx",
    "ParameterGroupStatus"  : "xxxxxx",
    "ARN"                   : "arn:aws-cn:kms:cn-northwest-1:xxxx",
    "SnsTopicStatus"        : "xxxxxx",
    "SnsTopicArn"           : "xxxxxx",
    "MaintenanceWindow"     : "xxxxxx",
    "SnapshotWindow"        : "xxxxxx",
    "ACLName"               : "xxxxxx",
    "name"                  : "xxxxxx"
  },
  "fields": {
    "Description": "xxxxxx",
    "SecurityGroups": "xxxxxx",
    "NumberOfShards": "xxxxxx",
    "TLSEnabled": "xxxxxx",
    "SnapshotRetentionLimit": "xxxxxx",
    "AutoMinorVersionUpgrade": "xxxxxx",
    "NumberOfShards" : "1",
    "message"     : "{Instance JSON data}"
  }
}

Note: Fields in tags and fields may change with subsequent updates.

Feedback

Is this page helpful? ×