AWS ElastiCache Redis¶
Use the "Cloud Sync" series of script packages in the script market to synchronize cloud monitoring and cloud asset data to TrueWatch
Configuration¶
Install Func¶
It is recommended to activate the TrueWatch integration - extension - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation
If deploying Func manually, refer to Self-deploying Func
Install Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant global read-only permission
ReadOnlyAccess
)
Activate Script in DataFlux Func (Automata)¶
- Log in to the TrueWatch console
- Click on the 【Integration】 menu, select 【Cloud Account Management】
- Click on 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step
- Click on 【Test】, if the test is successful, click on 【Save】. If the test fails, please check if the relevant configuration information is correct and retest
- Click on 【Cloud Account Management】, you can see the added cloud account in the list, click on the corresponding cloud account to enter the details page
- Click on the 【Integration】 button on the cloud account details page, find
AWS ElastiCache Redis
under theNot Installed
list, click on the 【Install】 button, and the installation interface will pop up for installation.
Manually Activate Script¶
-
Log in to the Func console, click on 【Script Market】, enter the TrueWatch script market, search for:
integration_aws_elasticache
-
Click on 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click on 【Deploy Startup Script】, the system will automatically create the
Startup
script set and automatically configure the corresponding startup script. -
After activation, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click on 【Execute】 to immediately execute once without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.
Verification¶
- Confirm in 「Manage / Automatic Trigger Configuration」 whether the corresponding task has the corresponding automatic trigger configuration, and you can also check the corresponding task records and logs to see if there are any exceptions
- In TrueWatch, check in 「Infrastructure / Custom」 if there is asset information
- In TrueWatch, check in 「Metrics」 if there is corresponding monitoring data
Metrics¶
After configuring Amazon CloudWatch, the default measurement sets are as follows, more metrics can be collected through configuration Amazon CloudWatch Metrics Details
Host-level Metrics¶
Metric Name | Description | Unit | Dimensions |
---|---|---|---|
CPUUtilization | The percentage of CPU utilization for the entire host | % | name |
FreeableMemory | The amount of idle memory available on the host. This is derived from the RAM, buffers, and cache reported as free by the operating system. | byte | name |
SwapUsage | The amount of swap usage 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 the number of packets on a 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 the number of packets on a single instance. | count | name |
Redis Metrics¶
Metric Name | Description | Unit | Dimensions |
---|---|---|---|
ActiveDefragHits |
The number of value reallocations performed per minute by the active defragmentation process. | count | name |
BytesUsedForCache |
The total number of bytes used for caching in memory. | 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 a ttl set in all databases. | count | name |
DatabaseCapacityUsagePercentage |
The percentage of the total data capacity of the cluster that is in use. | % | name |
DatabaseMemoryUsagePercentage |
The percentage of memory in the cluster that is in use. | % | 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 of the current shard/cluster. The metric can be 0 (not 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 by the Redis engine. | count | name |
Object¶
The collected Amazon AWS ElastiCache Redis object data structure can be seen 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": "{Security Group JSON Data}}",
"NumCacheNodes" : "1",
"message" : "{Instance JSON Data}"
}
}
Note: The fields in
tags
andfields
may change with subsequent updatesNote 1: The value of
tags.name
is the instance ID, used as a unique identifierNote 2:
fields.message
,fields.network_interfaces
,fields.blockdevicemappings
are JSON serialized strings