AWS ElastiCache Serverless¶
Use the "Cloud Sync" series 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 - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation.
If you deploy Func yourself, refer to Self-deploying Func
Install Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant the global read-only permission
ReadOnlyAccess
)
Activate Script on Automata¶
- Log in to the TrueWatch console
- Click on the 【Integration】 menu and 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 Serverless
under theNot Installed
list, and click on the 【Install】 button to pop up the installation interface and install it.
Manually Activate Script¶
-
Log in to the Func console, click on 【Script Market】, enter the TrueWatch script market, and search for
integration_aws_elasticache_serverless
-
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 scripts. -
After activation, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click on 【Execute】 to execute it immediately without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.
We have collected some configurations by default, see the Metrics section for details
Verification¶
- In 「Management / Automatic Trigger Configuration」, confirm 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 if there is asset information in 「Infrastructure / Custom」
- In TrueWatch, check if there is corresponding monitoring data in 「Metrics」
Metrics¶
After configuring Amazon CloudWatch, the default Measurement is as follows. You can collect more metrics by configuring Amazon CloudWatch Metrics Details
Serverless Cache Metrics¶
Metric | Description | Unit |
---|---|---|
BytesUsedForCache | Total number of bytes used by data stored in the cache. | Bytes |
ElastiCacheProcessingUnits | Total number of lastiCacheProcessingUnits (ECPU ) consumed by requests executed on the cache |
Count |
SuccessfulReadRequestLatency | Latency of successful read requests. | Microseconds |
SuccessfulWriteRequestLatency | Latency of successful write requests | Microseconds |
TotalCmdsCount |
Total number of all commands executed in the cache | Count |
CacheHitRate |
Indicates the cache hit rate. This is calculated using cache_hits and cache_misses statistics as follows: cache_hits /(cache_hits + cache_misses). | Percentage |
CacheHits |
Number of successful read-only key lookups in the cache. | Count |
CurrConnections |
Number of client connections to the cache. | Count |
ThrottledCmds |
Number of requests throttled by ElastiCache because the workload scaled faster than ElastiCache could scale. | Count |
NewConnections | Total number of connections accepted by the server during this period. | Count |
CurrItems |
Number of items in the cache. | Count |
CurrVolatileItems |
Number of items in the cache with TTL. | Count |
NetworkBytesIn | Total number of bytes transmitted to the cache | Bytes |
NetworkBytesOut | Total number of bytes transmitted from the cache | Bytes |
IamAuthenticationExpirations | Total number of IAM-authenticated Redis connections that have expired. You can find more information about IAM Authentication in the user guide. | Count |
IamAuthenticationThrottling | Total number of IAM-authenticated Redis AUTH or HELLO requests that have been throttled. You can find more information about IAM Authentication in the user guide. | Count |
KeyAuthorizationFailures | Number of failed attempts by users to access keys they do not have permission to access. We recommend setting an alert for this to detect unauthorized access attempts. | Count |
AuthenticationFailures | Total number of failed attempts to authenticate to Redis using the AUTH command. We recommend setting an alert for this to detect unauthorized access attempts. | Count |
CommandAuthorizationFailures | Number of failed attempts by users to run commands they do not have permission to invoke. We recommend setting an alert for this to detect unauthorized access attempts. | Count |
Objects¶
The collected Amazon AWS ElastiCache Serverless object data structure can be seen in 「Infrastructure - Custom」
{
"category": "custom_object",
"fields": {
"CreateTime": "2024-04-10T02:45:41.921000Z",
"DailySnapshotTime": "00:00",
"Description": " ",
"Endpoint": "{\"Address\": \"test-es-serverless-xxxx.serverless.cnw1.cache.amazonaws.com.cn\", \"Port\": 6379}",
"ReaderEndpoint": "{\"Address\": \"test-es-serverless-xxxx.serverless.cnw1.cache.amazonaws.com.cn\", \"Port\": 6380}",
"SecurityGroupIds": "[\"sg-099fc30041cxxxx\"]",
"SubnetIds": "",
"message": {}
},
"measurement": "aws_elasticache",
"tags": {
"ARN": "arn:aws-cn:elasticache:cn-northwest-1:xxxxx:serverlesscache:test-es-serverless",
"Engine": "redis",
"FullEngineVersion": "7.1",
"MajorEngineVersion": "7",
"RegionId": "cn-northwest-1",
"ServerlessCacheName": "test-es-serverless",
"Status": "available",
"name": "test-es-serverless"
}
}
Note: The fields in
tags
andfields
may change with subsequent updatesTip 1: The value of
tags.name
is the instance ID, used as a unique identifierTip 2:
fields.message
,fields.network_interfaces
,fields.blockdevicemappings
are JSON serialized strings