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
--
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/79afedc6-199c-45ca-9934-ae648f1f8e2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.