Using DataDog API to pull metrics data for EC2 instances
In this short post, we’ll see how we can use Datadog API to pull instance utilization data.
Pre-requisite: DataDog must be setup, with your EC2 instances metric data being available in DataDog. You will also need DataDog API key and Application key
Step 1: Install datadog package using pip.
Step 2: Save the given code on your local system.
#!/usr/bin/python
import requests, json,sys
from datadog import initialize, api
from time import time…