Glad you got things working. Just a quick comment on why the task doesn't 
overwrite the dbrp value specified when defining the task.

A task has a list of dbrps that it can access. This list is provided via 
the `-dbrp` flags when creating the task. Within the TICKscript itself you 
can select which data you want to process. The use case is a task consumes 
data from two or more  databases, to join them or something similar. Within 
the task the data from each database is selected and then joined etc.

For example:

var db1 = stream
    |from()
        .database('db1')
        .measurement('m')

var db2 = stream
    |from()
        .database('db2')
        .measurement('m')

db1
    |join(db2)
      ...

Then to define the above task you would `kapacitor define test -type stream 
-tick path.tick -dbrp db1.deafult -dbrp db2.default`.

In summary the task definition needs to define all the databases retention 
policies the task is going to consume, then within the task you can select 
subsets of that data.



On Tuesday, August 9, 2016 at 6:09:07 PM UTC-6, Kristopher Cieplak wrote:
>
> Hi Ross, 
>
> Thanks...
>
> I think I figured out what I did wrong.  When I initially defined the 
> "task" I incorrectly added the -dbrp "ion.defualt" **Note incorrect spelling
> Since I am setting the retention policy in the task itself, I assume I 
> should not add the -dbrp option, but it seems that is required..  I would 
> have expected the task to simply override the value, but it does not seem 
> to be that way.
>
> After fixing the "defualt" to "default" I can now see the the alert logs, 
> and I am unblocked.
>
> Thanks!
>
> To answer your questions...
>
> I am running influxdb 0.13.0 and kapacitor version 0.13.1-1
>
> # ./kapacitor show test
> ID: test
> Error:
> Type: stream
> Status: enabled
> Executing: true
> Created: 09 Aug 16 18:17 UTC
> Modified: 09 Aug 16 23:57 UTC
> LastEnabled: 09 Aug 16 23:57 UTC
> Databases Retention Policies: ["ion"."defualt"]
> TICKscript:
> stream
>     |from()
>         .database('ion')
>         .retentionPolicy('default')
>         .measurement('eswriter.current_lag.timer.count')
>     |alert()
>         .crit(lambda: "value" != 42)
>         .log('/tmp/alerts.log')
>
>
> DOT:
> digraph test {
> graph [throughput="0.00 points/s"];
>
> stream0 [avg_exec_time_ns="0" ];
> stream0 -> from1 [processed="0"];
>
> from1 [avg_exec_time_ns="0" ];
> from1 -> alert2 [processed="0"];
>
> alert2 [alerts_triggered="0" avg_exec_time_ns="0" crits_triggered="0" 
> infos_triggered="0" oks_triggered="0" warns_triggered="0" ];
> }
>
> There are definately points being written to the database "ion" as I have 
> lots of graphs in grafana for that measurement.
>
> On Tuesday, 9 August 2016 17:10:52 UTC-4, Ross McDonald wrote:
>>
>> What versions of both InfluxDB and Kapacitor are you running? 
>>
>> And are you sure points are being written to the `ion` database? What 
>> does the output of a `kapacitor show test` look like?
>>
>> Thanks,
>> Ross
>>
>> On Tue, Aug 9, 2016 at 2:15 PM, Kristopher Cieplak <[email protected]> 
>> wrote:
>>
>>> I cannot seem to get any data from influxdb to kapacitor via the 
>>> subscription.
>>>
>>> I have confirmed that I can get data to the kapacitor server, and create 
>>> a bad data over the connection.
>>>
>>> ** On influxdb node
>>> echo foobar | nc -u 10.0.36.176 37661
>>>
>>>
>>> ** On kapacitor node
>>> [udp:ion.default] 2016/08/09 19:04:47 E! Failed to parse points: unable 
>>> to parse 'foobar': missing fields
>>>
>>> So it looks like kapacitor is listening on the correct UDP port, and I 
>>> can communicate to it, i.e no firewall or security rules in the way.
>>>
>>> My subscription seems to be correct.
>>>
>>> name: ion
>>> ---------
>>> retention_policy name mode destinations
>>> default kapacitor-a45324cf-927d-4bda-822a-24716624b5ca ANY [udp://
>>> 10.0.36.176:37661]
>>>
>>>
>>> If I try to record data on the stream it simply hangs and records 
>>> nothing, i.e. 0bytes of data
>>> ./kapacitor record stream -task test -duration 5s
>>> ./kapacitor list recordings
>>> ID                                      Type    Status    Size      Date
>>> cb26ee7e-9a55-484c-97ce-e63a3e517ca1    stream  running   0 B       09 
>>> Aug 16 19:13 UTC
>>>
>>> Any ideas on how I can debug this?  I need to figure out why I do not 
>>> seem to get data streaming from Influxdb to Kapacitor.
>>>
>>> Thanks
>>>
>>> -- 
>>> Remember to include the InfluxDB version number with all issue reports
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "InfluxDB" 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/e25336bc-10be-4113-8399-d650a950e498%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/influxdb/e25336bc-10be-4113-8399-d650a950e498%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" 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/f3de98d6-8c6c-4afb-8ff4-53912cb9fa72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to