By Feng Li．Jun 14, 2023
Datadog monitors AWS cloud services via “integration”. Under the hood, Datadog provides AWS CloudFormation templates to create resources in AWS in order to monitor AWS services and send metrics back to Datadog. To get metrics of different services, we’ll need to enable integration for them specifically.
1 First we add AWS account as integration in Datadog
Search “amazon web services” in “Integrations” page and choose “Add AWS Accounts”.
Choose our AWS account region and “select API key”. Datadog “API key” is used to send AWS service metrics back to Datadog. There is one default API key our Datadog account is setup.
When clicking “Launch CloudFormation Template” button, it brings you to AWS console as follows. Set name for this stack and kick it off.
Once it completes, AWS shows in “Installed” section on Datadog Integration page.
We then can click the icon for detail configurations.
Next, we’ll “enable” Lambda integration for our AWS account so Datadog can collect Lambda information.
Search “lambda” on integration page and click icon for details.
We can see this Lambda integration will collect a list of metrics and create some monitors as well by default.
We can then use “Install Integration” button on “Configure” tab to proceed the installation.
Once that is done, we can find our lambda in “Infrastructure” -> “Serverless” page.
Note, we need to fire the lambda to generate some data so it can only show up on the page.
We can then find lambda metrics on metric explorer page for example “aws.lambda.errors”. Further more, you can leverage Datadog lambda extension to collect “enhanced” metrics like “aws.lambda.enhanced.errors”. For enhanced lambda metrics check this DD doc. For how to use lambda extension check this post.
We then can try adding more AWS service integration to Datadog! Check out S3…
Once we have metrics we can define “Monitor(alert)” on top of them. Some examples can be found in this post where we extracted keywords from Lambda log file, made them Datadog metrics and defined threshold alerts.
The original article published on Medium.
Join Medium with Fen Li.