Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudWatch Alarm event #484

Open
DSkoufis opened this issue Jun 14, 2024 · 0 comments
Open

CloudWatch Alarm event #484

DSkoufis opened this issue Jun 14, 2024 · 0 comments

Comments

@DSkoufis
Copy link

Would it be possible to add support for a CW Alarm event when we configure a Lambda function as an alarm action?
Ref: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-actions

Example payload:

{
    "source": "aws.cloudwatch",
    "alarmArn": "arn:aws:cloudwatch:us-east-1:444455556666:alarm:lambda-demo-metric-alarm",
    "accountId": "444455556666",
    "time": "2023-08-04T12:36:15.490+0000",
    "region": "us-east-1",
    "alarmData": {
        "alarmName": "lambda-demo-metric-alarm",
        "state": {
            "value": "ALARM",
            "reason": "test",
            "timestamp": "2023-08-04T12:36:15.490+0000"
        },
        "previousState": {
            "value": "INSUFFICIENT_DATA",
            "reason": "Insufficient Data: 5 datapoints were unknown.",
            "reasonData": "{\"version\":\"1.0\",\"queryDate\":\"2023-08-04T12:31:29.591+0000\",\"statistic\":\"Average\",\"period\":60,\"recentDatapoints\":[],\"threshold\":5.0,\"evaluatedDatapoints\":[{\"timestamp\":\"2023-08-04T12:30:00.000+0000\"},{\"timestamp\":\"2023-08-04T12:29:00.000+0000\"},{\"timestamp\":\"2023-08-04T12:28:00.000+0000\"},{\"timestamp\":\"2023-08-04T12:27:00.000+0000\"},{\"timestamp\":\"2023-08-04T12:26:00.000+0000\"}]}",
            "timestamp": "2023-08-04T12:31:29.595+0000"
        },
        "configuration": {
            "description": "Metric Alarm to test Lambda actions",
            "metrics": [
                {
                    "id": "1234e046-06f0-a3da-9534-EXAMPLEe4c",
                    "metricStat": {
                        "metric": {
                            "namespace": "AWS/Logs",
                            "name": "CallCount",
                            "dimensions": {
                                "InstanceId": "i-12345678"
                            }
                        },
                        "period": 60,
                        "stat": "Average",
                        "unit": "Percent"
                    },
                    "returnData": true
                }
            ]
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant