cdk-monitoring-constructs
Version:
[](https://badge.fury.io/js/cdk-monitoring-constructs) [](https://m
47 lines (46 loc) • 2.93 kB
TypeScript
import type { HorizontalAnnotation, IWidget } from "aws-cdk-lib/aws-cloudwatch";
import type { OpenSearchServerlessMetricFactoryProps } from "./OpenSearchServerlessMetricFactory";
import { BaseMonitoringProps, Monitoring, LatencyThreshold, ErrorCountThreshold, ErrorRateThreshold, AlarmFactory, LatencyAlarmFactory, ErrorAlarmFactory, MetricWithAlarmSupport, MonitoringScope } from "../../common";
export interface OpenSearchServerlessMonitoringOptions extends BaseMonitoringProps {
readonly addSearchLatencyP100Alarm?: Record<string, LatencyThreshold>;
readonly addSearchErrorCountAlarm?: Record<string, ErrorCountThreshold>;
readonly add4xxCountAlarm?: Record<string, ErrorCountThreshold>;
readonly add4xxRateAlarm?: Record<string, ErrorRateThreshold>;
readonly add5xxCountAlarm?: Record<string, ErrorCountThreshold>;
readonly add5xxRateAlarm?: Record<string, ErrorRateThreshold>;
}
export interface OpenSearchServerlessMonitoringProps extends OpenSearchServerlessMetricFactoryProps, OpenSearchServerlessMonitoringOptions {
}
/**
* @experimental This is subject to change if an L2 construct becomes available.
*/
export declare class OpenSearchServerlessMonitoring extends Monitoring {
readonly title: string;
readonly collectionUrl?: string;
readonly alarmFactory: AlarmFactory;
readonly latencyAlarmFactory: LatencyAlarmFactory;
readonly errorAlarmFactory: ErrorAlarmFactory;
readonly searchLatencyAnnotations: HorizontalAnnotation[];
readonly errorCountAnnotations: HorizontalAnnotation[];
readonly errorRateAnnotations: HorizontalAnnotation[];
readonly metricSearchRequestErrorsCount: MetricWithAlarmSupport;
readonly metricSearchRequestLatencyAvg: MetricWithAlarmSupport;
readonly metricSearchRequestLatencyMax: MetricWithAlarmSupport;
readonly metricIngestionRequestSuccessCount: MetricWithAlarmSupport;
readonly metricIngestionRequestErrorsCount: MetricWithAlarmSupport;
readonly metricIngestionRequestLatencyAvg: MetricWithAlarmSupport;
readonly metricIngestionRequestLatencyMax: MetricWithAlarmSupport;
readonly metric4xxErrorCount: MetricWithAlarmSupport;
readonly metric4xxErrorRate: MetricWithAlarmSupport;
readonly metric5xxErrorCount: MetricWithAlarmSupport;
readonly metric5xxErrorRate: MetricWithAlarmSupport;
constructor(scope: MonitoringScope, props: OpenSearchServerlessMonitoringProps);
summaryWidgets(): IWidget[];
widgets(): IWidget[];
protected createTitleWidget(): IWidget;
protected createSearchRequestLatencyWidget(width: number, height: number): IWidget;
protected createErrorCountWidget(width: number, height: number): IWidget;
protected createErrorRateWidget(width: number, height: number): IWidget;
protected createIngestionRequestsWidget(width: number, height: number): IWidget;
protected createIngestionLatencyWidget(width: number, height: number): IWidget;
}