Sensu automatically deregister EC2 instance

Hi,

I am trying to implement Sensu to check EC2 instances. We have some server in auto-scaling group. How can I configure sensu and cloudwatch events that will automatically deregister EC2 instances when autoscaling group scaled down? Could you share sample code or relative article with me?

Cheers

Ferdous Shibly

Check out https://github.com/eheydrick/aws-cleaner. It listens for cloudwatch termination events and calls the Sensu API to remove instances when they are terminated.

···

On Wed, Nov 22, 2017 at 8:36 AM, Ferdous Shibly bdshibly@gmail.com wrote:

Hi,

I am trying to implement Sensu to check EC2 instances. We have some server in auto-scaling group. How can I configure sensu and cloudwatch events that will automatically deregister EC2 instances when autoscaling group scaled down? Could you share sample code or relative article with me?

Cheers

Ferdous Shibly

1 Like

I personally also use aws-cleaner and it works very well, one of the many benefits of this approach is that you can run multiple deprovisioning steps to update additional inventories such as config management tools. Some alternative approaches would be: