summary refs log tree commit diff
path: root/bin/tw-kestrel-active-queues
diff options
context:
space:
mode:
authorFranck Cuny <fcuny@twitter.com>2017-11-07 08:47:26 -0800
committerFranck Cuny <fcuny@twitter.com>2017-11-07 08:47:26 -0800
commit28cadb970ca0b1ae6cde58d09eadb6af89999ddf (patch)
tree3f3d0096bc041ed74868872c43beb9612afebc75 /bin/tw-kestrel-active-queues
parent[emacs] add scala-mode (diff)
downloademacs.d-28cadb970ca0b1ae6cde58d09eadb6af89999ddf.tar.gz
Remove bin, this is now in it's own repo
Diffstat (limited to 'bin/tw-kestrel-active-queues')
-rwxr-xr-xbin/tw-kestrel-active-queues25
1 files changed, 0 insertions, 25 deletions
diff --git a/bin/tw-kestrel-active-queues b/bin/tw-kestrel-active-queues
deleted file mode 100755
index 9cf85ce..0000000
--- a/bin/tw-kestrel-active-queues
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-CLUSTER="${1:-kestrel.prod.low_sla}"
-
-for zone in atla smf1; do
-  echo "querying $zone/$CLUSTER"
-
-  tmpfile=$(mktemp "/tmp/${CLUSTER}-${zone}.XXXXXX")
-  csvout="$(dirname $0)/${CLUSTER}-${zone}.csv"
-
-  # first filter the metrics we want
-  cql -z "${zone}" k "${CLUSTER}" "sd.${CLUSTER}" | grep -e 'get_items_hit' > "${tmpfile}"
-
-  # remove the csv output file if it exists
-  [ -e "${csvout}" ] && rm "${csvout}"
-
-  # then we build the csv
-  for queue in $(cat "${tmpfile}"); do
-    total_hits=$(cql -z "${zone}" q -d 86400 "sum(default(0, rate(ts(sum, ${CLUSTER}, members(sd.${CLUSTER}), ${queue}))))"|awk '{sum+=$8} END{print sum}')
-    queue_name=$(echo ${queue} | sed -e 's/^q\/\(.*\)\/.*$/\1/')
-    echo "${queue_name};${total_hits}" >> "${csvout}"
-  done
-
-  rm "${tmpfile}"
-done