Trying to use the internal stats published via builtin _kapacitor database, but not getting any output.
Attached is the tick script we’re using to try and output the stats to a file for the sake of understanding what the data looks like.
stream
|from().database(’_kapacitor’).retentionPolicy(‘default’)
|alert().info(lambda: 0 == 0).log(’/tmp/kap_stats.log’)
We’re instantiating it with the following commands
kapacitor define stats -dbrp _kapacitor.default -tick stats.tick -type stream
kapacitor enable stats
Also, here’s a snapshot of the task via kapacitor show stats
ID: stats
Error:
Template:
Type: stream
Status: enabled
Executing: true
Created: 03 Apr 17 22:21 UTC
Modified: 03 Apr 17 22:22 UTC
LastEnabled: 03 Apr 17 22:22 UTC
Databases Retention Policies: ["_kapacitor".“default”]
TICKscript:
stream
|from()
.database(’_kapacitor’)
.retentionPolicy(‘default’)
|alert()
.info(lambda: 0 == 0)
.log(’/tmp/kap_stats.log’)
DOT:
digraph stats {
graph [throughput=“0.00 points/s”];
stream0 [avg_exec_time_ns=“0s” ];
stream0 -> from1 [processed=“0”];
from1 [avg_exec_time_ns=“0s” ];
from1 -> alert2 [processed=“0”];
alert2 [alerts_triggered=“0” avg_exec_time_ns=“0s” crits_triggered=“0” infos_triggered=“0” oks_triggered=“0” warns_triggered=“0” ];
}
Any hints would be appreciated. Also, I verified that /etc/kapacitor/kapacitor.conf has the stats section enabled.