From: Gregory Meno Date: Sat, 22 Apr 2017 05:38:03 +0000 (-0700) Subject: re-organize the script X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75e712d529df5857bc0802227425d24a1ff22c8f;p=ceph-build.git re-organize the script Signed-off-by: Gregory Meno --- diff --git a/bz-mill/build/build b/bz-mill/build/build index e4021bb6..09da65c8 100755 --- a/bz-mill/build/build +++ b/bz-mill/build/build @@ -1,19 +1,11 @@ -#!/bin/bash +" > stuff -set -e -set -x -find . -cat map_namespace_to_query |\ +cat stuff |\ while read url namespace; do - echo "$url ::: $namespace"; bz_count=$(curl 2>/dev/null -XGET -L "$url" 3>/dev/null | sed 1d | tr "," " " | awk '{print $1}' | sort -n | wc -l); - echo "$namespace $bz_count $(date +%s)"; - echo "$namespace $bz_count $(date +%s)" | nc grafana.ceph.com 2003 + echo "$namespace $bz_count $(date +%s)" | nc grafana.ceph.com 2003; done -#we'll eventually want to just iterate a list of BZ query URLs -#url=http://red.ht/2paAywM -#TODO auth against BZ so we get counts of hidden BZs -#namespace="bz.gmeno.ceph.any.needinfo.24hrs" +#TODO auth against BZ so we get counts of hidden BZs diff --git a/bz-mill/build/head b/bz-mill/build/head new file mode 100755 index 00000000..22e13431 --- /dev/null +++ b/bz-mill/build/head @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e +set -x + +echo "\ diff --git a/bz-mill/build/map_namespace_to_query b/bz-mill/build/map_namespace_to_query new file mode 100644 index 00000000..00ef8498 --- /dev/null +++ b/bz-mill/build/map_namespace_to_query @@ -0,0 +1,3 @@ +# BZ CSV short URL graphite metric name +http://red.ht/2oiunCH bz.gmeno.ceph.new.customer.24hrs +http://red.ht/2paAywM bz.gmeno.ceph.any.needinfo.24hrs diff --git a/bz-mill/config/definitions/bz-mill.yml b/bz-mill/config/definitions/bz-mill.yml index 111299f3..eb1f7d4c 100644 --- a/bz-mill/config/definitions/bz-mill.yml +++ b/bz-mill/config/definitions/bz-mill.yml @@ -9,5 +9,6 @@ builders: - shell: !include-raw: - - ../../build/generate_map_namespace_to_query.sh + - ../../build/head + - ../../build/map_namespace_to_query - ../../build/build