On Wednesday, October 19, 2016 at 11:45:21 PM UTC-4, [email protected] wrote: > Hello everyone, > > I have a question concerning specifying the db name in the Kapacitor exec > node. > I have a tick script which calls a python script using the .exec node. > The tick script looks like this: > > stream > |from() > .measurement('a') > |where(lambda: "val"=="1") > |alert() > .crit(lambda:TRUE) > .exec('/usr/bin/python','sample.py') > > This code works on multiple databases that contain the measurement 'a'. > In sample.py, I am reading the stdin and getting the data passed from the > tick script as a JSON object. > However, the JSON object doesn't contain the database name. In other word, in > sample.py, I can't know if the data came from db1 or db2. > > Is there a way for sample.py to know from which database the streamed data > originated? > Is there a way to pass the database name as an argument like: > .exec('/usr/bin/python','sample.py','<database name variable>')? > > Thank you for you help
I forgot to mention that I am using InfluxDB v1.0.2 and Kapacitor v1. Thank you -- 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/818a9606-84b0-442c-85be-b103da6c935c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
