Monitoring AWS RI on Kubernetes using DataDog

by (April 14, 2017)

Posted in DevOps  Tags:AWS, Clouds, DataDog, , Tools

AWS allows you to save money using Reserved Instances, but there is a catch you have to plan your reservations with care and it is a very good idea to keep an eye on it and be notified when Reserved Instances you bought do not match actually running instances.

Preconditions

It will only work if:

  1. You are running Kuberenetes cluster.
  2. And using DataDog for monitoring.

Quick start

Just check this little project, to have it working:

  1. Change IAM role to allow the script to talk to AWS API:
    {
     "Version": "2012-10-17",
     "Statement": [
         {
             "Effect": "Allow",
             "Action": [
                 "ec2:DescribeInstances",
                 "ec2:DescribeReservedInstances",
                 "rds:DescribeDBInstances",
                 "rds:DescribeReservedDBInstances",
                 "elasticache:DescribeCacheClusters",
                 "elasticache:DescribeReservedCacheNodes"
             ],
             "Resource": "*"
         }
     ]
    }
    
  2. Deploy it: kubectl create -f https://raw.githubusercontent.com/say5/check-reserved-instances/master/check-ri.do (DataDog agent should be running on the same host).
  3. Configure DataDog Monitors to get notification when there are Reserved Instances not being used.

Can it be done in a simpler way?

Sure, just ping us and we will setup everything in a best way.

Let us know!

Contact details:

 

Services you are interested in: