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

Documentation: Adding an alarm to watchful's scope #754

Open
eisenhowerj opened this issue Feb 9, 2022 · 0 comments
Open

Documentation: Adding an alarm to watchful's scope #754

eisenhowerj opened this issue Feb 9, 2022 · 0 comments

Comments

@eisenhowerj
Copy link

Really enjoying cdk-watchful but I wanted to add my own custom alarm, here is how I did it:

        watchful.watch_lambda_function("MyLambda", my_lambda)
        lambda_invocations = my_lambda.metric_invocations(period=cdk.Duration.minutes(1))
        invocation_alarm = cloudwatch.Alarm(
            self,
            "Invocations",
            metric=lambda_invocations,
            evaluation_periods=1,
            threshold=20,
        )
        watchful.add_alarm(invocation_alarm)
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