CloudWatch
Cloudwatch checks for all active alarms
cloudwatch.yamlapiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: cloudwatch
spec:
schedule: "@every 5m"
cloudwatch:
region: "eu-west-1"
transform:
expr: |
results.MetricAlarms.filter(i, i.StateValue != 'OK' ).map(i,
{
'name': i.MetricName,
'icon': 'aws-cloudwatch-alarm',
'duration': time.Since(timestamp(i.StateTransitionedTimestamp)).getMilliseconds(),
'labels': fromAWSMap(i.Dimensions).
merge({'arn': i.AlarmArn}),
'message': "%s (%s) %s".format([i.AlarmDescription, i.AlarmArn, fromAWSMap(i.Dimensions)]),
}
).toJSON()
Field | Description | Scheme |
---|---|---|
name* | Name of the check, must be unique within the canary |
|
actionPrefix | Use to filter the results of the operation to only those alarms that use a certain alarm action. Fr example you could specify the ARN of an SNS topic to find all alarms that send notifications to that topic | |
alarmPrefix | Specify to receive information about all alarms that have names that start with this prefix. | |
alarms | Set field to retrieve information about alarm | |
state | Specify to retrieve state value of alarm | |
description | Description for the check |
|
display | Expression to change the formatting of the display | |
icon | Icon for overwriting default icon on the dashboard | |
labels | Labels for check | map[string]string |
metrics | Metrics to export from | |
test | Evaluate whether a check is healthy | |
transform | Transform data from a check into multiple individual checks | |
connection | The connection url to use, mutually exclusive with | |
accessKey | ||
secretKey | ||
region | The AWS region |
|
endpoint | Custom AWS Endpoint to use | |
skipTLSVerify | Skip TLS verify when connecting to AWS |
|