{"action":"closed","issue":{"url":"https://api.github.com/repos/influxdata/kapacitor/issues/666","repository_url":"https://api.github.com/repos/influxdata/kapacitor","labels_url":"https://api.github.com/repos/influxdata/kapacitor/issues/666/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/kapacitor/issues/666/comments","events_url":"https://api.github.com/repos/influxdata/kapacitor/issues/666/events","html_url":"https://github.com/influxdata/kapacitor/issues/666","id":161739724,"number":666,"title":"Getting started with Kapacitor","user":{"login":"rainierwolfcastle","id":1611833,"avatar_url":"https://avatars.githubusercontent.com/u/1611833?v=3","gravatar_id":"","url":"https://api.github.com/users/rainierwolfcastle","html_url":"https://github.com/rainierwolfcastle","followers_url":"https://api.github.com/users/rainierwolfcastle/followers","following_url":"https://api.github.com/users/rainierwolfcastle/following{/other_user}","gists_url":"https://api.github.com/users/rainierwolfcastle/gists{/gist_id}","starred_url":"https://api.github.com/users/rainierwolfcastle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainierwolfcastle/subscriptions","organizations_url":"https://api.github.com/users/rainierwolfcastle/orgs","repos_url":"https://api.github.com/users/rainierwolfcastle/repos","events_url":"https://api.github.com/users/rainierwolfcastle/events{/privacy}","received_events_url":"https://api.github.com/users/rainierwolfcastle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-22T17:23:22Z","updated_at":"2016-06-23T18:14:26Z","closed_at":"2016-06-23T18:14:26Z","body":"I'm trying to get started with Kapacitor and I'm running into some trouble. Using `kapacitord config` my config file looks like this:\r\n\r\n```\r\nroot@kapacitor-3269403056-5lfmy:/# kapacitord config    \r\nhostname = \"localhost\"\r\ndata_dir = \"/var/lib/kapacitor\"\r\n\r\n[http]\r\n  bind-address = \":9092\"\r\n  auth-enabled = false\r\n  log-enabled = true\r\n  write-tracing = false\r\n  pprof-enabled = false\r\n  https-enabled = false\r\n  https-certificate = \"/etc/ssl/kapacitor.pem\"\r\n  shutdown-timeout = \"10s\"\r\n\r\n[replay]\r\n  dir = \"/var/lib/kapacitor/replay\"\r\n\r\n[storage]\r\n  boltdb = \"/var/lib/kapacitor/kapacitor.db\"\r\n\r\n[task]\r\n  dir = \"/var/lib/kapacitor/tasks\"\r\n  snapshot-interval = \"1m0s\"\r\n\r\n[[influxdb]]\r\n  enabled = true\r\n  name = \"localhost\"\r\n  default = true\r\n  urls = [\"http://influxdb:8086\"]\r\n  username = \"\"\r\n  password = \"\"\r\n  ssl-ca = \"\"\r\n  ssl-cert = \"\"\r\n  ssl-key = \"\"\r\n  insecure-skip-verify = false\r\n  timeout = \"0\"\r\n  disable-subscriptions = false\r\n  udp-buffer = 1000\r\n  udp-read-buffer = 0\r\n  startup-timeout = \"0\"\r\n  [influxdb.subscriptions]\r\n  [influxdb.excluded-subscriptions]\r\n\r\n[logging]\r\n  file = \"/var/log/kapacitor/kapacitor.log\"\r\n  level = \"INFO\"\r\n\r\n[collectd]\r\n  enabled = false\r\n  bind-address = \":25826\"\r\n  database = \"collectd\"\r\n  retention-policy = \"\"\r\n  batch-size = 1000\r\n  batch-pending = 5\r\n  batch-timeout = \"10s\"\r\n  read-buffer = 0\r\n  typesdb = \"/usr/share/collectd/types.db\"\r\n\r\n[opentsdb]\r\n  enabled = false\r\n  bind-address = \":4242\"\r\n  database = \"opentsdb\"\r\n  retention-policy = \"\"\r\n  consistency-level = \"one\"\r\n  tls-enabled = false\r\n  certificate = \"/etc/ssl/influxdb.pem\"\r\n  batch-size = 1000\r\n  batch-pending = 5\r\n  batch-timeout = \"1s\"\r\n  log-point-errors = true\r\n\r\n[smtp]\r\n  enabled = false\r\n  host = \"localhost\"\r\n  port = 25\r\n  username = \"\"\r\n  password = \"\"\r\n  no-verify = false\r\n  global = false\r\n  state-changes-only = false\r\n  from = \"\"\r\n  idle-timeout = \"30s\"\r\n\r\n[opsgenie]\r\n  enabled = false\r\n  api-key = \"\"\r\n  url = \"https://api.opsgenie.com/v1/json/alert\"\r\n  recovery_url = \"https://api.opsgenie.com/v1/json/alert/note\"\r\n  global = false\r\n\r\n[victorops]\r\n  enabled = false\r\n  api-key = \"\"\r\n  routing-key = \"\"\r\n  url = \"https://alert.victorops.com/integrations/generic/20131114/alert\"\r\n  global = false\r\n\r\n[pagerduty]\r\n  enabled = false\r\n  url = \"https://events.pagerduty.com/generic/2010-04-15/create_event.json\"\r\n  service-key = \"\"\r\n  global = false\r\n\r\n[sensu]\r\n  enabled = false\r\n  addr = \"sensu-client:3030\"\r\n  source = \"Kapacitor\"\r\n\r\n[slack]\r\n  enabled = false\r\n  url = \"\"\r\n  channel = \"\"\r\n  global = false\r\n  state-changes-only = false\r\n\r\n[hipchat]\r\n  enabled = false\r\n  url = \"https://subdomain.hipchat.com/v2/room\"\r\n  token = \"\"\r\n  room = \"\"\r\n  global = false\r\n  state-changes-only = false\r\n\r\n[alerta]\r\n  enabled = false\r\n  url = \"\"\r\n  token = \"\"\r\n  environment = \"\"\r\n  origin = \"kapacitor\"\r\n\r\n[reporting]\r\n  enabled = true\r\n  url = \"https://usage.influxdata.com\"\r\n\r\n[stats]\r\n  enabled = true\r\n  stats-interval = \"10s\"\r\n  database = \"_kapacitor\"\r\n  retention-policy = \"default\"\r\n  timing-sample-rate = 0.1\r\n  timing-movavg-size = 1000\r\n\r\n[udf]\r\n  [udf.functions]\r\n\r\n[deadman]\r\n  interval = \"10s\"\r\n  threshold = 0.0\r\n  id = \"node 'NODE_NAME' in task '{{ .TaskName }}'\"\r\n  message = \"{{ .ID }} is {{ if eq .Level \\\"OK\\\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \\\"collected\\\" | printf \\\"%0.3f\\\" }} points/INTERVAL.\"\r\n  global = false\r\n\r\n[talk]\r\n  enabled = false\r\n  url = \"https://jianliao.com/v2/services/webhook/uuid\"\r\n  author_name = \"Kapacitor\"\r\n```\r\n\r\nI'm running Influx and Kapacitor in Kubernetes and `http://influxdb:8086` resolves to the Influx Docker container. I've verified that Influx is reachable using telnet inside the Kapacitor container.\r\n\r\nThe start of the log file for Kapacitor looks like this:\r\n\r\n```\r\nbobbys-air:update-service taylorr$ kubectl logs -f kapacitor-3269403056-5lfmy \r\n\r\n'##:::'##::::'###::::'########:::::'###:::::'######::'####:'########::'#######::'########::\r\n ##::'##::::'## ##::: ##.... ##:::'## ##:::'##... ##:. ##::... ##..::'##.... ##: ##.... ##:\r\n ##:'##::::'##:. ##:: ##:::: ##::'##:. ##:: ##:::..::: ##::::: ##:::: ##:::: ##: ##:::: ##:\r\n #####::::'##:::. ##: ########::'##:::. ##: ##:::::::: ##::::: ##:::: ##:::: ##: ########::\r\n ##. ##::: #########: ##.....::: #########: ##:::::::: ##::::: ##:::: ##:::: ##: ##.. ##:::\r\n ##:. ##:: ##.... ##: ##:::::::: ##.... ##: ##::: ##:: ##::::: ##:::: ##:::: ##: ##::. ##::\r\n ##::. ##: ##:::: ##: ##:::::::: ##:::: ##:. ######::'####:::: ##::::. #######:: ##:::. ##:\r\n..::::..::..:::::..::..:::::::::..:::::..:::......:::....:::::..::::::.......:::..:::::..::\r\n\r\n2016/06/22 16:44:02 no configuration provided, using default settings\r\n[run] 2016/06/22 16:44:02 I! Kapacitor starting, version 0.13.1, branch master, commit ae7dde3aa467c46c06a5a2058a80c6125203f599\r\n[run] 2016/06/22 16:44:02 I! Go version go1.6.2, GOMAXPROCS set to 1\r\n[srv] 2016/06/22 16:44:02 I! Kapacitor hostname: kapacitor-3269403056-5lfmy\r\n[srv] 2016/06/22 16:44:02 I! ClusterID: 380d8b44-3382-44c5-80cd-4960bae99136 ServerID: 20645656-5964-44f3-90d6-8ab89049fba9\r\n[task_master] 2016/06/22 16:44:02 I! opened\r\n[influxdb] 2016/06/22 16:44:02 I! linking subscriptions\r\n[udp:_internal.monitor] 2016/06/22 16:44:02 I! Started listening on UDP: [::]:34553\r\n[influxdb] 2016/06/22 16:44:02 I! started UDP listener for _internal monitor\r\n[udp:example.default] 2016/06/22 16:44:02 I! Started listening on UDP: [::]:43118\r\n[influxdb] 2016/06/22 16:44:02 I! started UDP listener for example default\r\n[task_store] 2016/06/22 16:44:02 W! could not open old boltd for task_store. Not performing migration. Remove the `task_store.dir` configuration to disable migration.\r\n[stats] 2016/06/22 16:44:02 I! opened service\r\n[httpd] 2016/06/22 16:44:02 I! Starting HTTP service\r\n[httpd] 2016/06/22 16:44:02 I! Authentication enabled: false\r\n[httpd] 2016/06/22 16:44:02 I! Listening on HTTP: [::]:9092\r\n[run] 2016/06/22 16:44:02 I! Listening for signals\r\n```\r\nI'm assuming everything is ok at this point?\r\n\r\nNext, I've created a tick file with the following to operate on temperature values from Influx:\r\n\r\n```\r\nstream\r\n    |from()\r\n        .measurement('temperature')\r\n    |alert()\r\n        .info(lambda: \"value\" > 0)\r\n        .log('/tmp/alert')\r\n```\r\n\r\nI've created a task to write to /tmp/alert when the temperature is above zero and enabled it Kapacitor using the following commands:\r\n\r\n```\r\nkapacitor define alerts -tick /tmp/task.tick -type stream -dbrp \"example\".\"default\"\r\nkapacitor enable alerts\r\n```\r\n\r\nThe output from `kapacitor show alerts` is:\r\n\r\n```\r\nroot@kapacitor-3269403056-5lfmy:/# kapacitor show alerts\r\nID: alerts\r\nError: \r\nType: stream\r\nStatus: enabled\r\nExecuting: true\r\nCreated: 22 Jun 16 16:51 UTC\r\nModified: 22 Jun 16 17:21 UTC\r\nLastEnabled: 22 Jun 16 17:21 UTC\r\nDatabases Retention Policies: [\"example\".\"default\"]\r\nTICKscript:\r\nstream\r\n    |from()\r\n        .measurement('temperature')\r\n    |alert()\r\n        .info(lambda: \"value\" > 0)\r\n        .log('/tmp/alert')\r\n\r\n\r\nDOT:\r\ndigraph alerts {\r\ngraph [throughput=\"0.00 points/s\"];\r\n\r\nstream0 [avg_exec_time_ns=\"0\" ];\r\nstream0 -> from1 [processed=\"0\"];\r\n\r\nfrom1 [avg_exec_time_ns=\"0\" ];\r\nfrom1 -> alert2 [processed=\"0\"];\r\n\r\nalert2 [alerts_triggered=\"0\" avg_exec_time_ns=\"0\" crits_triggered=\"0\" infos_triggered=\"0\" oks_triggered=\"0\" warns_triggered=\"0\" ];\r\n}\r\n```\r\n\r\nHowever, I don't get any data. Am I doing anything wrong here? I have Chronograf running so values are being inserted in Influx. Thanks."}}
{"actor":{"display_login":"rossmcdonald"}}