Skip to main content

CloudWatch

Cloudwatch checks for all active alarms

cloudwatch.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: cloudwatch
spec:
interval: 30
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()
FieldDescriptionScheme
name*

Name of the check, must be unique within the canary

string

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

string

display

Expression to change the formatting of the display

Expression

icon

Icon for overwriting default icon on the dashboard

Icon

labels

Labels for check

map[string]string

metrics

Metrics to export from

[]Metrics

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

connection

The connection url to use, mutually exclusive with accessKey and secretKey

Connection

accessKey

EnvVar

secretKey

EnvVar

region

The AWS region

string

endpoint

Custom AWS Endpoint to use

skipTLSVerify

Skip TLS verify when connecting to AWS

boolean