Skip to content

Instantly share code, notes, and snippets.

@fredsig
fredsig / ec2-spot-ecs-drainer.png
Last active May 15, 2020 12:41
Lambda function that drains tasks from an ECS instance. To be triggered by EC2 Spot Instance Interruption Warning.
ec2-spot-ecs-drainer.png
@fredsig
fredsig / prom-docker-thinpool-usage.py
Created October 15, 2018 11:13
Generates Prometheus metrics for Docker thin pool usage
#!/usr/bin/env python
# Generates Prometheus metrics for Docker thin pool usage
import subprocess
import re
import shutil
METRIC_PREFIX = "docker_thinpool"
PROM_DIR = "/tmp"