Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InfluxDB write event listener/trigger

Reading through documentation as well as other SO posts did not help me find out either InfluxDB supports event listeners/triggers on write operations or not. Because it's meant for real-time analytics, I would like to be notified when a specific point gets inserted in a specific series. I know I could use Continuous Queries but in some cases when data is inserted at much lower, non-constant rates, running CQs on non-changed queries become useless.

The perfect scenario would be to use some event listeners/triggers and query the data when it changes. Does InfluxDB supports it or I have to implement this feature manually?

like image 849
Andrei Stalbe Avatar asked Oct 02 '15 10:10

Andrei Stalbe


3 Answers

Influxdb supports HTTP/HTTPs and UDP subscriptions. Subscribers receive a copy of any new data written to influxdb, and can do what they wish with that data. This is how Kapacitor (referenced in other answers) works.

You can learn more about subscriptions here

Depending on your needs it may be easier to use Kapacitor or code your own subscriber, though I haven't found documentation regarding the subscription APIs.

like image 174
davegravy Avatar answered Nov 13 '22 08:11

davegravy


This sounds to me like something you could use InfluxData's Kapacitor for. It's one of their newer products.

Kapacitor is a data processing engine. It can process both stream (subscribe realtime) and batch (bulk query) data from InfluxDB. Kapacitor lets you define custom logic to process alerts with dynamic thresholds, match metrics for patterns, compute statistical anomalies, etc.

like image 3
tkit Avatar answered Nov 13 '22 07:11

tkit


InfluxDB does not have any triggers or alerting as part of the database. It's a clear need for the community and InfluxData is working on ways to address the need, but they are not yet available.

like image 2
beckettsean Avatar answered Nov 13 '22 08:11

beckettsean