This is regarding using UDF function via kapacitor.
Is there any pointer or documentation which explains nature of argument passed to different callback defined by python UDF agent. Because these callbacks are called by kapacitor module, it is little unclear to know the behavior of each argument passed to that callback like point(), end_batch(), init() etc…
For example:
what are members of the point structure and which member are filled by whom ?
In the similar line what is batch_meta struct signifies with description about its members?
How response should be formed in different callback and Is there any callback is it mandatory to send a response back?
Any code level pointer will also be useful. I am experimenting python based UDF agent.
Here is a sample code I was trying. Intention is to know even before using the udf function in TICK script how kapacitor merge them to its environment, by calling info() & init(). Hence I haven’t mentioned anything in end_batch(), begin_batch() and point() method
udf_exa.py – The udf defining file.
import sys
import json
from kapacitor.udf.agent import Agent, Handler
import kapacitor.udf.udf_pb2 as udf_pb2