为AWS ElastiCache添加CPU和内存利用率告警

CPUUtilization

4个vCPU以上的实例就需要使用------EngineCPUUtilization指标,如果是4个vCPU以下的使用------CPUUtilization指标。

bash 复制代码
aws cloudwatch put-metric-alarm \
  --alarm-name elasticache-high-cpu \
  --alarm-description "ElastiCache CPU above 80%" \
  --metric-name CPUUtilization \
  --namespace AWS/ElastiCache \
  --statistic Average \
  --period 300 \
  --threshold 80 \
  --comparison-operator GreaterThanThreshold \
  --dimensions Name=CacheClusterId,Value=my-redis-001 \
  --evaluation-periods 3  \
  --alarm-actions arn:aws:sns:us-east-1:123456789012:cache-alerts

DatabaseMemoryUsagePercentage

bash 复制代码
# Alarm: High Memory Usage
aws cloudwatch put-metric-alarm \
  --alarm-name elasticache-high-memory \
  --alarm-description "ElastiCache memory above 80%" \
  --metric-name DatabaseMemoryUsagePercentage \
  --namespace AWS/ElastiCache \
  --statistic Maximum \
  --period 300 \
  --threshold 80 \
  --comparison-operator GreaterThanThreshold \
  --dimensions Name=CacheClusterId,Value=my-redis-001 \
  --evaluation-periods 2 \
  --alarm-actions arn:aws:sns:us-east-1:123456789012:cache-alerts

参考

相关推荐
Qianyunzhiyun14 小时前
AWS根用户MFA怎么设置?新账号安全教程
安全·云计算·aws
2601_9557594114 小时前
AWS 账单支付失败会怎样?NiceCloud 说明影响与补救
云计算·aws
全云在线allcloudonline16 小时前
北京阿里云代理商怎么选?本地服务与企业采购判断指南
阿里云·云计算·企业上云
Geek-Chow1 天前
Connecting kubectl to a Private EKS Cluster Over an Internal Domain
kubernetes·k8s·aws
Geek-Chow1 天前
A Practical Tour of AWS Networking: VPCs, Subnets, Gateways, and More
网络·aws
AOwhisky2 天前
Linux(CentOS)系统管理入门笔记(第九期)——文件权限进阶:SUIDSGIDSticky、ACL 与 chattr
linux·运维·笔记·centos·云计算·文件权限管理
Geek-Chow3 天前
Assuming an AWS IAM Role via Federation
云计算·aws
全云在线allcloudonline3 天前
上海阿里云代理商怎么选?跨区域交付能力核验清单
阿里云·云计算·企业上云