Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebrandt/a63fbf1d36f6d4f6cc100383cf140906 to your computer and use it in GitHub Desktop.
Save kylebrandt/a63fbf1d36f6d4f6cc100383cf140906 to your computer and use it in GitHub Desktop.
mtod example (not merged)
$metric = "sum:5m-avg:rate{counter,,1}:__ny-nexus02.os.net.bytes{host=ny-nexus02,iname=Ethernet3/1}"
$monthToDate = mtod(-4)
$commit = 150
$mtdAgo = epoch()-$monthToDate
$q = q($metric, tod($mtdAgo), "") * 8
$mtdAgo > d("1d") && percentile($q, .95) / 1e6 > $commit*.70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment