Skip to content

Instantly share code, notes, and snippets.

@slashk
slashk / Datadog Usage API Costs
Last active September 2, 2022 16:12
remove push arg
#!/bin/bash
# This script uses the Datadog API to pull down monthly costs by charge type (commit/on-demand) and product name into CSV
# run it like this (after you setup your datadog app / api keys as env variables as DD_APP_KEY and DD_API_KEY):
#
# % ./dd_monthly_cost_by_prod_charge.sh
#
# Output looks like this:
#
# product name, charge type, cost