Julien,

Deadman is the answer here, it is designed with this exact use case in 
mind. I have replied to your other post, we should be able to get it 
working shortly. 



On Monday, November 7, 2016 at 9:06:11 AM UTC-7, Julien Ammous wrote:
>
> Thanks for your reply, having COUNT() return null makes no sense to mean 
> but I suppose that's a design choice, it does not explains my second issue 
> though, is there any way to do what I wanted ?
>
> I tried this since deadman does not appear to work either for me (my other 
> post on the mailing list), I initially hoped that kapacitor might help me 
> remove my own code to raise the alert but I doubt that more and more as I 
> play with it... :(
>
>
> On 7 November 2016 at 16:38, Sean Beckett <[email protected] 
> <javascript:>> wrote:
>
>> COUNT returns null, not zero, if there are no matching points: 
>> https://github.com/influxdata/influxdb/issues/6412
>>
>> On Mon, Nov 7, 2016 at 3:49 AM, Julien Ammous <[email protected] 
>> <javascript:>> wrote:
>>
>>> Hi,
>>> I still trying to figure out how tick scripts works, my latest attempt 
>>> is this:
>>>
>>> batch
>>> |query('select COUNT(*) from metrics.raw.loss')
>>>   .period(10s)
>>>   .every(10s)
>>>   .groupBy(time(10s))
>>> |httpOut('out')
>>>
>>> I also tried that way:
>>>
>>> batch
>>> |query('select * from metrics.raw.loss')
>>>   .period(10s)
>>>   .every(10s)
>>> |count('value')
>>> |httpOut('out')
>>>
>>>
>>> In both cases I get weird results...
>>>
>>> My first issue is that the http endpoint contains nothing as long as no 
>>> points are returned by the query, which makes no sense to me since I am 
>>> querying the count not the data themselves
>>>
>>> The second issue is that once 1 or more row are available the http page 
>>> is updated and that is fine but started from then the page will never be 
>>> updated again, let's say I insert a row and wait, I will get a correct json 
>>> with a count value of 1, now I insert two other rows and wait and... 
>>> nothing, the http output still says count 1 and the timestamp didn't change 
>>> althought I saw the query executed on the influxdb server console.
>>>
>>> That's really frustrating, a lot of hidden things seems to happen behind 
>>> the scene and that's a real pain to debug, the task http endpoint helps a 
>>> bit but not that much...
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -- 
>>> Remember to include the version number!
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "InfluxData" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> To post to this group, send email to [email protected] 
>>> <javascript:>.
>>> Visit this group at https://groups.google.com/group/influxdb.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/influxdb/e28f42ff-89cf-4d28-a0b1-cd58fae11be9%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/influxdb/e28f42ff-89cf-4d28-a0b1-cd58fae11be9%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Sean Beckett
>> Director of Support and Professional Services
>> InfluxDB
>>
>> -- 
>> Remember to include the version number!
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "InfluxData" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/influxdb/S6rIMs3Xeys/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/influxdb.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/influxdb/CALGqCvM-AU5hLW-LAXcDhdHZq%2BwBKcq-wbqf_thW43Y80GpzFQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/influxdb/CALGqCvM-AU5hLW-LAXcDhdHZq%2BwBKcq-wbqf_thW43Y80GpzFQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/a6445f4a-dcab-4e19-9a2e-3415c01fff82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to