import * as ecs from 'aws-cdk-lib/aws-ecs'; import { Construct } from 'constructs'; import { IWatchful } from './watchful'; /** * Options for defining alarms. */ export interface WatchEcsServiceOptions { /** * Threshold for the cpu utilization alarm as percentage. * * @defaultValue 80 */ readonly cpuUtilizationThresholdPercent?: number; /** * Threshold for the memory utilization alarm as percentage. * * @defaultValue 95 */ readonly memoryUtilizationThresholdPercent?: number; /** * Minimum number of tasks that should be running. * * @defaultValue 1 */ readonly minimumNumberOfTasks?: number; } /** * Properties for defining a WatchEcsService */ export interface WatchEcsServiceProps extends WatchEcsServiceOptions { /** * The reference to IWatchful class. Used internally. */ readonly watchful: IWatchful; /** * The ECS service that should be watched. * [disable-awslint:ref-via-interface] */ readonly service: ecs.BaseService; } /** * A Construct which creates default alarms for ECS services. * A Construct which creates the following alarms for ECS services: * * - cpu utilization * - memory utilization * - error log alert */ export declare class WatchEcsService extends Construct { private readonly watchful; private readonly service; constructor(scope: Construct, id: string, props: WatchEcsServiceProps); private createLogErrorMonitor; private createCpuUtilizationMonitor; private createMemoryUtilizationMonitor; private createNumberOfTasksMonitor; }