I have defined a (in my eues) simple kapacitor script
var max_ms_domain = batch
|query('Select max(query_time_ms) from MONITOR.autogen.dns_query GROUP BY domain')
.every(30s)
|log()
I have enabled the script, but it is not executed. Here is the output of curl http://localhost:9092/kapacitor/v1/tasks/dnsq
{
"link": {
"rel": "self",
"href": "/kapacitor/v1/tasks/dnsq"
},
"id": "dnsq",
"template-id": "",
"type": "batch",
"dbrps": [
{
"db": "MONITOR",
"rp": "autogen"
}
],
"script": "var max_ms_domain = batch\n |query('Select max(query_time_ms) from MONITOR.autogen.dns_query GROUP BY domain')\n .every(30s)\n |log()\n",
"vars": {},
"dot": "digraph dnsq {\ngraph [throughput=\"0.00 batches/s\"];\n\nquery1 [avg_exec_time_ns=\"0s\" batches_queried=\"0\" errors=\"0\" points_queried=\"0\" working_cardinality=\"0\" ];\nquery1 -\u003e log2 [processed=\"0\"];\n\nlog2 [avg_exec_time_ns=\"0s\" errors=\"0\" working_cardinality=\"0\" ];\n}",
"status": "enabled",
"executing": true,
"error": "",
"stats": {
"task-stats": {
"throughput": 0
},
"node-stats": {
"batch0": {
"avg_exec_time_ns": 0,
"collected": 0,
"emitted": 0,
"errors": 0,
"working_cardinality": 0
},
"log2": {
"avg_exec_time_ns": 0,
"collected": 0,
"emitted": 0,
"errors": 0,
"working_cardinality": 0
},
"query1": {
"avg_exec_time_ns": 0,
"batches_queried": 0,
"collected": 0,
"emitted": 0,
"errors": 0,
"points_queried": 0,
"working_cardinality": 0
}
}
},
"created": "2017-09-20T11:03:49.463014538Z",
"modified": "2017-09-20T11:04:39.744940359Z",
"last-enabled": "2017-09-20T11:04:35.952662834Z"
}
What am I missing?