вторник, 11 октября 2016 г., 20:29:26 UTC+3 пользователь codep...@gmail.com написал: > I'm having a hard time setting up a record. Currently kapacitor.conf contains: > > [[influxdb]] > enabled = true > name = "cp" > default = true > urls = ["http://influx-cp.internal:8086"] > username = "root" > password = "root" > ssl-ca = "" > ssl-cert = "" > ssl-key = "" > insecure-skip-verify = false > timeout = "0" > disable-subscriptions = false > subscription-protocol = "http" > kapacitor-hostname = "" > http-port = 0 > udp-bind = "" > udp-buffer = 1000 > udp-read-buffer = 0 > startup-timeout = "5m0s" > subscriptions-sync-interval = "1m0s" > [influxdb.subscriptions] > [influxdb.excluded-subscriptions] > _kapacitor = ["autogen"] > > I'm launching it using this: > > kapacitord -config kapacitor.conf > > And trying to record it using this: > > kapacitor record stream -task cpu_alert -duration 20s > > With basic script: > > stream > // Select just the cpu measurement from our example database. > |from() > .database('cp') > |alert() > // Whenever we get an alert write it to a file. > .log('/tmp/alerts.log') > > As expected - record hangs forever. What I'm trying to find out - is > kapacitor receiving any data at all? How to find out, and how to fix? > > The log during record is this: > [run] 2016/10/11 20:28:08 I! Kapacitor starting, version 1.0.2, branch > master, commit 1011dba109bf3d83366c87873ec285c7f9140d34 > [run] 2016/10/11 20:28:08 I! Go version go1.6.3 > [srv] 2016/10/11 20:28:08 I! Kapacitor hostname: cp > [srv] 2016/10/11 20:28:08 I! ClusterID: 8106cac2-bb07-4f1b-8b36-5f55fead461b > ServerID: 2eace6cb-8fb7-485c-9055-41bba6bc06cc > [task_master:main] 2016/10/11 20:28:08 I! opened > [task_store] 2016/10/11 20:28:08 W! could not open old boltd for task_store. > Not performing migration. Remove the `task_store.dir` configuration to > disable migration. > [stats] 2016/10/11 20:28:08 I! opened service > [httpd] 2016/10/11 20:28:08 I! Starting HTTP service > [httpd] 2016/10/11 20:28:08 I! Authentication enabled: false > [httpd] 2016/10/11 20:28:08 I! Listening on HTTP: [::]:9092 > [run] 2016/10/11 20:28:08 I! Listening for signals > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:26 +0300] "POST > /kapacitor/v1/recordings/stream HTTP/1.1" 201 213 "-" "KapacitorClient" > 1e169f2d-8fd8-11e6-8001-000000000000 14495 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:26 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 1e656681-8fd8-11e6-8002-000000000000 1308 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:27 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 1eb21dfd-8fd8-11e6-8003-000000000000 1270 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:27 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 1efecdcf-8fd8-11e6-8004-000000000000 4212 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:28 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 1f4bfd80-8fd8-11e6-8005-000000000000 1458 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:28 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 1f98b84d-8fd8-11e6-8006-000000000000 3302 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:29 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 1fe5c68e-8fd8-11e6-8007-000000000000 992 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:29 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 2032666d-8fd8-11e6-8008-000000000000 3905 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:30 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 207f7cda-8fd8-11e6-8009-000000000000 1025 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:30 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 20cc2039-8fd8-11e6-800a-000000000000 3076 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:31 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 21192566-8fd8-11e6-800b-000000000000 971 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:31 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 2165bc53-8fd8-11e6-800c-000000000000 592 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:32 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 21b24533-8fd8-11e6-800d-000000000000 4535 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:32 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 21ff7605-8fd8-11e6-800e-000000000000 1024 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:33 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 224c173d-8fd8-11e6-800f-000000000000 4178 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:33 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 22992afe-8fd8-11e6-8010-000000000000 458 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:34 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 22e59d0e-8fd8-11e6-8011-000000000000 968 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:34 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 233239ee-8fd8-11e6-8012-000000000000 999 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:35 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 237edefc-8fd8-11e6-8013-000000000000 1010 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:35 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 23cb81e2-8fd8-11e6-8014-000000000000 3646 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:36 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 241897fc-8fd8-11e6-8015-000000000000 995 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:36 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 24653c96-8fd8-11e6-8016-000000000000 3459 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:37 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 24b2484b-8fd8-11e6-8017-000000000000 1006 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:37 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 24feee5c-8fd8-11e6-8018-000000000000 2637 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:38 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 254bcb30-8fd8-11e6-8019-000000000000 996 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:38 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 2598766a-8fd8-11e6-801a-000000000000 971 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:39 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 25e5091b-8fd8-11e6-801b-000000000000 1212 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:39 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 2631b807-8fd8-11e6-801c-000000000000 1040 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:40 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 267e624f-8fd8-11e6-801d-000000000000 3370 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:40 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 26cb5ae9-8fd8-11e6-801e-000000000000 431 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:41 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 2717deb1-8fd8-11e6-801f-000000000000 2837 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:41 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 2764df0f-8fd8-11e6-8020-000000000000 969 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:42 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 27b1855b-8fd8-11e6-8021-000000000000 1015 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:42 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 27fe1b7a-8fd8-11e6-8022-000000000000 1398 > [httpd] 127.0.0.1 - - [11/Oct/2016:20:28:43 +0300] "GET > /kapacitor/v1/recordings/24fdaef0-71a2-418e-85dc-5ce7d37f4399 HTTP/1.1" 202 > 213 "-" "KapacitorClient" 284ac2a4-8fd8-11e6-8023-000000000000 3441
So - the problem was that I used incorrect value in lambda. Still< i don't understand why kapacitor enable task_name works. And kapacitor record stream -task task_name -duration 20m doesn't.M Mainly, it ends before getting any data (Size is 23 B). Enabling task actually produce some configured alerts into provided file. -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" group. To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+unsubscr...@googlegroups.com. To post to this group, send email to influxdb@googlegroups.com. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/1d0a0804-bbc6-4f1d-b839-3472dc9fd605%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.