raintank / graphite-kairosdb

Graphite-Api finder plugin for Kairosdb
Apache License 2.0
10 stars 4 forks source link

oldest point in returned series often null #2

Closed Dieterbe closed 9 years ago

Dieterbe commented 9 years ago

i've had the devstack running for several minutes, with a script like this:

#!/bin/bash
offset=$1
now=$(date +%s)
echo -n "now "
echo $now
until=$((now-offset))
from=$((until-20))
echo $from "-->" $until "(now minus $offset)"
url="http://localhost:32803/render/?format=json&from=$from&target=dieter_plaetinck_be.*.network.ping.error_state&until=$until"
curl -s "$url" -H 'X-Org-Id: 1' | python -mjson.tool #| wc -l

roughly half of the time the oldest point in the returned series is null for some reason.

dieter@dieter-m6800 ~ ./test-graphite-points.sh 8
now 1432159847
1432159819 --> 1432159839 (now minus 8)
[
    {
        "datapoints": [
            [
                null,
                1432159819
            ],
            [
                0,
                1432159829
            ],
            [
                0,
                1432159839
            ]
        ],
        "target": "dieter_plaetinck_be.publictest.network.ping.error_state"
    }
]
Dieterbe commented 9 years ago

the offset arg to the script doesn't seem to matter, i tried with 10, 40, 50, 100, 400, 10000. all returned null for the first point.

Dieterbe commented 9 years ago

btw the results of these queries exhibit the exact same behaviors:

"http://localhost:32803/render/?format=json&from=$from&target=sum(dieter_plaetinck_be.*.network.ping.error_state)&until=$until"

"http://localhost:32803/render/?format=json&from=$from&target=dieter_plaetinck_be.*.network.ping.error_state&until=$until"