metric: metric()

in cdk/lib/elastic-search-monitor.ts [161:175]


      metric: metric("MaxJvmHeapUsage"),
      threshold: 85,
    });

    const lowStorageDescription = `A data node is running on less than 80% disk space.
    For more context and troubleshooting instructions, see the runbook:
    https://docs.google.com/document/d/1PuEvL7L-CTV72Jx4OmiB3y5hlMmJR7Xz-YxYWAMiGdY/edit#heading=h.8h00c65wqmv0`;

    // See: https://aws.amazon.com/ec2/instance-types/i3en/ and https://www.google.com/search?q=5000gb+in+gib&oq=5000gb+in+gib
    const totalStorage = Size.gibibytes(4657);
    const twentyPercentDiskSpaceInBytes = Math.round(
     totalStorage.toBytes() * 0.2
    );

    new GuAlarm(this, "DataNodeLowStorageAlarm", {