Closed faxm0dem closed 8 years ago
config:
(let [elastic (samplerr/connect "http://ccosvms0126:9200") index (index) index-prefix ".samplerr-" alias-prefix "samplerr-" cfunc [{:func samplerr/average :name "avg"} {:func samplerr/minimum :name "min"} {:func samplerr/maximum :name "max"}] archives [{:tf "YYYY.MM.dd" :step (t/seconds 15) :ttl (t/days 1) :cfunc [{:name "avg" :func samplerr/average}]} {:tf "YYYY.MM" :step (t/minutes 15) :ttl (t/months 1) :cfunc cfunc} {:tf "YYYY" :step (t/minutes 240) :ttl (t/years 5) :cfunc cfunc}] rotate (samplerr/periodically-rotate {:interval (t/hours 1) :conn elastic :index-prefix index-prefix :alias-prefix alias-prefix :archives archives}) purge (samplerr/periodically-purge {:interval (t/days 1) :conn elastic :index-prefix index-prefix :archives archives}) persist (batch 10000 20 (samplerr/persist {:index-prefix index-prefix :index-type "samplerr" :conn elastic}))] (streams (by [:host :service] (samplerr/down archives persist))) rotate purge)
It seems count is always 1 for cfunc:avg for the middle archive for some odd reason. The 1st and 3d archives look ok:
count
cfunc:avg
$ D=$(date +%s); D1=$(((D-3600)*1000)); D2=$((D1+36000000)); curl 0:9200/.samplerr-2016.08/_search'?pretty' -d '{"size":100, "qu ery":{"bool":{"must":[{"term":{"cfunc":"avg"}},{"range":{"@timestamp":{"gt": '$D1'}}},{"term":{"host":"ccsvli85.in2p3.fr"}},{"term":{"service":"load/loa d-relative/midterm/avg/900"}}]}},sort:[{"@timestamp":"asc"}]}' | grep count "count" : 1, "count" : 1, "count" : 1, "count" : 1, $ D=$(date +%s); D1=$(((D-360000)*1000)); D2=$((D1+36000000)); curl 0:9200/.samplerr-2016/_search'?pretty' -d '{"size":100, "query":{"bool":{"must":[{"term":{"cfunc":"avg"}},{"range":{"@timestamp":{"gt": '$D1'}}},{"term":{"host":"ccsvli85.in2p3.fr"}},{"term":{"service":"load/load-relative/midterm/avg/14400"}}]}},sort:[{"@timestamp":"asc"}]}' | grep count "count" : 956, "count" : 956, "count" : 956, "count" : 956, "count" : 956, "count" : 956, "count" : 956, $ D=$(date +%s); D1=$(((D-360000)*1000)); D2=$((D1+36000000)); curl 0:9200/.samplerr-2016/_search'?pretty' -d '{"size":100, "que ry":{"bool":{"must":[{"term":{"cfunc":"avg"}},{"range":{"@timestamp":{"gt": '$D1'}}},{"term":{"host":"ccsvli85.in2p3.fr"}},{"term":{"service":"load/load -relative/midterm/avg/14400"}}]}},sort:[{"@timestamp":"asc"}]}' | grep count (reverse-i-search)`': fwernli@ccosvms0123/~(0)$ D=$(date +%s); D1=$(((D-3600)*1000)); D2=$((D1+36000000)); curl 0:9200/.samplerr-2016.08.24/_search'?pretty' -d '{"size":100, "query":{"bool":{"must":[{"term":{"cfunc":"avg"}},{"range":{"@timestamp":{"gt": '$D1'}}},{"term":{"host":"ccsvli85.in2p3.fr"}},{"term":{"service":"load/ load-relative/midterm/avg/15"}}]}},sort:[{"@timestamp":"asc"}]}' | grep count "count" : 1, "count" : 1, "count" : 1, "count" : 1, "count" : 1, "count" : 1, "count" : 1,
fixed by 0.3.3
config:
It seems
count
is always 1 forcfunc:avg
for the middle archive for some odd reason. The 1st and 3d archives look ok: