AWS ElastiCache Redis¶
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 Guance integration - extension - DataFlux Func (Automata): all prerequisites will be automatically installed, please continue with the script installation.
If you deploy Func by yourself, refer to Self-deployed Func
Install Script¶
Note: Please prepare a qualified Amazon AK in advance (for simplicity, you can directly grant global read-only permission
ReadOnlyAccess
)
Script for activating managed version¶
- Log in to Guance console
- Click on the 【Integration】 menu, select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, fill in the required information on the interface. If the cloud account information has been configured before, ignore this step.
- Click 【Test】, after testing successfully, click 【Save】. If the test fails, check whether the relevant configuration information is correct and retest.
- In the 【Cloud Account Management】 list, you can see the added cloud accounts. Click on the corresponding cloud account and enter the details page.
- Click the 【Integration】 button on the cloud account details page. In the
Not Installed
list, findAWS ElastiCache Redis
, click the 【Install】 button, and install it from the pop-up installation interface.
Manually activate script¶
-
Log in to the Func console, click 【Script Market】, enter the official script market, search:
guance_aws_elasticache
-
After clicking 【Install】, input the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and automatically configure the corresponding startup script. -
After activation, you can see the corresponding automatic trigger configuration under 「Management / Automatic Trigger Configuration」. Click 【Execute】, and you can immediately execute once without waiting for the scheduled time. After a while, you can view the execution task records and corresponding logs.
Verification¶
- Confirm in 「Management / Automatic Trigger Configuration」 that the corresponding task has an automatic trigger configuration, and you can also check the corresponding task records and logs for any abnormalities.
- In Guance, 「Infrastructure / Custom」, check if there are asset information.
- In Guance, 「Metrics」, check if there are corresponding monitoring data.
Metrics¶
After configuring Amazon-Cloud Monitoring properly, the default metric set is as follows. You can collect more metrics through configuration. Amazon Cloud Monitoring Metric Details
Host-level Metrics¶
Metric Name | Description | Unit | Dimension |
---|---|---|---|
CPUUtilization | The percentage of CPU usage across the entire host | % | name |
FreeableMemory | The amount of available idle memory on the host. This is derived from RAM reported as free, buffers, and cache by the operating system. | byte | name |
SwapUsage | The amount of swap space used on the host. | byte | name |
NetworkBytesIn | The number of bytes read from the network by the host. | byte | name |
NetworkBytesOut | The number of bytes sent by the instance on all network interfaces. | byte | name |
NetworkPacketsIn | The number of packets received by the instance on all network interfaces. This metric identifies the volume of incoming traffic based on packet count per single instance. | count | name |
NetworkPacketsOut | The number of packets sent by the instance on all network interfaces. This metric identifies the volume of outgoing traffic based on packet count per single instance. | count | name |
Redis Metrics¶
Metric Name | Description | Unit | Dimension |
---|---|---|---|
ActiveDefragHits |
The number of value reassignments performed per minute by the active defragmentation process. | count | name |
BytesUsedForCache |
The total number of bytes used in memory for caching. | byte | name |
CacheHits |
The number of successful read-only key lookups in the main dictionary. | count | name |
CacheMisses |
The number of failed read-only key lookups in the main dictionary. | count | name |
CurrConnections |
The number of client connections, excluding connections from read-only replicas. | count | name |
CurrItems |
The number of items in the cache. | count | name |
CurrVolatileItems |
The total number of keys with ttl set in all databases. | count | name |
DatabaseCapacityUsagePercentage |
The percentage of the cluster's total data capacity currently in use. | % | name |
DatabaseMemoryUsagePercentage |
The percentage of memory in use within the cluster. | % | name |
EngineCPUUtilization |
Provides the CPU utilization of the Redis engine threads. | % | name |
Evictions |
The number of keys evicted due to the maxmemory limit. |
count | name |
IsMaster |
Indicates whether the node is the master node for the current shard/cluster. The metric can be 0 (non-master) or 1 (master). | count | name |
MasterLinkHealthStatus |
This status has two values: 0 or 1. A value of 0 indicates that the data in the Elasticache master node is not synchronized with Redis on EC2. A value of 1 indicates that the data is synchronized. | count | name |
MemoryFragmentationRatio |
Indicates the efficiency of memory allocation for the Redis engine. | count | name |
Objects¶
The collected AWS ElastiCache Redis object data structure from Amazon can be viewed in 「Infrastructure-Custom」
{
"measurement": "aws_elasticache",
"tags": {
"name" : "test",
"CacheClusterId" : "test",
"CacheNodeType" : "cache.t3.small",
"Engine" : "redis",
"EngineVersion" : "6.2.5",
"CacheClusterStatus" : " available",
"PreferredAvailabilityZone": "cn-northwest-1b",
"ARN" : "arn:aws-cn:elasticache:cn-northwest-1:5881335135:cluster:test",
"RegionId" : "cn-north-1"
},
"fields": {
"SecurityGroups": "{JSON security group data}}",
"NumCacheNodes" : "1",
"message" : "{Instance JSON data}"
}
}
Note: Fields in
tags
,fields
may change with subsequent updates.Tip 1: The value of
tags.name
is the instance ID, used for unique identification.Tip 2:
fields.message
,fields.network_interfaces
,fields.blockdevicemappings
are JSON serialized strings.