# Source: paas-metrics
---

- type: replace
  path: /instance_groups/name=prometheus2/jobs/name=prometheus2/properties/prometheus/custom_rules?/-
  value:
    name: ElasticacheNodeCountCloseToLimit
    rules:
      - &alert
        alert: ElasticacheNodeCountCloseToLimit_Warning
        expr: paas_aws_elasticache_node_count > 80
        for: 1h
        labels:
          severity: warning
          notify: email
        annotations:
          summary: "Number of elasticache nodes is close to the limit"
          description: "We are using {{ $value | printf \"%.0f\" }} of 100 Elasticache nodes. We might have to contact AWS support to raise the limit."

      - <<: *alert
        alert: ElasticacheNodeCountCloseToLimit_Critical
        expr: paas_aws_elasticache_node_count > 90
        labels:
          severity: critical
          notify: email

Migrate "Number of elasticache nodes is close to the limit" monitor to Prometheus
Migrate "Number of elasticache nodes is close to the limit" monitor to Prometheus

Original DataDog monitor:
avg:aws.elasticache.node.count{deploy_env:prod}
