Documentation
¶
Index ¶
- Variables
- type AlarmContributor
- type AlarmEvaluationWindow
- type AlarmHistoryItem
- type AlarmMuteRule
- type AlarmMuteRuleSchedule
- type AlarmWarmUp
- type AnomalyDetector
- type AnomalyDetectorConfiguration
- type AnomalyDetectorFilter
- type AnomalyTimeRange
- type AutoScalingPolicyExecutor
- type CompositeAlarm
- type DashboardEntry
- type DashboardValidationError
- type DashboardValidationMessage
- type Datapoint
- type Dataset
- type Dimension
- type EC2InstanceActioner
- type FirehosePutter
- type GetMetricDataPage
- type Handler
- func (h *Handler) BackendFor(region string) StorageBackend
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) EnableRegions()
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) RegionHandler(region string) *Handler
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) ServeRawMetrics(c *echo.Context) error
- func (h *Handler) SetEC2ActionerFactory(f func(region string) EC2InstanceActioner)
- func (h *Handler) SetLogEventSource(src LogEventSource)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- func (h *Handler) SubscribeAlarmStateChange(alarmArn string, cb func(newState string)) func()
- type InMemoryBackend
- func (b *InMemoryBackend) AssociateDatasetKmsKey(identifier, kmsKeyArn string) error
- func (b *InMemoryBackend) DeleteAlarmMuteRule(name string) error
- func (b *InMemoryBackend) DeleteAlarms(alarmNames []string) error
- func (b *InMemoryBackend) DeleteAnomalyDetector(namespace, metricName, stat string, dims []Dimension) error
- func (b *InMemoryBackend) DeleteAnomalyDetectorByID(id string) error
- func (b *InMemoryBackend) DeleteDashboards(names []string) error
- func (b *InMemoryBackend) DeleteInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
- func (b *InMemoryBackend) DeleteMetricMathAnomalyDetector(queries []MetricDataQuery) error
- func (b *InMemoryBackend) DeleteMetricStream(name string) error
- func (b *InMemoryBackend) DescribeAlarmContributors(alarmName, nextToken string) (page.Page[AlarmContributor], error)
- func (b *InMemoryBackend) DescribeAlarmHistory(alarmName string, alarmTypes []string, ...) (page.Page[AlarmHistoryItem], error)
- func (b *InMemoryBackend) DescribeAlarms(alarmNames []string, alarmTypes []string, ...) (page.Page[MetricAlarm], page.Page[CompositeAlarm], page.Page[LogAlarm], error)
- func (b *InMemoryBackend) DescribeAlarmsForMetric(namespace, metricName string, dimensions []Dimension, alarmNames []string, ...) (page.Page[MetricAlarm], error)
- func (b *InMemoryBackend) DescribeAnomalyDetectors(namespace, metricName, nextToken string, maxResults int) (page.Page[AnomalyDetector], error)
- func (b *InMemoryBackend) DescribeAnomalyDetectorsFiltered(f AnomalyDetectorFilter, nextToken string, maxResults int) (page.Page[AnomalyDetector], error)
- func (b *InMemoryBackend) DescribeInsightRules(nextToken string, maxResults int) (page.Page[InsightRule], error)
- func (b *InMemoryBackend) DisableAlarmActions(alarmNames []string) error
- func (b *InMemoryBackend) DisableInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
- func (b *InMemoryBackend) DisassociateDatasetKmsKey(identifier string) error
- func (b *InMemoryBackend) EnableAlarmActions(alarmNames []string) error
- func (b *InMemoryBackend) EnableInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
- func (b *InMemoryBackend) EvaluateAlarms(ctx context.Context, now time.Time)
- func (b *InMemoryBackend) GetAlarmARNs(names []string) []string
- func (b *InMemoryBackend) GetAlarmMuteRule(name string) (*AlarmMuteRule, error)
- func (b *InMemoryBackend) GetDashboard(name string) (DashboardEntry, string, error)
- func (b *InMemoryBackend) GetDashboardARNs(names []string) []string
- func (b *InMemoryBackend) GetDataset(identifier string) (Dataset, error)
- func (b *InMemoryBackend) GetInsightRule(name string) (*InsightRule, error)
- func (b *InMemoryBackend) GetInsightRuleReport(req InsightRuleReportRequest) (*InsightRuleReport, error)
- func (b *InMemoryBackend) GetMetricData(queries []MetricDataQuery, startTime, endTime time.Time) ([]MetricDataResult, error)
- func (b *InMemoryBackend) GetMetricDataPaged(queries []MetricDataQuery, startTime, endTime time.Time, ...) (GetMetricDataPage, error)
- func (b *InMemoryBackend) GetMetricDataWithOptions(queries []MetricDataQuery, startTime, endTime time.Time, scanBy string) ([]MetricDataResult, error)
- func (b *InMemoryBackend) GetMetricStatistics(namespace, metricName string, dimensions []Dimension, ...) ([]Datapoint, error)
- func (b *InMemoryBackend) GetMetricStatisticsForUnit(namespace, metricName string, dimensions []Dimension, ...) ([]Datapoint, error)
- func (b *InMemoryBackend) GetMetricStream(name string) (*MetricStream, error)
- func (b *InMemoryBackend) GetOTelEnrichment() (string, error)
- func (b *InMemoryBackend) ListAlarmMuteRules(nextToken string, maxResults int, alarmName string, statuses []string) (page.Page[AlarmMuteRule], error)
- func (b *InMemoryBackend) ListDashboards(prefix, nextToken string) (page.Page[DashboardEntry], error)
- func (b *InMemoryBackend) ListManagedInsightRules(resourceARN, nextToken string, maxResults int) (page.Page[InsightRule], error)
- func (b *InMemoryBackend) ListMetricStreams(nextToken string, maxResults int) (page.Page[MetricStream], error)
- func (b *InMemoryBackend) ListMetrics(namespace, metricName string, dimensions []Dimension, ...) (page.Page[Metric], error)
- func (b *InMemoryBackend) PutAlarmMuteRule(rule *AlarmMuteRule) error
- func (b *InMemoryBackend) PutAlarmMuteRuleInternal(rule *AlarmMuteRule)
- func (b *InMemoryBackend) PutAnomalyDetector(detector *AnomalyDetector) error
- func (b *InMemoryBackend) PutAnomalyDetectorInternal(detector *AnomalyDetector)
- func (b *InMemoryBackend) PutCompositeAlarm(alarm *CompositeAlarm) error
- func (b *InMemoryBackend) PutDashboard(name, body string) ([]DashboardValidationMessage, error)
- func (b *InMemoryBackend) PutInsightRule(rule *InsightRule) error
- func (b *InMemoryBackend) PutInsightRuleInternal(rule *InsightRule)
- func (b *InMemoryBackend) PutLogAlarm(alarm *LogAlarm) error
- func (b *InMemoryBackend) PutMetricAlarm(alarm *MetricAlarm) error
- func (b *InMemoryBackend) PutMetricData(namespace string, data []MetricDatum) error
- func (b *InMemoryBackend) PutMetricStream(stream *MetricStream) error
- func (b *InMemoryBackend) PutMetricStreamInternal(stream *MetricStream)
- func (b *InMemoryBackend) RawMetrics() []RawMetric
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetAlarmState(ctx context.Context, ...) error
- func (b *InMemoryBackend) SetAutoScalingExecutor(e AutoScalingPolicyExecutor)
- func (b *InMemoryBackend) SetEC2Actioner(a EC2InstanceActioner)
- func (b *InMemoryBackend) SetFirehosePutter(fh FirehosePutter)
- func (b *InMemoryBackend) SetLambdaInvoker(inv LambdaInvoker)
- func (b *InMemoryBackend) SetLogEventSource(src LogEventSource)
- func (b *InMemoryBackend) SetSNSPublisher(pub SNSPublisher)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartMetricStreams(names []string) error
- func (b *InMemoryBackend) StartOTelEnrichment() error
- func (b *InMemoryBackend) StopMetricStreams(names []string) error
- func (b *InMemoryBackend) StopOTelEnrichment() error
- func (b *InMemoryBackend) SubscribeAlarmStateChange(alarmArn string, cb func(newState string)) func()
- func (b *InMemoryBackend) SweepExpiredMetrics()
- type InsightLogEvent
- type InsightRule
- type InsightRuleContributor
- type InsightRuleContributorDatapoint
- type InsightRuleFailure
- type InsightRuleMetricDatapoint
- type InsightRuleReport
- type InsightRuleReportRequest
- type Janitor
- type LambdaInvoker
- type LogAlarm
- type LogEventSource
- type Metric
- type MetricAlarm
- type MetricCharacteristics
- type MetricDataMessage
- type MetricDataQuery
- type MetricDataResult
- type MetricDatum
- type MetricStat
- type MetricStream
- type MetricStreamFilter
- type MetricStreamStatisticsConfiguration
- type MetricStreamStatisticsMetric
- type OTelEnrichmentState
- type Provider
- type RawMetric
- type SNSPublisher
- type ScheduleConfiguration
- type ScheduledQueryConfiguration
- type StorageBackend
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidMuteDuration = errors.New("invalid mute rule duration") ErrInvalidMuteExpression = errors.New("invalid mute rule schedule expression") ErrInvalidMuteTimezone = errors.New("invalid mute rule timezone") )
var ErrAlarmFamilyFilterExclusive = fmt.Errorf( "%w: ChildrenOfAlarmName and ParentsOfAlarmName cannot be combined with "+ "each other or with any other parameter except MaxRecords and NextToken", ErrValidation, )
ErrAlarmFamilyFilterExclusive is returned when DescribeAlarms combines ChildrenOfAlarmName or ParentsOfAlarmName with any parameter other than MaxRecords/NextToken. Per DescribeAlarmsInput's doc comment (both fields, aws-sdk-go-v2/service/cloudwatch@v1.66.3/api_op_DescribeAlarms.go): you cannot specify any other parameters in the request except for MaxRecords and NextToken -- if you do so, you receive a validation error.
var ErrAlarmMuteRuleNotFound = errors.New(errResourceNotFoundException)
ErrAlarmMuteRuleNotFound is returned when a requested alarm mute rule does not exist.
var ErrAlarmNameRequired = errors.New("AlarmName is required")
ErrAlarmNameRequired is returned when an alarm name is missing.
var ErrAlarmNotFound = errors.New(errResourceNotFoundException)
ErrAlarmNotFound is returned when a requested alarm does not exist.
var ErrAlarmRuleRequired = errors.New("AlarmRule is required")
ErrAlarmRuleRequired is returned when a composite alarm rule is missing.
var ErrAnomalyDetectorNotFound = errors.New(errResourceNotFoundException)
ErrAnomalyDetectorNotFound is returned when a requested anomaly detector does not exist.
var ErrDashboardNameRequired = errors.New("DashboardName is required")
ErrDashboardNameRequired is returned when a dashboard name is missing.
var ErrDashboardNotFound = errors.New(errResourceNotFoundException)
ErrDashboardNotFound is returned when a requested dashboard does not exist.
var ErrDatasetNotFound = errors.New(errResourceNotFoundException)
ErrDatasetNotFound is returned when a DatasetIdentifier does not refer to the (only) supported "default" dataset, and when DisassociateDatasetKmsKey is called on a dataset with no KMS key currently associated (matches the real DisassociateDatasetKmsKey doc comment: "If the dataset has no associated KMS key, the operation fails with ResourceNotFoundException").
var ErrInsightRuleLimit = errors.New("LimitExceeded")
ErrInsightRuleLimit is returned when a rule exceeds a documented Contributor Insights limit.
var ErrInsightRuleNotFound = errors.New(errResourceNotFoundException)
ErrInsightRuleNotFound is returned when a requested insight rule does not exist.
var ErrInvalidKmsKeyArn = fmt.Errorf( "%w: KmsKeyArn must be a fully qualified KMS key ARN "+ "(key IDs, aliases, and alias ARNs are not accepted)", ErrValidation, )
ErrInvalidKmsKeyArn is returned when a KmsKeyArn is not a fully qualified KMS key ARN. AssociateDatasetKmsKey documents that key IDs, aliases, and alias ARNs are not accepted -- only a "key/<id>" ARN qualifies.
var ErrInvalidMetricValue = errors.New(
"InvalidParameterValue: metric values must be finite and within -2^360 to 2^360",
)
ErrInvalidMetricValue is returned when a metric value (Value, Sum, Min, Max, or an entry of the Values array) is NaN, +/-Infinity, or outside the documented -2^360..2^360 range that CloudWatch accepts.
var ErrInvalidNextToken = errors.New("InvalidParameterValue: NextToken is invalid or expired")
ErrInvalidNextToken is returned when a pagination NextToken is invalid or expired.
var ErrMetricSeriesLimitExceeded = errors.New("LimitExceeded: metric series limit reached")
ErrMetricSeriesLimitExceeded is returned when storing a batch of MetricDatum entries would push the namespace or account past its distinct-time-series cap.
var ErrMetricStreamNotFound = errors.New(errResourceNotFoundException)
ErrMetricStreamNotFound is returned when a requested metric stream does not exist.
var ErrMetricTimestampOutOfRange = errors.New(
"InvalidParameterValue: Timestamp must not be more than two weeks before or " +
"two hours after the current time",
)
ErrMetricTimestampOutOfRange is returned when a MetricDatum's Timestamp falls outside CloudWatch's documented PutMetricData acceptance window: no more than cwMetricTimestampPastWindow in the past, and no more than cwMetricTimestampFutureWindow in the future, relative to now.
var ErrMissingParameter = errors.New("MissingParameter")
ErrMissingParameter is returned when a required request parameter is absent.
var ErrTooManyValues = errors.New(
"InvalidParameterValue: the maximum values array size is 150",
)
ErrTooManyValues is returned when a MetricDatum's Values array exceeds the 150-unique-value limit documented for PutMetricData.
var ErrValidation = errors.New("InvalidParameterValue")
ErrValidation is returned when a caller provides an invalid or missing parameter.
var ErrValueAndStatisticSet = errors.New(
"InvalidParameterCombination: Value, StatisticValues, and Values/Counts are mutually exclusive",
)
ErrValueAndStatisticSet is returned when more than one of Value, StatisticSet, and the Values/Counts array are set on a MetricDatum. AWS treats all three input shapes as mutually exclusive.
var ErrValuesCountsLengthMismatch = errors.New(
"InvalidParameterValue: Values and Counts arrays must be the same length",
)
ErrValuesCountsLengthMismatch is returned when a MetricDatum's Counts array is present but does not have the same number of elements as its Values array.
Functions ¶
This section is empty.
Types ¶
type AlarmContributor ¶
type AlarmContributor struct {
StateTransitionedTimestamp time.Time `json:"StateTransitionedTimestamp,omitzero"`
ContributorAttributes map[string]string `json:"ContributorAttributes,omitempty"`
ContributorID string `json:"ContributorId"`
StateReason string `json:"StateReason,omitempty"`
}
AlarmContributor represents a single contributor to a composite alarm's current state, returned by DescribeAlarmContributors. Verified against cloudwatch@v1.66.3 types/types.go:15 (types.AlarmContributor): real fields are ContributorId, ContributorAttributes, StateReason, StateTransitionedTimestamp -- NOT Keys/Sum, which is InsightRuleContributor's unrelated shape above.
type AlarmEvaluationWindow ¶
type AlarmEvaluationWindow struct {
Timezone string `json:"Timezone,omitempty"`
WallClock bool `json:"WallClock,omitempty"`
}
AlarmEvaluationWindow is MetricAlarm.EvaluationWindow: nil or WallClock=false is a sliding window.
type AlarmHistoryItem ¶
type AlarmHistoryItem struct {
Timestamp time.Time `json:"Timestamp"`
AlarmName string `json:"AlarmName"`
AlarmType string `json:"AlarmType,omitempty"`
HistoryItemType string `json:"HistoryItemType"`
HistorySummary string `json:"HistorySummary"`
HistoryData string `json:"HistoryData,omitempty"`
// contains filtered or unexported fields
}
AlarmHistoryItem represents a single history entry for an alarm.
type AlarmMuteRule ¶
type AlarmMuteRule struct {
CreationTime time.Time `json:"CreationTime"`
LastUpdatedTimestamp time.Time `json:"LastUpdatedTimestamp"`
ExpireDate time.Time `json:"ExpireDate,omitzero"`
StartDate time.Time `json:"StartDate,omitzero"`
Name string `json:"Name"`
Arn string `json:"Arn"`
Description string `json:"Description,omitempty"`
Schedule AlarmMuteRuleSchedule `json:"Schedule"`
AlarmNames []string `json:"AlarmNames"`
}
AlarmMuteRule represents a CloudWatch alarm mute rule: types.Rule (a Schedule) plus types.MuteTargets, flattened (aws-sdk-go-v2 cloudwatch@v1.66.3 api_op_PutAlarmMuteRule.go:63).
func (*AlarmMuteRule) MuteType ¶ added in v1.3.1
func (r *AlarmMuteRule) MuteType() string
MuteType classifies the schedule: "at(...)" expressions are one-time windows, "cron(...)" expressions recur (types.Schedule doc, aws-sdk-go-v2 cloudwatch@v1.66.3 types/types.go:3461).
type AlarmMuteRuleSchedule ¶ added in v1.3.1
type AlarmMuteRuleSchedule struct {
Expression string `json:"Expression"`
Duration string `json:"Duration"`
Timezone string `json:"Timezone,omitempty"`
}
AlarmMuteRuleSchedule is cloudwatch types.Schedule: the cron/at expression union plus duration (aws-sdk-go-v2 cloudwatch@v1.66.3 types/types.go:3408).
type AlarmWarmUp ¶
type AlarmWarmUp struct {
PeriodMinutes int32 `json:"WarmUpPeriodDurationInMinutes"`
OnlyAfterEnd bool `json:"OnlyStartEvaluatingAfterWarmUpPeriodEnds,omitempty"`
}
AlarmWarmUp is types.WarmUpConfiguration: the alarm stays put until the period elapses after a create/update.
type AnomalyDetector ¶
type AnomalyDetector struct {
Configuration *AnomalyDetectorConfiguration `json:"Configuration,omitempty"`
MetricCharacteristics *MetricCharacteristics `json:"MetricCharacteristics,omitempty"`
ID string `json:"Id"`
Namespace string `json:"Namespace"`
MetricName string `json:"MetricName"`
Stat string `json:"Stat"`
StateValue string `json:"StateValue"`
Dimensions []Dimension `json:"Dimensions,omitempty"`
MetricMath []MetricDataQuery `json:"MetricMath,omitempty"`
BandWidth float64 `json:"BandWidth,omitempty"`
}
AnomalyDetector represents a CloudWatch anomaly detector.
type AnomalyDetectorConfiguration ¶
type AnomalyDetectorConfiguration struct {
MetricTimezone string `json:"MetricTimezone,omitempty"`
ExcludedTimeRanges []AnomalyTimeRange `json:"ExcludedTimeRanges,omitempty"`
}
AnomalyDetectorConfiguration holds the model-training settings of an anomaly detector.
type AnomalyDetectorFilter ¶
type AnomalyDetectorFilter struct {
Namespace string
MetricName string
IDs []string
Types []string
Dimensions []Dimension
}
AnomalyDetectorFilter holds the DescribeAnomalyDetectors request filters.
type AnomalyTimeRange ¶
type AnomalyTimeRange struct {
StartTime time.Time `json:"StartTime"`
EndTime time.Time `json:"EndTime"`
}
AnomalyTimeRange is a period excluded from anomaly model training.
type AutoScalingPolicyExecutor ¶
type AutoScalingPolicyExecutor interface {
ExecuteScalingPolicy(autoScalingGroupName, policyName string) error
}
AutoScalingPolicyExecutor executes an Auto Scaling scaling-policy alarm action (arn:aws:autoscaling:...:scalingPolicy:...).
type CompositeAlarm ¶
type CompositeAlarm struct {
CreatedAt time.Time `json:"AlarmCreatedAt"`
StateTransitionedTimestamp time.Time `json:"StateTransitionedTimestamp"`
// StateUpdatedTimestamp tracks the timestamp of any state update, even if
// StateValue doesn't change (cloudwatch@v1.66.3 types/types.go:578).
StateUpdatedTimestamp time.Time `json:"StateUpdatedTimestamp"`
StateValue string `json:"StateValue"`
AlarmName string `json:"AlarmName"`
AlarmRule string `json:"AlarmRule"`
AlarmDescription string `json:"AlarmDescription,omitempty"`
AlarmArn string `json:"AlarmArn"`
StateReason string `json:"StateReason,omitempty"`
AlarmActions []string `json:"AlarmActions,omitempty"`
OKActions []string `json:"OKActions,omitempty"`
InsufficientDataActions []string `json:"InsufficientDataActions,omitempty"`
ActionsEnabled bool `json:"ActionsEnabled"`
}
CompositeAlarm represents a CloudWatch composite alarm that combines child alarms.
type DashboardEntry ¶
type DashboardEntry struct {
LastModified time.Time `json:"LastModified"`
DashboardArn string `json:"DashboardArn"`
DashboardName string `json:"DashboardName"`
Size int64 `json:"Size"`
}
DashboardEntry represents a single CloudWatch dashboard summary entry returned by ListDashboards.
type DashboardValidationError ¶ added in v1.2.0
type DashboardValidationError struct {
Messages []DashboardValidationMessage
}
DashboardValidationError indicates a PutDashboard call's DashboardBody failed JSON/widget-schema validation. It carries the full list of validation messages, matching the shape of AWS's DashboardInvalidInputError exception (which embeds DashboardValidationMessages alongside Code/Message). Unlike PutMetricData, PutDashboard's failure mode is a modeled exception with a structured payload, not a plain error string.
func (*DashboardValidationError) Error ¶ added in v1.2.0
func (e *DashboardValidationError) Error() string
Error implements the error interface.
type DashboardValidationMessage ¶ added in v1.2.0
type DashboardValidationMessage struct {
DataPath string `json:"DataPath,omitempty"`
Message string `json:"Message"`
IsError bool `json:"-"`
}
DashboardValidationMessage mirrors aws-sdk-go-v2's types.DashboardValidationMessage (DataPath + Message only on the wire). IsError is emulator-internal bookkeeping (never serialized): when any message in a PutDashboard validation pass has IsError set, the whole call fails and the dashboard body is not persisted (matches AWS's documented "if this result includes error messages, the input was not valid and the operation failed" / "if this result includes only warning messages, the dashboard was still created or modified" distinction, which the response shape itself does not carry directly — it's inferred from whether the API call succeeded at all).
type Datapoint ¶
type Datapoint struct {
Average *float64 `json:"Average,omitempty"`
Sum *float64 `json:"Sum,omitempty"`
Minimum *float64 `json:"Minimum,omitempty"`
Maximum *float64 `json:"Maximum,omitempty"`
SampleCount *float64 `json:"SampleCount,omitempty"`
ExtendedStatistics map[string]float64 `json:"ExtendedStatistics,omitempty"`
// BandLower and BandUpper are the anomaly detection band boundaries for this point.
// Only populated when a matching AnomalyDetector exists for the metric.
BandLower *float64 `json:"BandLower,omitempty"`
BandUpper *float64 `json:"BandUpper,omitempty"`
Timestamp time.Time `json:"Timestamp"`
Unit string `json:"Unit,omitempty"`
}
Datapoint holds aggregated stats for GetMetricStatistics.
type Dataset ¶ added in v1.2.0
type Dataset struct {
DatasetID string `json:"DatasetId"`
// Arn is derived (arn.Build) rather than persisted meaningfully -- it is
// recomputed and overwritten on every GetDataset/AssociateDatasetKmsKey
// return value, never read back out of storage.
Arn string `json:"Arn,omitempty"`
KmsKeyArn string `json:"KmsKeyArn,omitempty"`
}
Dataset represents CloudWatch's implicit "default" dataset and its optional customer-managed KMS key association. Real CloudWatch only supports the default dataset -- there is no create/delete/list API for datasets, only Get/AssociateDatasetKmsKey/DisassociateDatasetKmsKey against the one implicit dataset that exists for every account in every Region.
type EC2InstanceActioner ¶
type EC2InstanceActioner interface {
StopInstances(instanceIDs []string) error
TerminateInstances(instanceIDs []string) error
RebootInstances(instanceIDs []string) error
}
EC2InstanceActioner executes EC2 alarm actions (arn:aws:automate:<region>:ec2:*) against the instances named by the alarm's InstanceId dimension.
type FirehosePutter ¶ added in v1.3.1
type FirehosePutter interface {
PutRecordBatch(ctx context.Context, streamName string, records [][]byte) (int, error)
}
FirehosePutter is the subset of Firehose operations a metric stream needs to deliver matched metric data to its configured delivery stream.
type GetMetricDataPage ¶
type GetMetricDataPage struct {
NextToken string
Results []MetricDataResult
Messages []MetricDataMessage
}
GetMetricDataPage is the paginated result of a GetMetricData request. NextToken is non-empty when the response was truncated to honour MaxDatapoints. Messages carries top-level diagnostics (e.g. a truncation notice).
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler is the Echo HTTP service handler for CloudWatch operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new CloudWatch handler.
func (*Handler) BackendFor ¶
func (h *Handler) BackendFor(region string) StorageBackend
BackendFor returns the backend serving region: the home backend, or the sibling for any other region (built on first use).
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this CloudWatch instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) EnableRegions ¶
func (h *Handler) EnableRegions()
EnableRegions makes h serve every other region through lazily built per-region siblings, each with its own janitor once StartWorker has run.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the operation name from the Action form field or CBOR path.
func (*Handler) ExtractResource ¶
ExtractResource extracts the resource name (Namespace) from the form.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns all mocked CloudWatch operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for CloudWatch requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for the CloudWatch handler.
func (*Handler) RegionHandler ¶
RegionHandler returns the handler serving region: h itself for the home region, else its sibling.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.
func (*Handler) Restore ¶
Restore implements persistence.Persistable by delegating to the backend and restoring the handler-level resource tags.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a matcher for CloudWatch query-protocol requests.
func (*Handler) ServeRawMetrics ¶
ServeRawMetrics serves GET /_aws/cloudwatch/metrics/raw.
func (*Handler) SetEC2ActionerFactory ¶
func (h *Handler) SetEC2ActionerFactory(f func(region string) EC2InstanceActioner)
SetEC2ActionerFactory sets how each region's alarm EC2 actions reach that region's EC2.
func (*Handler) SetLogEventSource ¶
func (h *Handler) SetLogEventSource(src LogEventSource)
SetLogEventSource wires src into the home backend and every regional sibling.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend and also persisting the handler-level resource tags.
func (*Handler) StartWorker ¶
StartWorker starts the background janitor for metric sweeping. It implements service.BackgroundWorker.
func (*Handler) SubscribeAlarmStateChange ¶
SubscribeAlarmStateChange subscribes to the alarm named by alarmArn in that ARN's region.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend implements StorageBackend using in-memory maps. metrics is a two-level map: namespace -> composite-key -> *metricRecord. The composite key is produced by metricStorageKey(metricName, dims) so that different dimension sets for the same metric name are stored separately. metrics and alarmHistory are deliberately left as plain maps rather than store.Table -- see the comment block at the top of store_setup.go for why. Every other resource field is registered on registry -- see registerAllTables in store_setup.go.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend with default configuration.
func NewInMemoryBackendWithConfig ¶
func NewInMemoryBackendWithConfig(accountID, region string) *InMemoryBackend
NewInMemoryBackendWithConfig creates a new InMemoryBackend with given account and region.
func (*InMemoryBackend) AssociateDatasetKmsKey ¶ added in v1.2.0
func (b *InMemoryBackend) AssociateDatasetKmsKey(identifier, kmsKeyArn string) error
AssociateDatasetKmsKey associates (or replaces) the customer managed KMS key used to encrypt data published to the default dataset.
func (*InMemoryBackend) DeleteAlarmMuteRule ¶
func (b *InMemoryBackend) DeleteAlarmMuteRule(name string) error
DeleteAlarmMuteRule removes an alarm mute rule by name. Idempotent: deleting a rule that does not exist succeeds without error (aws-sdk-go-v2 cloudwatch@v1.66.3 api_op_DeleteAlarmMuteRule.go:19).
func (*InMemoryBackend) DeleteAlarms ¶
func (b *InMemoryBackend) DeleteAlarms(alarmNames []string) error
DeleteAlarms removes alarms by name (metric and composite).
func (*InMemoryBackend) DeleteAnomalyDetector ¶
func (b *InMemoryBackend) DeleteAnomalyDetector(namespace, metricName, stat string, dims []Dimension) error
DeleteAnomalyDetector removes an anomaly detector. Returns ErrAnomalyDetectorNotFound if the detector does not exist.
func (*InMemoryBackend) DeleteAnomalyDetectorByID ¶
func (b *InMemoryBackend) DeleteAnomalyDetectorByID(id string) error
DeleteAnomalyDetectorByID removes the detector with the given AnomalyDetectorId.
func (*InMemoryBackend) DeleteDashboards ¶
func (b *InMemoryBackend) DeleteDashboards(names []string) error
DeleteDashboards removes the named dashboards. Names that do not exist are silently ignored.
func (*InMemoryBackend) DeleteInsightRules ¶
func (b *InMemoryBackend) DeleteInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
DeleteInsightRules removes insight rules by name. Non-existent rules are reported as failures.
func (*InMemoryBackend) DeleteMetricMathAnomalyDetector ¶
func (b *InMemoryBackend) DeleteMetricMathAnomalyDetector(queries []MetricDataQuery) error
DeleteMetricMathAnomalyDetector removes the metric-math detector defined by queries.
func (*InMemoryBackend) DeleteMetricStream ¶
func (b *InMemoryBackend) DeleteMetricStream(name string) error
DeleteMetricStream removes a metric stream by name. Returns ErrMetricStreamNotFound if the stream does not exist.
func (*InMemoryBackend) DescribeAlarmContributors ¶
func (b *InMemoryBackend) DescribeAlarmContributors( alarmName, nextToken string, ) (page.Page[AlarmContributor], error)
DescribeAlarmContributors returns a page of contributors for the specified alarm.
For a composite alarm, the contributors are the referenced child alarms whose state currently satisfies their state-function condition (e.g. a child named in ALARM(...) that is itself in ALARM) — i.e. the alarms actually driving the composite alarm's state. Each contributor's ContributorId is the child alarm name, and StateReason/StateTransitionedTimestamp are copied from that child alarm's own real state, never fabricated. For a metric alarm, AWS returns no contributors, so the result is an empty (but successful) page.
func (*InMemoryBackend) DescribeAlarmHistory ¶
func (b *InMemoryBackend) DescribeAlarmHistory( alarmName string, alarmTypes []string, historyItemType, nextToken, scanBy string, startDate, endDate time.Time, maxRecords int, ) (page.Page[AlarmHistoryItem], error)
DescribeAlarmHistory returns history items for one or all alarms, filtered by type and date range. alarmTypes can contain "MetricAlarm", "CompositeAlarm", and/or "LogAlarm". Per the real DescribeAlarmHistoryInput.AlarmTypes doc comment ("If you omit this parameter, only metric alarms are returned"), omitting alarmTypes returns ONLY metric alarm history -- composite and log alarm history are included only when explicitly requested, mirroring DescribeAlarms' AlarmTypes default (bd gopherstack-yvb7).
scanBy honors DescribeAlarmHistoryInput.ScanBy ("Specify TimestampDescending to have the newest event history returned first, and specify TimestampAscending to have the oldest history returned first" -- api_op_DescribeAlarmHistory.go). An empty/unrecognized scanBy keeps the existing oldest-first ordering.
func (*InMemoryBackend) DescribeAlarms ¶
func (b *InMemoryBackend) DescribeAlarms( alarmNames []string, alarmTypes []string, alarmNamePrefix, stateValue, nextToken string, maxRecords int, actionPrefix, childrenOfAlarmName, parentsOfAlarmName string, ) (page.Page[MetricAlarm], page.Page[CompositeAlarm], page.Page[LogAlarm], error)
DescribeAlarms lists a page of alarms, optionally filtered by name, type, prefix, state, action prefix, or alarm-family relationship (children/parents of a composite alarm's rule). alarmTypes can contain "MetricAlarm", "CompositeAlarm", and/or "LogAlarm". Per the real DescribeAlarmsInput.AlarmTypes doc comment ("If you omit this parameter, only metric alarms are returned, even if composite alarms or log alarms exist in the account" -- confirmed against aws-sdk-go-v2/service/cloudwatch@v1.66.3/api_op_DescribeAlarms.go), omitting alarmTypes returns ONLY metric alarms: composite and log alarms are both included only when explicitly requested via alarmTypes (bd gopherstack-yvb7 -- composite alarms were previously defaulted-in alongside metric alarms, which the LogAlarm family correctly never did). MaxRecords applies to the total combined result set (metric + composite + log).
func (*InMemoryBackend) DescribeAlarmsForMetric ¶
func (b *InMemoryBackend) DescribeAlarmsForMetric( namespace, metricName string, dimensions []Dimension, alarmNames []string, nextToken string, maxRecords int, ) (page.Page[MetricAlarm], error)
DescribeAlarmsForMetric returns metric alarms associated with a specific metric.
func (*InMemoryBackend) DescribeAnomalyDetectors ¶
func (b *InMemoryBackend) DescribeAnomalyDetectors( namespace, metricName, nextToken string, maxResults int, ) (page.Page[AnomalyDetector], error)
DescribeAnomalyDetectors returns a filtered, paginated list of anomaly detectors.
func (*InMemoryBackend) DescribeAnomalyDetectorsFiltered ¶
func (b *InMemoryBackend) DescribeAnomalyDetectorsFiltered( f AnomalyDetectorFilter, nextToken string, maxResults int, ) (page.Page[AnomalyDetector], error)
DescribeAnomalyDetectorsFiltered applies Ids, Types, Dimensions, Namespace and MetricName filters.
func (*InMemoryBackend) DescribeInsightRules ¶
func (b *InMemoryBackend) DescribeInsightRules( nextToken string, maxResults int, ) (page.Page[InsightRule], error)
DescribeInsightRules returns a paginated list of insight rules.
func (*InMemoryBackend) DisableAlarmActions ¶
func (b *InMemoryBackend) DisableAlarmActions(alarmNames []string) error
DisableAlarmActions disables action execution for the given alarms.
func (*InMemoryBackend) DisableInsightRules ¶
func (b *InMemoryBackend) DisableInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
DisableInsightRules disables the specified insight rules. Non-existent rules are reported as failures.
func (*InMemoryBackend) DisassociateDatasetKmsKey ¶ added in v1.2.0
func (b *InMemoryBackend) DisassociateDatasetKmsKey(identifier string) error
DisassociateDatasetKmsKey removes the customer managed KMS key association from the default dataset. Fails with ErrDatasetNotFound if the dataset currently has no associated KMS key (matches the real doc comment).
func (*InMemoryBackend) EnableAlarmActions ¶
func (b *InMemoryBackend) EnableAlarmActions(alarmNames []string) error
EnableAlarmActions enables action execution for the given alarms.
func (*InMemoryBackend) EnableInsightRules ¶
func (b *InMemoryBackend) EnableInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
EnableInsightRules enables the specified insight rules. Non-existent rules are reported as failures.
func (*InMemoryBackend) EvaluateAlarms ¶
func (b *InMemoryBackend) EvaluateAlarms(ctx context.Context, now time.Time)
EvaluateAlarms evaluates all metric alarms against recent metric data and transitions state (OK ↔ ALARM ↔ INSUFFICIENT_DATA) as appropriate. SNS and Lambda alarm actions are fired on state change. Intended to be called periodically by the Janitor.
func (*InMemoryBackend) GetAlarmARNs ¶
func (b *InMemoryBackend) GetAlarmARNs(names []string) []string
GetAlarmARNs returns the ARNs for the given alarm names (metric + composite + log). Used by the HTTP handler to clean up tag entries on delete.
func (*InMemoryBackend) GetAlarmMuteRule ¶
func (b *InMemoryBackend) GetAlarmMuteRule(name string) (*AlarmMuteRule, error)
GetAlarmMuteRule returns an alarm mute rule by name. Returns ErrAlarmMuteRuleNotFound if the rule does not exist.
func (*InMemoryBackend) GetDashboard ¶
func (b *InMemoryBackend) GetDashboard(name string) (DashboardEntry, string, error)
GetDashboard returns the dashboard entry and body for the given name.
func (*InMemoryBackend) GetDashboardARNs ¶
func (b *InMemoryBackend) GetDashboardARNs(names []string) []string
GetDashboardARNs returns the ARNs for the given dashboard names. Used by the HTTP handler to clean up tag entries on delete.
func (*InMemoryBackend) GetDataset ¶ added in v1.2.0
func (b *InMemoryBackend) GetDataset(identifier string) (Dataset, error)
GetDataset returns information about the (only) default dataset, including its ARN and any associated customer managed KMS key. The default dataset is implicit -- it exists, with no KMS key, even if AssociateDatasetKmsKey has never been called.
func (*InMemoryBackend) GetInsightRule ¶
func (b *InMemoryBackend) GetInsightRule(name string) (*InsightRule, error)
GetInsightRule returns an insight rule by name.
func (*InMemoryBackend) GetInsightRuleReport ¶
func (b *InMemoryBackend) GetInsightRuleReport(req InsightRuleReportRequest) (*InsightRuleReport, error)
GetInsightRuleReport evaluates the rule over the region's CloudWatch Logs events.
func (*InMemoryBackend) GetMetricData ¶
func (b *InMemoryBackend) GetMetricData( queries []MetricDataQuery, startTime, endTime time.Time, ) ([]MetricDataResult, error)
GetMetricData executes multiple metric queries and returns results. Queries with a MetricStat are resolved first; expression queries are evaluated after all metric-stat results are available so expressions can reference them. scanBy controls sort order: "TimestampDescending" reverses each result; default ascending.
func (*InMemoryBackend) GetMetricDataPaged ¶
func (b *InMemoryBackend) GetMetricDataPaged( queries []MetricDataQuery, startTime, endTime time.Time, scanBy, nextToken string, maxDatapoints int, ) (GetMetricDataPage, error)
GetMetricDataPaged resolves the queries and applies MaxDatapoints pagination. maxDatapoints <= 0 uses the AWS default. The returned page carries a NextToken when the response was truncated, plus a top-level informational message so callers know more data is available.
func (*InMemoryBackend) GetMetricDataWithOptions ¶
func (b *InMemoryBackend) GetMetricDataWithOptions( queries []MetricDataQuery, startTime, endTime time.Time, scanBy string, ) ([]MetricDataResult, error)
GetMetricDataWithOptions is GetMetricData extended with scan order control. scanBy may be "TimestampDescending" or "" / "TimestampAscending" (default).
func (*InMemoryBackend) GetMetricStatistics ¶
func (b *InMemoryBackend) GetMetricStatistics( namespace, metricName string, dimensions []Dimension, startTime, endTime time.Time, period int32, statistics []string, extendedStatistics []string, ) ([]Datapoint, error)
GetMetricStatistics aggregates data for a metric over a time range into period-sized buckets. extendedStatistics supports percentile expressions such as "p99", "p95", "p50". dimensions filters to the specific metric series; an empty slice matches the dimensionless series.
func (*InMemoryBackend) GetMetricStatisticsForUnit ¶
func (b *InMemoryBackend) GetMetricStatisticsForUnit( namespace, metricName string, dimensions []Dimension, startTime, endTime time.Time, period int32, statistics []string, extendedStatistics []string, unit string, ) ([]Datapoint, error)
GetMetricStatisticsForUnit is GetMetricStatistics restricted to datapoints published with the given unit; an empty unit matches all datapoints regardless of unit. Used by the alarm evaluator (a MetricAlarm with a Unit set only evaluates datapoints published with that exact StandardUnit, per the PutMetricAlarm API doc's "Unit" parameter) and by GetMetricStatistics's own handlers, which read the real GetMetricStatisticsInput.Unit member (api_op_GetMetricStatistics.go: "If you specify a unit, the operation returns only data that was collected with that unit specified").
func (*InMemoryBackend) GetMetricStream ¶
func (b *InMemoryBackend) GetMetricStream(name string) (*MetricStream, error)
GetMetricStream returns a metric stream by name.
func (*InMemoryBackend) GetOTelEnrichment ¶ added in v1.2.0
func (b *InMemoryBackend) GetOTelEnrichment() (string, error)
GetOTelEnrichment returns the current account-level status of vended metric OTel/PromQL enrichment.
func (*InMemoryBackend) ListAlarmMuteRules ¶
func (b *InMemoryBackend) ListAlarmMuteRules( nextToken string, maxResults int, alarmName string, statuses []string, ) (page.Page[AlarmMuteRule], error)
ListAlarmMuteRules returns a paginated list of alarm mute rules, optionally filtered by targeted alarm name and/or status (ListAlarmMuteRulesInput, aws-sdk-go-v2 cloudwatch@v1.66.3 api_op_ListAlarmMuteRules.go:42).
func (*InMemoryBackend) ListDashboards ¶
func (b *InMemoryBackend) ListDashboards( prefix, nextToken string, ) (page.Page[DashboardEntry], error)
ListDashboards returns a page of dashboard entries optionally filtered by name prefix.
func (*InMemoryBackend) ListManagedInsightRules ¶
func (b *InMemoryBackend) ListManagedInsightRules( resourceARN, nextToken string, maxResults int, ) (page.Page[InsightRule], error)
ListManagedInsightRules returns a paginated list of managed (service-linked) insight rules. If resourceARN is non-empty only rules whose Arn matches are included; in the emulator the ManagedRule flag is used as the primary discriminator.
func (*InMemoryBackend) ListMetricStreams ¶
func (b *InMemoryBackend) ListMetricStreams( nextToken string, maxResults int, ) (page.Page[MetricStream], error)
ListMetricStreams returns a paginated list of all metric streams.
func (*InMemoryBackend) ListMetrics ¶
func (b *InMemoryBackend) ListMetrics( namespace, metricName string, dimensions []Dimension, recentlyActive, nextToken string, maxResults int, ) (page.Page[Metric], error)
ListMetrics returns a page of unique metrics matching optional namespace, metricName, and dimension filters. dimensions specifies an exact set that must match (all filter dims present with matching values and no extra dims in the stored record). recentlyActive, when set, must be "PT3H" (the only value CloudWatch documents) and restricts results to metrics that received a data point in the last 3 hours.
func (*InMemoryBackend) PutAlarmMuteRule ¶
func (b *InMemoryBackend) PutAlarmMuteRule(rule *AlarmMuteRule) error
PutAlarmMuteRule creates or updates an alarm mute rule by name. Name and Rule.Schedule (Expression, Duration) are required (aws-sdk-go-v2 cloudwatch@v1.66.3 validators.go:2068,1451,1470).
func (*InMemoryBackend) PutAlarmMuteRuleInternal ¶
func (b *InMemoryBackend) PutAlarmMuteRuleInternal(rule *AlarmMuteRule)
PutAlarmMuteRuleInternal creates or updates an alarm mute rule (used for test seeding).
func (*InMemoryBackend) PutAnomalyDetector ¶
func (b *InMemoryBackend) PutAnomalyDetector(detector *AnomalyDetector) error
func (*InMemoryBackend) PutAnomalyDetectorInternal ¶
func (b *InMemoryBackend) PutAnomalyDetectorInternal(detector *AnomalyDetector)
PutAnomalyDetectorInternal creates or updates an anomaly detector (used for test seeding). The AnomalyDetectorId is generated once on first creation and preserved across updates to the same namespace/metric/stat/dimensions combination, then mirrored back onto detector so callers (e.g. cborPutAnomalyDetector) can read it after the call returns without a follow-up lookup.
func (*InMemoryBackend) PutCompositeAlarm ¶
func (b *InMemoryBackend) PutCompositeAlarm(alarm *CompositeAlarm) error
PutCompositeAlarm creates or updates a composite alarm and evaluates its state.
func (*InMemoryBackend) PutDashboard ¶
func (b *InMemoryBackend) PutDashboard(name, body string) ([]DashboardValidationMessage, error)
PutDashboard creates or updates a CloudWatch dashboard by name. On success it returns any warning-level DashboardValidationMessage entries produced by validateDashboardBody (the dashboard is still persisted). If the body fails validation with one or more error-level messages, it returns a *DashboardValidationError and leaves any existing dashboard body untouched.
func (*InMemoryBackend) PutInsightRule ¶
func (b *InMemoryBackend) PutInsightRule(rule *InsightRule) error
PutInsightRule creates or updates an insight rule.
func (*InMemoryBackend) PutInsightRuleInternal ¶
func (b *InMemoryBackend) PutInsightRuleInternal(rule *InsightRule)
PutInsightRuleInternal creates or updates an insight rule (used for test seeding).
func (*InMemoryBackend) PutLogAlarm ¶ added in v1.2.0
func (b *InMemoryBackend) PutLogAlarm(alarm *LogAlarm) error
PutLogAlarm creates or updates a log alarm. Like PutMetricAlarm/ PutCompositeAlarm, calling it again with the same AlarmName replaces the previous configuration in place (matches the SDK doc comment: "If you call this operation with the name of an existing log alarm, the operation replaces the previous configuration of that alarm").
func (*InMemoryBackend) PutMetricAlarm ¶
func (b *InMemoryBackend) PutMetricAlarm(alarm *MetricAlarm) error
PutMetricAlarm creates or updates an alarm.
func (*InMemoryBackend) PutMetricData ¶
func (b *InMemoryBackend) PutMetricData( namespace string, data []MetricDatum, ) error
PutMetricData stores metric data points for the given namespace.
Real CloudWatch has no partial-failure response for this operation: the request either succeeds in full or fails in full with a single API error (PutMetricDataOutput has no members other than the request ID). This validates the entire batch before storing any of it, matching that all-or-nothing contract.
func (*InMemoryBackend) PutMetricStream ¶
func (b *InMemoryBackend) PutMetricStream(stream *MetricStream) error
PutMetricStream creates or updates a metric stream by name.
func (*InMemoryBackend) PutMetricStreamInternal ¶
func (b *InMemoryBackend) PutMetricStreamInternal(stream *MetricStream)
PutMetricStreamInternal creates or updates a metric stream (used for test seeding).
func (*InMemoryBackend) RawMetrics ¶
func (b *InMemoryBackend) RawMetrics() []RawMetric
RawMetrics returns every single-value datapoint; statistic-set and values-array points are omitted.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) SetAlarmState ¶
func (b *InMemoryBackend) SetAlarmState( ctx context.Context, alarmName, stateValue, stateReason, stateReasonData string, ) error
SetAlarmState manually sets the state of an alarm and fires the corresponding actions.
func (*InMemoryBackend) SetAutoScalingExecutor ¶
func (b *InMemoryBackend) SetAutoScalingExecutor(e AutoScalingPolicyExecutor)
SetAutoScalingExecutor registers an Auto Scaling executor used to run scaling-policy alarm actions.
func (*InMemoryBackend) SetEC2Actioner ¶
func (b *InMemoryBackend) SetEC2Actioner(a EC2InstanceActioner)
SetEC2Actioner registers an EC2 actioner used to execute arn:aws:automate EC2 alarm actions (stop/terminate/reboot/recover).
func (*InMemoryBackend) SetFirehosePutter ¶ added in v1.3.1
func (b *InMemoryBackend) SetFirehosePutter(fh FirehosePutter)
SetFirehosePutter registers a Firehose backend used to deliver matched metric-stream data to each stream's configured delivery stream.
func (*InMemoryBackend) SetLambdaInvoker ¶
func (b *InMemoryBackend) SetLambdaInvoker(inv LambdaInvoker)
SetLambdaInvoker registers a Lambda invoker used to fire alarm action Lambda invocations.
func (*InMemoryBackend) SetLogEventSource ¶
func (b *InMemoryBackend) SetLogEventSource(src LogEventSource)
SetLogEventSource wires the CloudWatch Logs events Contributor Insights rules evaluate.
func (*InMemoryBackend) SetSNSPublisher ¶
func (b *InMemoryBackend) SetSNSPublisher(pub SNSPublisher)
SetSNSPublisher registers an SNS publisher used to fire alarm action notifications.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartMetricStreams ¶
func (b *InMemoryBackend) StartMetricStreams(names []string) error
StartMetricStreams sets the State of the named streams to RUNNING. Names that do not exist are silently ignored (AWS behaviour).
func (*InMemoryBackend) StartOTelEnrichment ¶ added in v1.2.0
func (b *InMemoryBackend) StartOTelEnrichment() error
StartOTelEnrichment enables vended metric OTel/PromQL enrichment for the account.
func (*InMemoryBackend) StopMetricStreams ¶
func (b *InMemoryBackend) StopMetricStreams(names []string) error
StopMetricStreams sets the State of the named streams to STOPPED. Names that do not exist are silently ignored (AWS behaviour).
func (*InMemoryBackend) StopOTelEnrichment ¶ added in v1.2.0
func (b *InMemoryBackend) StopOTelEnrichment() error
StopOTelEnrichment disables vended metric OTel/PromQL enrichment for the account.
func (*InMemoryBackend) SubscribeAlarmStateChange ¶
func (b *InMemoryBackend) SubscribeAlarmStateChange( alarmArn string, cb func(newState string), ) func()
SubscribeAlarmStateChange registers cb to run whenever the alarm identified by alarmArn transitions to a new state. cb is invoked after setAlarmStateLocked's caller has released b.mu (see SetAlarmState), never while the lock is held, so it is safe for cb to call back into this backend or another one. It returns an unsubscribe func, safe to call at most once.
This is the generic alarm-state-change hook other services attach to an alarm they do not own -- e.g. FIS stop conditions (gopherstack-x842, gopherstack-9939) -- distinct from AlarmActions/OKActions/InsufficientDataActions, which only fire ARNs the alarm's own owner configured.
func (*InMemoryBackend) SweepExpiredMetrics ¶
func (b *InMemoryBackend) SweepExpiredMetrics()
SweepExpiredMetrics evicts metric series that have gone quiet for longer than cwListMetricsVisibilityWindow, and trims individual data points older than cwMetricRetentionDays from series that are still active. It is intended to be called periodically (e.g., by a janitor goroutine).
The point-level phase uses a two-phase approach: snapshot candidate series under a read lock, then apply deletions under a write lock. This avoids holding the write lock during the full O(series × points) filter scan.
type InsightLogEvent ¶
InsightLogEvent is one log event as seen by a Contributor Insights rule.
type InsightRule ¶
type InsightRule struct {
CreatedAt time.Time `json:"CreatedAt"`
Name string `json:"Name"`
State string `json:"State"`
Schema string `json:"Schema"`
Definition string `json:"Definition"`
Arn string `json:"RuleArn"`
ManagedRule bool `json:"ManagedRule"`
}
InsightRule represents a CloudWatch Contributor Insights rule.
type InsightRuleContributor ¶ added in v1.3.1
type InsightRuleContributor struct {
Keys []string
Datapoints []InsightRuleContributorDatapoint
ApproximateAggregateValue float64
}
InsightRuleContributor is one unique key combination and its aggregate value.
type InsightRuleContributorDatapoint ¶
InsightRuleContributorDatapoint is one contributor value in one period.
type InsightRuleFailure ¶
type InsightRuleFailure struct {
RuleName string `json:"RuleName"`
FailureCode string `json:"FailureCode"`
FailureDescription string `json:"FailureDescription,omitempty"`
}
InsightRuleFailure represents a failed rule in batch insight rule operations.
type InsightRuleMetricDatapoint ¶
type InsightRuleMetricDatapoint struct {
Timestamp time.Time
UniqueContributors *float64
MaxContributorValue *float64
SampleCount *float64
Sum *float64
Minimum *float64
Maximum *float64
Average *float64
}
InsightRuleMetricDatapoint carries only the statistics the request asked for.
type InsightRuleReport ¶
type InsightRuleReport struct {
AggregationStatistic string
KeyLabels []string
Contributors []InsightRuleContributor
MetricDatapoints []InsightRuleMetricDatapoint
AggregateValue float64
ApproximateUniqueCount int64
}
InsightRuleReport is the GetInsightRuleReport result.
type InsightRuleReportRequest ¶
type InsightRuleReportRequest struct {
StartTime time.Time
EndTime time.Time
RuleName string
OrderBy string
Metrics []string
Period int
MaxContributors int
}
InsightRuleReportRequest is the validated input of GetInsightRuleReport.
func (*InsightRuleReportRequest) Validate ¶
func (r *InsightRuleReportRequest) Validate() error
Validate applies the documented GetInsightRuleReport parameter constraints.
type Janitor ¶
type Janitor struct {
Backend *InMemoryBackend
Interval time.Duration
AlarmEvalInterval time.Duration
}
Janitor is the CloudWatch background worker that manages metric retention and evaluates metric alarm states.
func NewJanitor ¶
func NewJanitor(backend *InMemoryBackend) *Janitor
NewJanitor creates a new CloudWatch Janitor.
type LambdaInvoker ¶
type LambdaInvoker interface {
InvokeFunction(
ctx context.Context,
name string,
invocationType string,
payload []byte,
) ([]byte, int, error)
}
LambdaInvoker can invoke a Lambda function by ARN or name.
type LogAlarm ¶ added in v1.2.0
type LogAlarm struct {
CreatedAt time.Time `json:"AlarmCreatedAt"`
StateTransitionedTimestamp time.Time `json:"StateTransitionedTimestamp"`
StateUpdatedTimestamp time.Time `json:"StateUpdatedTimestamp"`
AlarmConfigurationUpdatedTimestamp time.Time `json:"AlarmConfigurationUpdatedTimestamp"`
StateReasonData string `json:"StateReasonData,omitempty"`
EvaluationState string `json:"EvaluationState,omitempty"`
AlarmName string `json:"AlarmName"`
ComparisonOperator string `json:"ComparisonOperator"`
TreatMissingData string `json:"TreatMissingData,omitempty"`
StateReason string `json:"StateReason,omitempty"`
ActionLogLineRoleArn string `json:"ActionLogLineRoleArn,omitempty"`
AlarmDescription string `json:"AlarmDescription,omitempty"`
AlarmArn string `json:"AlarmArn"`
StateValue string `json:"StateValue"`
AlarmActions []string `json:"AlarmActions,omitempty"`
OKActions []string `json:"OKActions,omitempty"`
InsufficientDataActions []string `json:"InsufficientDataActions,omitempty"`
ScheduledQueryConfiguration ScheduledQueryConfiguration `json:"ScheduledQueryConfiguration"`
Threshold float64 `json:"Threshold"`
QueryResultsToAlarm int32 `json:"QueryResultsToAlarm"`
QueryResultsToEvaluate int32 `json:"QueryResultsToEvaluate"`
ActionLogLineCount int32 `json:"ActionLogLineCount,omitempty"`
ActionsEnabled bool `json:"ActionsEnabled"`
}
LogAlarm represents a CloudWatch log alarm: a third alarm type (alongside MetricAlarm and CompositeAlarm) that evaluates the results of a CloudWatch Logs scheduled query against Threshold using M-out-of-N evaluation (QueryResultsToAlarm out of the most recent QueryResultsToEvaluate results). gopherstack has no CloudWatch Logs Insights query engine to actually run ScheduledQueryConfiguration on a schedule, so EvaluationState/state transitions for a log alarm are driven only by explicit SetAlarmState calls -- the same manual-only model this backend already uses for composite alarms between PutCompositeAlarm evaluations.
type LogEventSource ¶
type LogEventSource interface {
InsightEvents(region string, logGroupPatterns []string, start, end time.Time) []InsightLogEvent
}
LogEventSource supplies CloudWatch Logs events to Contributor Insights rules.
type Metric ¶
type Metric struct {
Namespace string `json:"Namespace"`
MetricName string `json:"MetricName"`
Dimensions []Dimension `json:"Dimensions,omitempty"`
}
Metric represents a named metric (name+namespace+dimensions).
type MetricAlarm ¶
type MetricAlarm struct {
EvaluationWindow *AlarmEvaluationWindow `json:"EvaluationWindow,omitempty"`
WarmUp *AlarmWarmUp `json:"WarmUpConfiguration,omitempty"`
EvaluateLowSampleCountPercentile string `json:"EvaluateLowSampleCountPercentile,omitempty"`
CreatedAt time.Time `json:"AlarmCreatedAt"`
StateTransitionedTimestamp time.Time `json:"StateTransitionedTimestamp"`
StateUpdatedTimestamp time.Time `json:"StateUpdatedTimestamp"`
AlarmConfigurationUpdatedTimestamp time.Time `json:"AlarmConfigurationUpdatedTimestamp"`
AlarmDescription string `json:"AlarmDescription,omitempty"`
AlarmArn string `json:"AlarmArn"`
MetricName string `json:"MetricName"`
ComparisonOperator string `json:"ComparisonOperator"`
Statistic string `json:"Statistic"`
ExtendedStatistic string `json:"ExtendedStatistic,omitempty"`
TreatMissingData string `json:"TreatMissingData,omitempty"`
AlarmName string `json:"AlarmName"`
StateReason string `json:"StateReason,omitempty"`
StateReasonData string `json:"StateReasonData,omitempty"`
StateValue string `json:"StateValue"`
Namespace string `json:"Namespace"`
ThresholdMetricID string `json:"ThresholdMetricId,omitempty"`
Unit string `json:"Unit,omitempty"`
OKActions []string `json:"OKActions,omitempty"`
InsufficientDataActions []string `json:"InsufficientDataActions,omitempty"`
Dimensions []Dimension `json:"Dimensions,omitempty"`
Metrics []MetricDataQuery `json:"Metrics,omitempty"`
AlarmActions []string `json:"AlarmActions,omitempty"`
Threshold float64 `json:"Threshold"`
EvaluationPeriods int32 `json:"EvaluationPeriods"`
DatapointsToAlarm int32 `json:"DatapointsToAlarm,omitempty"`
Period int32 `json:"Period"`
ActionsEnabled bool `json:"ActionsEnabled"`
}
MetricAlarm represents a CloudWatch metric alarm.
type MetricCharacteristics ¶
type MetricCharacteristics struct {
PeriodicSpikes bool `json:"PeriodicSpikes"`
}
MetricCharacteristics tunes anomaly model training for the metric.
type MetricDataMessage ¶
MetricDataMessage is a diagnostic message returned by GetMetricData, either at the top level of the response or attached to an individual MetricDataResult. Code is a short machine-readable identifier (e.g. "ArithmeticError", "Forbidden", "MaxDatapointsExceeded"); Value is the human-readable text.
type MetricDataQuery ¶
type MetricDataQuery struct {
ID string `json:"Id"`
Label string `json:"Label,omitempty"`
Expression string `json:"Expression,omitempty"`
AccountID string `json:"AccountId,omitempty"`
MetricStat MetricStat `json:"MetricStat"`
Period int32 `json:"Period,omitempty"`
ReturnData bool `json:"ReturnData"`
}
MetricDataQuery is a single query in a GetMetricData request. Expression supports metric math (e.g. "m1+m2"). When non-empty, MetricStat is ignored. AccountId, when set to an account other than the local account, causes the query to return empty data (cross-account metrics are not supported locally but must not error). ReturnData controls whether the query result is included in the response.
type MetricDataResult ¶
type MetricDataResult struct {
Timestamps []time.Time `json:"Timestamps"`
ID string `json:"Id"`
Label string `json:"Label,omitempty"`
StatusCode string `json:"StatusCode"`
Values []float64 `json:"Values"`
Messages []MetricDataMessage `json:"Messages,omitempty"`
}
MetricDataResult is a single result entry in a GetMetricData response. StatusCode is "Complete", "PartialData", "InternalError", or "Forbidden". Messages carries per-result diagnostics (e.g. arithmetic errors in metric math).
type MetricDatum ¶
type MetricDatum struct {
Timestamp time.Time `json:"Timestamp"`
MetricName string `json:"MetricName"`
Namespace string `json:"Namespace"`
Unit string `json:"Unit,omitempty"`
Dimensions []Dimension `json:"Dimensions,omitempty"`
// Values and Counts implement the PutMetricData "array of values" input: each
// Values[i] occurred Counts[i] times during the period. Populated only when
// HasValuesArray is true; Counts is defaulted to all-1s by the parser when the
// caller omits it.
Values []float64 `json:"Values,omitempty"`
Counts []float64 `json:"Counts,omitempty"`
Count float64 `json:"SampleCount"`
Value float64 `json:"Value"`
Sum float64 `json:"Sum"`
Min float64 `json:"Min"`
Max float64 `json:"Max"`
// StorageResolution is 1 (high-resolution) or 60 (standard); 0 means "use default".
StorageResolution int32 `json:"StorageResolution,omitempty"`
// HasStatisticSet is true when the datum was built from a StatisticValues input.
HasStatisticSet bool `json:"-"`
// HasValuesArray is true when the datum was built from a Values/Counts input.
HasValuesArray bool `json:"-"`
// HasValue is true when the caller explicitly supplied the Value field
// (independent of whether that value is the float zero value).
HasValue bool `json:"-"`
}
MetricDatum holds a single metric data point.
A datum is built from exactly one of three mutually-exclusive input shapes: a single Value, a pre-aggregated StatisticValues set, or a Values/Counts array pair (up to 150 unique values, each with an occurrence count). The Has* flags record which shape was supplied on the wire so validation can enforce mutual exclusion by presence rather than by zero-value guessing.
type MetricStat ¶
type MetricStat struct {
Namespace string `json:"Namespace"`
MetricName string `json:"MetricName"`
Stat string `json:"Stat"`
Dimensions []Dimension `json:"Dimensions,omitempty"`
Period int32 `json:"Period"`
}
MetricStat specifies a metric and statistic for a MetricDataQuery.
type MetricStream ¶
type MetricStream struct {
CreationDate time.Time `json:"CreationDate"`
LastUpdateDate time.Time `json:"LastUpdateDate"`
Name string `json:"Name"`
FirehoseArn string `json:"FirehoseArn"`
RoleArn string `json:"RoleArn"`
OutputFormat string `json:"OutputFormat"`
State string `json:"State"`
Arn string `json:"Arn"`
IncludeFilters []MetricStreamFilter `json:"IncludeFilters,omitempty"`
ExcludeFilters []MetricStreamFilter `json:"ExcludeFilters,omitempty"`
StatisticsConfigurations []MetricStreamStatisticsConfiguration `json:"StatisticsConfigurations,omitempty"`
}
MetricStream represents a CloudWatch metric stream.
type MetricStreamFilter ¶
type MetricStreamFilter struct {
Namespace string `json:"Namespace"`
MetricNames []string `json:"MetricNames,omitempty"`
}
MetricStreamFilter specifies a namespace-level include/exclude filter for a metric stream.
type MetricStreamStatisticsConfiguration ¶ added in v1.5.0
type MetricStreamStatisticsConfiguration struct {
AdditionalStatistics []string `json:"AdditionalStatistics"`
IncludeMetrics []MetricStreamStatisticsMetric `json:"IncludeMetrics"`
}
MetricStreamStatisticsConfiguration is types.MetricStreamStatisticsConfiguration (aws-sdk-go-v2 cloudwatch@v1.66.3 types/types.go:3270 -- AdditionalStatistics/ IncludeMetrics both required).
type MetricStreamStatisticsMetric ¶ added in v1.5.0
type MetricStreamStatisticsMetric struct {
MetricName string `json:"MetricName"`
Namespace string `json:"Namespace"`
}
MetricStreamStatisticsMetric names one metric whose additional statistics are streamed (aws-sdk-go-v2 cloudwatch@v1.66.3 types.MetricStreamStatisticsMetric, types/types.go:3312 -- MetricName/Namespace both required).
type OTelEnrichmentState ¶ added in v1.2.0
OTelEnrichmentState is the account-level status of vended-metric OTel enrichment (resource ARN/tag labels + PromQL queryability), toggled by StartOTelEnrichment/StopOTelEnrichment and read by GetOTelEnrichment. Key is always otelEnrichmentSingletonKey; there is exactly one row per backend, matching the fact this is an account-wide setting, not a named resource.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the CloudWatch service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the CloudWatch service backend and handler.
type RawMetric ¶
type RawMetric struct {
Namespace string `json:"ns"`
Name string `json:"n"`
Dimensions *string `json:"d"`
Account string `json:"account"`
Region string `json:"region"`
Value float64 `json:"v"`
Timestamp int64 `json:"t"`
}
RawMetric is one single-value datapoint in the LocalStack /_aws/cloudwatch/metrics/raw shape.
type SNSPublisher ¶
SNSPublisher can publish a message to an SNS topic by ARN.
type ScheduleConfiguration ¶ added in v1.2.0
type ScheduleConfiguration struct {
ScheduleExpression string `json:"ScheduleExpression"`
StartTimeOffset int64 `json:"StartTimeOffset"`
EndTimeOffset int64 `json:"EndTimeOffset,omitempty"`
}
ScheduleConfiguration is the schedule expression and time-range offsets that define when a log alarm's underlying CloudWatch Logs scheduled query runs and what time range each execution covers.
type ScheduledQueryConfiguration ¶ added in v1.2.0
type ScheduledQueryConfiguration struct {
AggregationExpression string `json:"AggregationExpression"`
QueryString string `json:"QueryString"`
ScheduledQueryRoleARN string `json:"ScheduledQueryRoleARN"`
QueryARN string `json:"QueryARN,omitempty"`
LogGroupIdentifiers []string `json:"LogGroupIdentifiers,omitempty"`
ScheduleConfiguration ScheduleConfiguration `json:"ScheduleConfiguration"`
}
ScheduledQueryConfiguration is the configuration of the CloudWatch Logs scheduled query that backs a log alarm: the query itself, the log groups it runs against, its schedule, and the aggregation expression used to reduce each execution's results to the scalar value(s) compared against the alarm's Threshold.
type StorageBackend ¶
type StorageBackend interface {
PutMetricData(namespace string, data []MetricDatum) error
GetMetricStatistics(
namespace, metricName string,
dimensions []Dimension,
startTime, endTime time.Time,
period int32,
statistics []string,
extendedStatistics []string,
) ([]Datapoint, error)
GetMetricStatisticsForUnit(
namespace, metricName string,
dimensions []Dimension,
startTime, endTime time.Time,
period int32,
statistics []string,
extendedStatistics []string,
unit string,
) ([]Datapoint, error)
GetMetricData(
queries []MetricDataQuery,
startTime, endTime time.Time,
) ([]MetricDataResult, error)
ListMetrics(
namespace, metricName string,
dimensions []Dimension,
recentlyActive, nextToken string,
maxResults int,
) (page.Page[Metric], error)
PutMetricAlarm(alarm *MetricAlarm) error
PutCompositeAlarm(alarm *CompositeAlarm) error
PutLogAlarm(alarm *LogAlarm) error
DescribeAlarms(
alarmNames []string,
alarmTypes []string,
alarmNamePrefix, stateValue, nextToken string,
maxRecords int,
actionPrefix, childrenOfAlarmName, parentsOfAlarmName string,
) (page.Page[MetricAlarm], page.Page[CompositeAlarm], page.Page[LogAlarm], error)
DescribeAlarmsForMetric(
namespace, metricName string,
dimensions []Dimension,
alarmNames []string,
nextToken string,
maxRecords int,
) (page.Page[MetricAlarm], error)
DescribeAlarmHistory(
alarmName string, alarmTypes []string, historyItemType, nextToken, scanBy string,
startDate, endDate time.Time,
maxRecords int,
) (page.Page[AlarmHistoryItem], error)
DeleteAlarms(alarmNames []string) error
SetAlarmState(
ctx context.Context,
alarmName, stateValue, stateReason, stateReasonData string,
) error
EnableAlarmActions(alarmNames []string) error
DisableAlarmActions(alarmNames []string) error
PutDashboard(name, body string) ([]DashboardValidationMessage, error)
GetDashboard(name string) (DashboardEntry, string, error)
ListDashboards(prefix, nextToken string) (page.Page[DashboardEntry], error)
DeleteDashboards(names []string) error
PutAlarmMuteRule(rule *AlarmMuteRule) error
DeleteAlarmMuteRule(name string) error
GetAlarmMuteRule(name string) (*AlarmMuteRule, error)
PutAnomalyDetector(detector *AnomalyDetector) error
DeleteAnomalyDetector(namespace, metricName, stat string, dims []Dimension) error
DeleteAnomalyDetectorByID(id string) error
DeleteMetricMathAnomalyDetector(queries []MetricDataQuery) error
DescribeAnomalyDetectorsFiltered(
filter AnomalyDetectorFilter,
nextToken string,
maxResults int,
) (page.Page[AnomalyDetector], error)
DescribeAnomalyDetectors(
namespace, metricName, nextToken string,
maxResults int,
) (page.Page[AnomalyDetector], error)
DeleteInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
PutInsightRule(rule *InsightRule) error
GetInsightRule(name string) (*InsightRule, error)
GetInsightRuleReport(req InsightRuleReportRequest) (*InsightRuleReport, error)
DescribeInsightRules(nextToken string, maxResults int) (page.Page[InsightRule], error)
DisableInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
EnableInsightRules(ruleNames []string) ([]InsightRuleFailure, error)
PutMetricStream(stream *MetricStream) error
GetMetricStream(name string) (*MetricStream, error)
ListMetricStreams(nextToken string, maxResults int) (page.Page[MetricStream], error)
DeleteMetricStream(name string) error
DescribeAlarmContributors(alarmName, nextToken string) (page.Page[AlarmContributor], error)
StartMetricStreams(names []string) error
StopMetricStreams(names []string) error
ListAlarmMuteRules(
nextToken string,
maxResults int,
alarmName string,
statuses []string,
) (page.Page[AlarmMuteRule], error)
ListManagedInsightRules(
resourceARN, nextToken string,
maxResults int,
) (page.Page[InsightRule], error)
GetDataset(identifier string) (Dataset, error)
AssociateDatasetKmsKey(identifier, kmsKeyArn string) error
DisassociateDatasetKmsKey(identifier string) error
GetOTelEnrichment() (string, error)
StartOTelEnrichment() error
StopOTelEnrichment() error
}
StorageBackend is the interface for the CloudWatch in-memory store.
Source Files
¶
- alarm_actions.go
- alarm_eval.go
- alarm_eval_window.go
- alarm_history.go
- alarm_mute_rules.go
- alarm_mute_schedule.go
- alarm_state.go
- alarm_subscriptions.go
- alarms.go
- anomaly_detectors.go
- composite_alarms.go
- contributors.go
- dashboard_validation.go
- dashboards.go
- datasets.go
- errors.go
- handler.go
- handler_alarm_history.go
- handler_alarm_mute_rules.go
- handler_alarms.go
- handler_anomaly_detectors.go
- handler_composite_alarms.go
- handler_contributors.go
- handler_dashboards.go
- handler_datasets.go
- handler_insight_rules.go
- handler_log_alarms.go
- handler_metric_streams.go
- handler_metrics.go
- handler_otel_enrichment.go
- handler_widget.go
- insight_rule_eval.go
- insight_rule_report.go
- insight_rule_spec.go
- insight_rule_validation.go
- insight_rules.go
- interfaces.go
- janitor.go
- log_alarms.go
- metric_stream_delivery.go
- metric_stream_validation.go
- metric_streams.go
- metricdata.go
- metricmath.go
- metrics.go
- models.go
- otel_enrichment.go
- pagination.go
- persistence.go
- provider.go
- raw_metrics.go
- region_handler.go
- request_compression.go
- rpcv2cbor.go
- rpcv2cbor_alarm_history.go
- rpcv2cbor_alarm_mute_rules.go
- rpcv2cbor_alarms.go
- rpcv2cbor_anomaly_detectors.go
- rpcv2cbor_composite_alarms.go
- rpcv2cbor_contributors.go
- rpcv2cbor_dashboards.go
- rpcv2cbor_datasets.go
- rpcv2cbor_insight_rules.go
- rpcv2cbor_log_alarms.go
- rpcv2cbor_metric_streams.go
- rpcv2cbor_metrics.go
- rpcv2cbor_otel_enrichment.go
- rpcv2cbor_widget.go
- rule.go
- store.go
- store_setup.go
- widget.go
- widget_draw.go
- widget_font.go