influxdata / influxdata/kapacitor
Kapacitor not recording data stream and alerts not visible in kapacitor log
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
# Kapacitor not recording data stream and alerts not visible in kapacitor log
### I have a Fedora24(CentOS) vm in windows10 host.I followed the article [here](https://github.com/influxdata/kapacitor/issues/648).
Following are the details
I tried with the exact same version of Influxdb,kapacitor and telegraf as was mentioned in the article but it seemed like many changes were made in kapacitor 1.0 beta later like
the old task.db database file since it is still needed to do the migration.
[storage]
boltdb = "/var/lib/kapacitor/kapacitor.db"
as I am receiving error exactly at this point.
1.First I tried with
Software Versions:
InfluxDB - 0.13.0
Telegraf - 0.13.1
Kapacitor - 0.13.1
Later on I uninstalled Kapacitor -0.13.1 and installed 1.1.1
Here are the configuration files
1.influxdb.conf
```
logging-enabled = true
pprof-enabled = false
[admin]
enabled = true
bind-address = ":8083"
https-enabled = false
https-certificate = "/etc/ssl/influxdb.pem"
[http]
enabled = true
bind-address = ":8086"
auth-enabled = false
log-enabled = true
write-tracing = false
logging-enabled = true
pprof-enabled = false
[admin]
enabled = true
bind-address = ":8083"
https-enabled = false
https-certificate = "/etc/ssl/influxdb.pem"
[http]
enabled = true
bind-address = ":8086"
auth-enabled = false
log-enabled = true
write-tracing = false
pprof-enabled = false
https-enabled = false
https-certificate = "/etc/ssl/influxdb.pem"
max-row-limit = 10000
[subscriber]
enabled = true
http-timeout = "30s"
[[udp]]
enabled = false
[continuous_queries]
log-enabled = true
enabled = true
Other details are omitted as of now
```
2.telegraf.conf
```
[agent]
interval = "1s"
[outputs]
[outputs.influxdb]
urls = ["http://localhost:8086"]
database = "kapacitor_example"
user_agent = "telegraf"
[cpu]
percpu = false
totalcpu = true
drop = ["cpu_time"]
```
3.Kapacitor.conf
```
hostname = "localhost"
data_dir = "/var/lib/kapacitor"
default-retention-policy = ""
[http]
bind-address = ":9092"
auth-enabled = false
log-enabled = true
write-tracing = false
pprof-enabled = false
https-enabled = false
hostname = "localhost"
data_dir = "/var/lib/kapacitor"
default-retention-policy = ""
[http]
bind-address = ":9092"
auth-enabled = false
log-enabled = true
write-tracing = false
pprof-enabled = false
https-enabled = false
https-certificate = "/etc/ssl/kapacitor.pem"
[config-override]
enabled = true
[logging]
file = "/var/log/kapacitor/kapacitor.log"
level = "INFO"
[replay]
dir = "/var/lib/kapacitor/replay"
[[influxdb]]
default = true
name = "localhost"
urls = ["http://localhost:8086"]
username = ""
password = ""
ssl-ca = ""
ssl-cert = ""
ssl-key = ""
insecure-skip-verify = false
timeout = "0"
disable-subscriptions = false
udp-buffer = 1000
udp-read-buffer = 0
startup-timeout = "0"
startup-timeout = "5m"
disable-subscriptions = false
subscription-protocol = "http"
```
4.cpu_alert.tick
```
stream
|from()
.measurement('cpu')
|alert()
.crit(lambda: "usage_idle" < 90 )
.log('/tmp/cpu_idle_alerts.log')
```
I followed [https://docs.influxdata.com/kapacitor/v0.12/introduction/getting_started/](url) for installation.
### Steps to reproduce
```
kapacitor define cpu_alert -type stream -tick ~/cpu_alert.tick -dbrp kapacitor_example.default
$ kapacitor show cpu_alert
ID: cpu_alert
Error:
Template:
Type: stream
Status: enabled
Executing: true
Created: 10 Dec 16 13:44 PST
Modified: 11 Dec 16 09:39 PST
LastEnabled: 11 Dec 16 09:39 PST
Databases Retention Policies: ["kapacitor_example"."default"]
TICKscript:
stream
|from()
.measurement('cpu')
|alert()
.crit(lambda: "usage_idle" < 90)
.log('/tmp/cpu_idle_alerts.log')
DOT:
digraph cpu_alert {
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" ];
[ticku@localhost ~]$ kapacitor record stream -task cpu_alert -duration 20s -no-wait
922d81ca-9375-413c-9ffb-7c8fdd68a360
[ticku@localhost ~]$ kapacitor list recordings 922d81ca-9375-413c-9ffb-7c8fdd68a360
ID Type Status Size Date
922d81ca-9375-413c-9ffb-7c8fdd68a360 stream running 0 B 11 Dec 16 09:46 PST
[ticku@localhost ~]$ sudo cat /var/log/kapacitor/kapacitor.log
[run] 2016/12/10 18:16:39 I! Kapacitor starting, version 1.1.1, branch master, commit d1e0173df2b9f44c64b7bbf1a120a1bdb3ef683e
[run] 2016/12/10 18:16:39 I! Go version go1.7.4
[srv] 2016/12/10 18:16:39 I! Kapacitor hostname: localhost
[srv] 2016/12/10 18:16:39 I! ClusterID: e364dd76-166e-4e1c-bbe5-06c1c24aac1e ServerID: e859317a-0ea9-4272-a0bd-3b8ce8eeec03
[task_master:main] 2016/12/10 18:16:39 I! opened
[task_store] 2016/12/10 18:16:39 W! **could not open old boltd for task_store. Not performing migration. Remove the `task_store.dir` configuration to disable migration.**
[task_master:main] 2016/12/10 18:16:39 I! Started task: cpu_alert
[smtp] 2016/12/10 18:16:39 I! Starting SMTP service
[stats] 2016/12/10 18:16:39 I! opened service
[httpd] 2016/12/10 18:16:39 I! Starting HTTP service
[httpd] 2016/12/10 18:16:39 I! Authentication enabled: false
[httpd] 2016/12/10 18:16:39 I! Listening on HTTP: [::]:9092
[run] 2016/12/10 18:16:39 I! Listening for signals
[httpd] ::1 - - [10/Dec/2016:18:17:21 -0800] "GET /kapacitor/v1/debug/vars HTTP/1.1" 200 1851 "-" "KapacitorClient" f264449f-bf47-11e6-8001-000000000000 4124
[httpd] ::1 - - [10/Dec/2016:18:17:55 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 612 "-" "KapacitorClient" 06b41a2c-bf48-11e6-8002-000000000000 3782
[httpd] ::1 - - [10/Dec/2016:18:17:55 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 614 "-" "KapacitorClient" 06b4d137-bf48-11e6-8003-000000000000 17560
[task_master:main] 2016/12/10 18:17:55 I! Stopped task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:17:55 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 440 "-" "KapacitorClient" 06b79c77-bf48-11e6-8004-000000000000 12599
[task_master:main] 2016/12/10 18:17:55 I! Started task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:17:55 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 600 "-" "KapacitorClient" 06ba122a-bf48-11e6-8005-000000000000 23309
[httpd] ::1 - - [10/Dec/2016:18:18:03 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=type&fields=status&fields=executing&fields=dbrps&limit=100&offset=0&pattern=cpu%2A&replay-id=&script-format=formatted HTTP/1.1" 200 201 "-" "KapacitorClient" 0bc55423-bf48-11e6-8006-000000000000 2564
[httpd] ::1 - - [10/Dec/2016:18:18:04 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 600 "-" "KapacitorClient" 0c497bab-bf48-11e6-8007-000000000000 25805
[httpd] ::1 - - [10/Dec/2016:18:18:21 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=link&limit=100&offset=0&pattern=cpu_alert&replay-id=&script-format=formatted HTTP/1.1" 200 124 "-" "KapacitorClient" 166f8ef7-bf48-11e6-8008-000000000000 1401
[httpd] ::1 - - [10/Dec/2016:18:18:21 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 609 "-" "KapacitorClient" 16700e1c-bf48-11e6-8009-000000000000 12661
[httpd] ::1 - - [10/Dec/2016:18:20:07 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 609 "-" "KapacitorClient" 554f65cc-bf48-11e6-800a-000000000000 14409
[run] 2016/12/10 18:26:14 I! Signal received, initializing clean shutdown...
[run] 2016/12/10 18:26:14 I! Waiting for clean shutdown...
[task_master:main] 2016/12/10 18:26:14 I! Stopped task: cpu_alert
[smtp] 2016/12/10 18:26:14 I! Closing SMTP service
[stats] 2016/12/10 18:26:14 I! closed service
[httpd] 2016/12/10 18:26:14 I! Closed HTTP service
[task_master:main] 2016/12/10 18:26:14 I! closed
[run] 2016/12/10 18:26:14 I! server shutdown completed
[run] 2016/12/10 18:26:17 I! Kapacitor starting, version 1.1.1, branch master, commit d1e0173df2b9f44c64b7bbf1a120a1bdb3ef683e
[run] 2016/12/10 18:26:17 I! Go version go1.7.4
[srv] 2016/12/10 18:26:17 I! Kapacitor hostname: localhost
[srv] 2016/12/10 18:26:17 I! ClusterID: e364dd76-166e-4e1c-bbe5-06c1c24aac1e ServerID: e859317a-0ea9-4272-a0bd-3b8ce8eeec03
[task_master:main] 2016/12/10 18:26:17 I! opened
[task_store] 2016/12/10 18:26:17 W! could not open old boltd for task_store. Not performing migration. Remove the `task_store.dir` configuration to disable migration.
[task_master:main] 2016/12/10 18:26:18 I! Started task: cpu_alert
[smtp] 2016/12/10 18:26:18 I! Starting SMTP service
[stats] 2016/12/10 18:26:18 I! opened service
[httpd] 2016/12/10 18:26:18 I! Starting HTTP service
[httpd] 2016/12/10 18:26:18 I! Authentication enabled: false
[httpd] 2016/12/10 18:26:18 I! Listening on HTTP: [::]:9092
[run] 2016/12/10 18:26:18 I! Listening for signals
[httpd] ::1 - - [10/Dec/2016:18:26:35 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 609 "-" "KapacitorClient" 3d139b0e-bf49-11e6-8001-000000000000 19523
[httpd] ::1 - - [10/Dec/2016:18:26:35 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 612 "-" "KapacitorClient" 3d1714ff-bf49-11e6-8002-000000000000 25929
[task_master:main] 2016/12/10 18:26:36 I! Stopped task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:26:36 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 438 "-" "KapacitorClient" 3d1b490d-bf49-11e6-8003-000000000000 20700
[task_master:main] 2016/12/10 18:26:36 I! Started task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:26:36 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 599 "-" "KapacitorClient" 3d1e8e28-bf49-11e6-8004-000000000000 25508
[httpd] ::1 - - [10/Dec/2016:18:26:49 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=link&limit=100&offset=0&pattern=cpu_alert&replay-id=&script-format=formatted HTTP/1.1" 200 124 "-" "KapacitorClient" 45614b9a-bf49-11e6-8005-000000000000 7634
[httpd] ::1 - - [10/Dec/2016:18:26:49 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 610 "-" "KapacitorClient" 45629fad-bf49-11e6-8006-000000000000 20701
[httpd] ::1 - - [10/Dec/2016:18:27:04 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 610 "-" "KapacitorClient" 4e24e582-bf49-11e6-8007-000000000000 16534
[run] 2016/12/10 18:31:11 I! Signal received, initializing clean shutdown...
[run] 2016/12/10 18:31:11 I! Waiting for clean shutdown...
[task_master:main] 2016/12/10 18:31:11 I! Stopped task: cpu_alert
[smtp] 2016/12/10 18:31:11 I! Closing SMTP service
[stats] 2016/12/10 18:31:11 I! closed service
[httpd] 2016/12/10 18:31:11 I! Closed HTTP service
[task_master:main] 2016/12/10 18:31:11 I! closed
[run] 2016/12/10 18:31:11 I! server shutdown completed
[run] 2016/12/10 18:32:01 I! Kapacitor starting, version 1.1.1, branch master, commit d1e0173df2b9f44c64b7bbf1a120a1bdb3ef683e
[run] 2016/12/10 18:32:01 I! Go version go1.7.4
[srv] 2016/12/10 18:32:01 I! Kapacitor hostname: localhost
[srv] 2016/12/10 18:32:01 I! ClusterID: e364dd76-166e-4e1c-bbe5-06c1c24aac1e ServerID: e859317a-0ea9-4272-a0bd-3b8ce8eeec03
[task_master:main] 2016/12/10 18:32:01 I! opened
[task_store] 2016/12/10 18:32:01 W! could not open old boltd for task_store. Not performing migration. Remove the `task_store.dir` configuration to disable migration.
[task_master:main] 2016/12/10 18:32:01 I! Started task: cpu_alert
[smtp] 2016/12/10 18:32:01 I! Starting SMTP service
[stats] 2016/12/10 18:32:01 I! opened service
[httpd] 2016/12/10 18:32:01 I! Starting HTTP service
[httpd] 2016/12/10 18:32:01 I! Authentication enabled: false
[httpd] 2016/12/10 18:32:01 I! Listening on HTTP: [::]:9092
[run] 2016/12/10 18:32:01 I! Listening for signals
[httpd] ::1 - - [10/Dec/2016:18:32:14 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 610 "-" "KapacitorClient" 06a0858c-bf4a-11e6-8001-000000000000 3791
[httpd] ::1 - - [10/Dec/2016:18:32:20 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 610 "-" "KapacitorClient" 0a602e3d-bf4a-11e6-8002-000000000000 8258
[httpd] ::1 - - [10/Dec/2016:18:32:20 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 611 "-" "KapacitorClient" 0a6197b0-bf4a-11e6-8003-000000000000 14542
[task_master:main] 2016/12/10 18:32:20 I! Stopped task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:32:20 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 438 "-" "KapacitorClient" 0a641f42-bf4a-11e6-8004-000000000000 9198
[task_master:main] 2016/12/10 18:32:20 I! Started task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:32:20 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 600 "-" "KapacitorClient" 0a65ca90-bf4a-11e6-8005-000000000000 38318
[httpd] ::1 - - [10/Dec/2016:18:32:24 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 600 "-" "KapacitorClient" 0cb42c9f-bf4a-11e6-8006-000000000000 9891
[httpd] ::1 - - [10/Dec/2016:18:32:28 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=link&limit=100&offset=0&pattern=cpu_alert&replay-id=&script-format=formatted HTTP/1.1" 200 124 "-" "KapacitorClient" 0f6127b7-bf4a-11e6-8007-000000000000 2811
[httpd] ::1 - - [10/Dec/2016:18:32:28 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 610 "-" "KapacitorClient" 0f620002-bf4a-11e6-8008-000000000000 16844
[run] 2016/12/10 18:38:28 I! Signal received, initializing clean shutdown...
[run] 2016/12/10 18:38:28 I! Waiting for clean shutdown...
[task_master:main] 2016/12/10 18:38:28 I! Stopped task: cpu_alert
[smtp] 2016/12/10 18:38:28 I! Closing SMTP service
[stats] 2016/12/10 18:38:28 I! closed service
[httpd] 2016/12/10 18:38:28 I! Closed HTTP service
[task_master:main] 2016/12/10 18:38:28 I! closed
[run] 2016/12/10 18:38:28 I! server shutdown completed
[run] 2016/12/10 18:38:52 I! Kapacitor starting, version 1.1.1, branch master, commit d1e0173df2b9f44c64b7bbf1a120a1bdb3ef683e
[run] 2016/12/10 18:38:52 I! Go version go1.7.4
[srv] 2016/12/10 18:38:52 I! Kapacitor hostname: localhost
[srv] 2016/12/10 18:38:52 I! ClusterID: e364dd76-166e-4e1c-bbe5-06c1c24aac1e ServerID: e859317a-0ea9-4272-a0bd-3b8ce8eeec03
[task_master:main] 2016/12/10 18:38:52 I! opened
[task_store] 2016/12/10 18:38:52 W! could not open old boltd for task_store. Not performing migration. Remove the `task_store.dir` configuration to disable migration.
[task_master:main] 2016/12/10 18:38:52 I! Started task: cpu_alert
[smtp] 2016/12/10 18:38:52 I! Starting SMTP service
[stats] 2016/12/10 18:38:52 I! opened service
[httpd] 2016/12/10 18:38:52 I! Starting HTTP service
[httpd] 2016/12/10 18:38:52 I! Authentication enabled: false
[httpd] 2016/12/10 18:38:52 I! Listening on HTTP: [::]:9092
[run] 2016/12/10 18:38:52 I! Listening for signals
[httpd] ::1 - - [10/Dec/2016:18:39:13 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 610 "-" "KapacitorClient" 0090d939-bf4b-11e6-8001-000000000000 4844
[httpd] ::1 - - [10/Dec/2016:18:39:13 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 610 "-" "KapacitorClient" 0091c034-bf4b-11e6-8002-000000000000 24413
[task_master:main] 2016/12/10 18:39:13 I! Stopped task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:39:13 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 437 "-" "KapacitorClient" 0095fb86-bf4b-11e6-8003-000000000000 16514
[task_master:main] 2016/12/10 18:39:13 I! Started task: cpu_alert
[httpd] ::1 - - [10/Dec/2016:18:39:13 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 600 "-" "KapacitorClient" 0098b80b-bf4b-11e6-8004-000000000000 26238
[httpd] ::1 - - [10/Dec/2016:18:39:20 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=link&limit=100&offset=0&pattern=cpu_alert&replay-id=&script-format=formatted HTTP/1.1" 200 124 "-" "KapacitorClient" 048759ae-bf4b-11e6-8005-000000000000 1720
[httpd] ::1 - - [10/Dec/2016:18:39:20 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 611 "-" "KapacitorClient" 0487d50f-bf4b-11e6-8006-000000000000 8508
[httpd] ::1 - - [10/Dec/2016:18:39:24 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 611 "-" "KapacitorClient" 0707ad3e-bf4b-11e6-8007-000000000000 14243
[httpd] ::1 - - [11/Dec/2016:09:39:04 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 611 "-" "KapacitorClient" b57659a9-bfc8-11e6-8008-000000000000 37256
[httpd] ::1 - - [11/Dec/2016:09:39:04 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 615 "-" "KapacitorClient" b57dca07-bfc8-11e6-8009-000000000000 35760
[task_master:main] 2016/12/11 09:39:04 I! Stopped task: cpu_alert
[httpd] ::1 - - [11/Dec/2016:09:39:04 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 441 "-" "KapacitorClient" b58356b2-bfc8-11e6-800a-000000000000 19168
[task_master:main] 2016/12/11 09:39:04 I! Started task: cpu_alert
[httpd] ::1 - - [11/Dec/2016:09:39:04 -0800] "PATCH /kapacitor/v1/tasks/cpu_alert HTTP/1.1" 200 602 "-" "KapacitorClient" b5865a7c-bfc8-11e6-800b-000000000000 21753
[httpd] ::1 - - [11/Dec/2016:09:42:35 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=type&fields=status&fields=executing&fields=dbrps&limit=100&offset=0&pattern=cp%2A&replay-id=&script-format=formatted HTTP/1.1" 200 201 "-" "KapacitorClient" 3342378a-bfc9-11e6-800c-000000000000 15366
[httpd] ::1 - - [11/Dec/2016:09:42:35 -0800] "GET /kapacitor/v1/tasks/cpu_alert?dot-view=attributes&replay-id=&script-format=formatted HTTP/1.1" 200 602 "-" "KapacitorClient" 33ced0aa-bfc9-11e6-800d-000000000000 5718
[httpd] ::1 - - [11/Dec/2016:09:44:37 -0800] "POST /kapacitor/v1/recordings/stream HTTP/1.1" 201 214 "-" "KapacitorClient" 7bfc88ff-bfc9-11e6-800e-000000000000 37514
[httpd] ::1 - - [11/Dec/2016:09:44:59 -0800] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=type&fields=status&fields=executing&fields=dbrps&limit=100&offset=0&pattern=fccd05f3-be59-4e93-83db-67027ecd4a12&replay-id=&script-format=formatted HTTP/1.1" 200 43 "-" "KapacitorClient" 8913636c-bfc9-11e6-800f-000000000000 1115
[httpd] ::1 - - [11/Dec/2016:09:46:39 -0800] "POST /kapacitor/v1/recordings/stream HTTP/1.1" 201 213 "-" "KapacitorClient" c4f25780-bfc9-11e6-8010-000000000000 11718
[httpd] ::1 - - [11/Dec/2016:09:46:59 -0800] "GET /kapacitor/v1/recordings?fields=type&fields=size&fields=date&fields=status&limit=100&offset=0&pattern=922d81ca-9375-413c-9ffb-7c8fdd68a360 HTTP/1.1" 200 223 "-" "KapacitorClient" d0d0fa26-bfc9-11e6-8011-000000000000 645
[ticku@localhost ~]$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.13.0
InfluxDB shell version: 0.13.0
> show subscriptions
name: telegraf
--------------
retention_policy name mode destinations
default kapacitor-e364dd76-166e-4e1c-bbe5-06c1c24aac1e ANY [http://localhost:9092]
name: _internal
---------------
retention_policy name mode destinations
monitor kapacitor-e364dd76-166e-4e1c-bbe5-06c1c24aac1e ANY [http://localhost:9092]
name: kapacitor_example
-----------------------
retention_policy name mode destinations
default kapacitor-e364dd76-166e-4e1c-bbe5-06c1c24aac1e ANY [http://localhost:9092]
[httpd] 2016/12/10 17:42:30 ::1 - - [10/Dec/2016:17:42:30 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 1416bc85-bf43-11e6-8032-000000000000 6.05208ms
[httpd] 2016/12/10 17:42:40 ::1 - - [10/Dec/2016:17:42:40 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 1a0b9efe-bf43-11e6-8033-000000000000 7.417738ms
[httpd] 2016/12/10 17:42:40 ::1 - - [10/Dec/2016:17:42:40 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 1a0b9fbc-bf43-11e6-8034-000000000000 10.765394ms
[httpd] 2016/12/10 17:42:50 ::1 - - [10/Dec/2016:17:42:50 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 200197ed-bf43-11e6-8036-000000000000 8.655367ms
[httpd] 2016/12/10 17:42:50 ::1 - - [10/Dec/2016:17:42:50 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 200197ed-bf43-11e6-8035-000000000000 11.39447ms
[httpd] 2016/12/10 17:43:00 ::1 - - [10/Dec/2016:17:43:00 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 25f6f89b-bf43-11e6-8037-000000000000 4.489744ms
[httpd] 2016/12/10 17:43:00 ::1 - - [10/Dec/2016:17:43:00 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 25f74eb0-bf43-11e6-8038-000000000000 4.027544ms
[httpd] 2016/12/10 17:43:10 ::1 - - [10/Dec/2016:17:43:10 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 2becdaa1-bf43-11e6-8039-000000000000 4.398767ms
[httpd] 2016/12/10 17:43:10 ::1 - - [10/Dec/2016:17:43:10 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 2bed6aa4-bf43-11e6-803a-000000000000 2.589761ms
[httpd] 2016/12/10 17:43:20 ::1 - - [10/Dec/2016:17:43:20 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 31e2dd1e-bf43-11e6-803b-000000000000 4.905191ms
[httpd] 2016/12/10 17:43:20 ::1 - - [10/Dec/2016:17:43:20 -0800] POST /write?consistency=any&db=telegraf&precision=s&rp=default HTTP/1.1 204 0 - InfluxDBClient 31e3037a-bf43-11e6-803c-000000000000 14.243782ms
[run] 2016/12/10 17:43:25 Signal received, initializing clean shutdown...
[run] 2016/12/10 17:43:25 Waiting for clean shutdown...
[copier] 2016/12/10 17:43:25 copier listener closed
[cluster] 2016/12/10 17:43:25 cluster service accept error: network connection closed
[shard-precreation] 2016/12/10 17:43:25 Precreation service terminating
[snapshot] 2016/12/10 17:43:25 snapshot listener closed
[continuous_querier] 2016/12/10 17:43:25 continuous query service terminating
[retention] 2016/12/10 17:43:25 retention policy enforcement terminating
[monitor] 2016/12/10 17:43:25 shutting down monitor system
[monitor] 2016/12/10 17:43:25 terminating storage of statistics
[subscriber] 2016/12/10 17:43:27 closed service
[run] 2016/12/10 17:43:27 server shutdown completed
[ticku@localhost influxdb]$
```
As it can be seen the error lies in
`[task_store] 2016/12/10 18:16:39 W! **could not open old boltd for task_store. Not performing migration. Remove the `task_store.dir` configuration to disable migration.**`
How to resolve this?
I tried all possible ways to do that:-
1.Added [subscriber] in kapacitor-0.13.1.
2.Referred to all the available forums and articles available online but none of them provided a solution.
3.I also tried in docker but on enabling the cpu_alert neither the kapacitor records any stream nor is the log file created.'show subscriptions' lists subscriptions correctly and there are no errors in influxdb logs
```
docker run -d --name influxdb -p 8083:8083 -p 8086:8086 influxdb
docker run -d --name telegraf --net=container:influxdb telegraf
```
After creating tick folder in root of the host I created tickscript - cpu_alert.tick to that ~/tick folder.
Add tickscript - cpu_alert.tick to that ~/tick folder.
```
Add ip of influxdb into kapacitor config file and run below command.
docker run -p 9092:9092 -d --link influxdb:influxdb --name kapacitor -v ~/Downloads/kapacitor.conf:/etc/kapacitor/kapacitor.conf:ro -v ~/tick/:/root -w=/root kapacitor
kapacitor define cpu_alert -type stream -tick ~/cpu_alert.tick -dbrp telegraf.autogen
kapacitor enable cpu_alert
```
Tried restarting the containers but it doesnot seem to work.
Contributor guide
Research direction
Start with influxdb.conf, telegraf.conf, kapacitor.conf, and cpu_alert.tick, then reproduce the commands shown for defining, showing, and recording cpu_alert. Inspect the Kapacitor task status, recording state, and kapacitor.log alongside the configured InfluxDB and Telegraf settings. Done means identifying why the stream processes zero points and why no alert log output appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100