Skip to content

Instantly share code, notes, and snippets.

@tolleiv
Last active April 22, 2021 19:40
Show Gist options
  • Save tolleiv/3c10fc3249afa70218adaa571a3835b5 to your computer and use it in GitHub Desktop.
Save tolleiv/3c10fc3249afa70218adaa571a3835b5 to your computer and use it in GitHub Desktop.
Amazon Managed Service for Prometheus price calculation
# What's the cost of keeping the top 25 metrics within Amazon Managed Service for Prometheus
# 1 -> amount of samples per minute
count(topk(25, count by (__name__, job)({__name__=~".+"}))) * 1 * 60 * 24 * 1/10000 * 0.002
# What's the cost of keeping all metrics within Amazon Managed Service for Prometheus
# 1 -> amount of samples per minute
count({__name__=~".+"}) * 1 * 60 * 24 * 1/10000 * 0.002
# * Doesn't take into account that it's geeting cheaper beyond 50 billion samples - you'll figure that out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment