kapacitor icon indicating copy to clipboard operation
kapacitor copied to clipboard

can not start kapacitor service

Open rydeng opened this issue 8 years ago • 12 comments

1.kapacitor version as follows:

$ kapacitor version
Kapacitor 1.0.0 (git: master c4953cf494f6019995434a6c152496013b7b474b)

2.kapacitor.conf:

hostname = "localhost"
data_dir = "/var/lib/kapacitor"

[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"
  shutdown-timeout = "10s"

[replay]
  dir = "/var/lib/kapacitor/replay"

[storage]
  boltdb = "/var/lib/kapacitor/kapacitor.db"

[task]
  dir = "/var/lib/kapacitor/tasks"
  snapshot-interval = "1m0s"
[[influxdb]]
  enabled = true
  name = "localhost"
  default = true
  urls = ["http://localhost:53"]
  username = "picusops"
  password = "picusops"
  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"
  [influxdb.subscriptions]
  [influxdb.excluded-subscriptions]

[logging]
  file = "/var/log/kapacitor/kapacitor.log"
  level = "INFO"

[collectd]
  enabled = false
  bind-address = ":25826"
  database = "collectd"
  retention-policy = ""
  batch-size = 1000
  batch-pending = 5
  batch-timeout = "10s"
  read-buffer = 0
  typesdb = "/usr/share/collectd/types.db"

[opentsdb]
  enabled = false
  bind-address = ":4242"
  database = "opentsdb"
  retention-policy = ""
  consistency-level = "one"
  tls-enabled = false
  certificate = "/etc/ssl/influxdb.pem"
batch-size = 1000
  batch-pending = 5
  batch-timeout = "1s"
  log-point-errors = true

[smtp]
  enabled = false
  host = "localhost"
  port = 25
  username = ""
  password = ""
  no-verify = false
  global = false
  state-changes-only = false
  from = ""
  idle-timeout = "30s"

[opsgenie]
  enabled = false
  api-key = ""
url = "https://api.opsgenie.com/v1/json/alert"
  recovery_url = "https://api.opsgenie.com/v1/json/alert/note"
  global = false

[victorops]
  enabled = false
  api-key = ""
  routing-key = ""
  url = "https://alert.victorops.com/integrations/generic/20131114/alert"
  global = false

[pagerduty]
  enabled = false
  url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
  service-key = ""
  global = false

[sensu]
  enabled = false
  addr = "sensu-client:3030"
  source = "Kapacitor"
[slack]
  enabled = false
  url = ""
  channel = ""
  global = false
  state-changes-only = false

[hipchat]
  enabled = false
  url = "https://subdomain.hipchat.com/v2/room"
  token = ""
  room = ""
  global = false
  state-changes-only = false

[alerta]
  enabled = false
  url = ""
  token = ""
  environment = ""
  origin = "kapacitor"
[reporting]
  enabled = true
  url = "https://usage.influxdata.com"

[stats]
  enabled = true
  stats-interval = "10s"
  database = "_kapacitor"
  retention-policy = "default"
  timing-sample-rate = 0.1
  timing-movavg-size = 1000

[udf]
  [udf.functions]
    [udf.functions.replaceFunc]
      prog = "/home/ubuntu/kapacitorconfig/ticks/replace_udf"
      args = []
      timeout = "10s"

[deadman]
  interval = "10s"
  threshold = 0.0
id = "node 'NODE_NAME' in task '{{ .TaskName }}'"
  message = "{{ .ID }} is {{ if eq .Level \"OK\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \"collected\" | printf \"%0.3f\" }} points/INTERVAL."
  global = false

[talk]
  enabled = false
  url = "https://jianliao.com/v2/services/webhook/uuid"
  author_name = "Kapacitor"

3.the error:

~$ kapacitor list tasks
ID                            Type      Status    Executing Databases and Retention Policies
Get http://localhost:9092/kapacitor/v1/tasks?dot-view=attributes&fields=type&fields=status&fields=executing&fields=dbrps&limit=100&offset=0&pattern=&replay-id=&script-format=formatted: dial tcp 127.0.0.1:9092: getsockopt: connection refused

4.log:

$ sudo tail -f /var/log/kapacitor/kapacitor.log 
[srv] 2016/09/28 11:57:44 I! Kapacitor hostname: localhost
[srv] 2016/09/28 11:57:44 I! ClusterID: e3628ece-369e-4f91-a4c7-bc123508ba16 ServerID: 0ca59c46-10ba-420d-8d7a-5d4df118e16f
[task_master:main] 2016/09/28 11:57:44 I! opened
[udf] 2016/09/28 11:57:44 I!P 2016/09/28 11:57:44 Starting agent
[run] 2016/09/28 12:13:12 I! Kapacitor starting, version 1.0.0, branch master, commit c4953cf494f6019995434a6c152496013b7b474b
[run] 2016/09/28 12:13:12 I! Go version go1.6.3
[srv] 2016/09/28 12:13:12 I! Kapacitor hostname: localhost
[srv] 2016/09/28 12:13:12 I! ClusterID: e3628ece-369e-4f91-a4c7-bc123508ba16 ServerID: 0ca59c46-10ba-420d-8d7a-5d4df118e16f
[task_master:main] 2016/09/28 12:13:12 I! opened
[udf] 2016/09/28 12:13:12 I!P 2016/09/28 12:13:12 Starting agent

rydeng avatar Sep 27 '16 13:09 rydeng

What does /var/log/kapacitor/kapacitord.err look like?

rossmcdonald avatar Sep 27 '16 15:09 rossmcdonald

@rossmcdonald Thx, but there is not this file in my environment.

rydeng avatar Sep 28 '16 11:09 rydeng

Hmm, that's odd. What if you try starting the daemon manually? For example (as root):

sudo -u kapacitor kapacitord -config /etc/kapacitor/kapacitor.conf

rossmcdonald avatar Sep 28 '16 15:09 rossmcdonald

@rydeng Were you able to figure out what the problem was?

rossmcdonald avatar Oct 04 '16 15:10 rossmcdonald

@rossmcdonald I have the same issue. I'm using a default config, on a VM.

Even when starting manually as root as you mentioned above, Kapacitor just hangs on startup, nothing after the logo and this line: 2016/10/25 22:24:29 Using configuration at: /etc/kapacitor/kapacitor.conf

Any thoughts?

ayebayley avatar Oct 25 '16 22:10 ayebayley

@ayebayley Startup is likely blocked trying to talk to InfluxDB. Turn on debug logging to make sure, or otherwise disable InfluxDB.

nathanielc avatar Oct 25 '16 22:10 nathanielc

@nathanielc Here's what i pulled from /var/log/kapacitor/kapacitor.log .... I didn't see a kapacitord.err as mentioned above

[run] 2016/10/25 22:43:06 I! Kapacitor starting, version 1.0.0, branch master, commit c4953cf4$ [run] 2016/10/25 22:43:06 I! Go version go1.6.3 [srv] 2016/10/25 22:43:06 I! Kapacitor hostname: localhost [srv] 2016/10/25 22:43:06 I! ClusterID: e08d223f-9e55-4cb4-af77-e7c6d1a3b9a3 ServerID: 35104a7$ [task_master:main] 2016/10/25 22:43:06 I! opened [srv] 2016/10/25 22:43:06 D! opening service: *udf.Service [srv] 2016/10/25 22:43:06 D! opened service: *udf.Service [srv] 2016/10/25 22:43:06 D! opening service: *deadman.Service [srv] 2016/10/25 22:43:06 D! opened service: *deadman.Service [srv] 2016/10/25 22:43:06 D! opening service: *storage.Service [influxdb] 2016/10/25 22:43:36 D! linking subscriptions for cluster localhost

None of the above shows in the CLI and then that last line just loops every minute.

Whats the best way to go about disabling InfluxDB and getting this all working? Influx is capturing data for me so i'd like to minimize downtime.

ayebayley avatar Oct 25 '16 22:10 ayebayley

@ayebayley

This line here [srv] 2016/10/25 22:43:06 D! opening service: *storage.Service doesn't have a corresponded opened line, which means that the Kapacitor process is stuck opening that service. That service tries to open a boltdb database which might be locked. Have you checked for another running Kapacitor process anywhere? That would be my guess as per the logs you posted.

As for disabling InfluxDB, set the [[influxdb]] enabled option to false. This will not affect your running InfluxDB cluster but will instruct Kapacitor to not try and connect to it.

nathanielc avatar Oct 26 '16 19:10 nathanielc

@nathanielc Thanks for the help so far!

So i checked the processes, only one kapacitor was showing. Restarted the VM, still the same issues. Now uninstalled kapacitor, reinstalled and the logs are looking different but still hanging in the record stream task. It appears that the necessary subscriptions are in Influx as well.

run] 2016/10/27 01:19:01 I! Kapacitor starting, version 1.0.2, branch master, commit 1011dba109bf3d83366c87873ec285c7f9140d34 [run] 2016/10/27 01:19:01 I! Go version go1.6.3 [srv] 2016/10/27 01:19:01 I! Kapacitor hostname: localhost [srv] 2016/10/27 01:19:01 I! ClusterID: e08d223f-9e55-4cb4-af77-e7c6d1a3b9a3 ServerID: 35104a7f-90ce-4647-a716-a5d7f6c971d3 [task_master:main] 2016/10/27 01:19:01 I! opened [task_store] 2016/10/27 01:19:08 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/10/27 01:19:08 I! Started task: test [stats] 2016/10/27 01:19:08 I! opened service [httpd] 2016/10/27 01:19:08 I! Starting HTTP service [httpd] 2016/10/27 01:19:08 I! Authentication enabled: false [httpd] 2016/10/27 01:19:08 I! Listening on HTTP: 127.0.0.1:9092 [run] 2016/10/27 01:19:08 I! Listening for signals [httpd] 127.0.0.1 - - [27/Oct/2016:01:22:07 +0000] "GET /kapacitor/v1/debug/vars HTTP/1.1" 200 1905 "-" "KapacitorClient" c6afe4ec-9be3-11e6-8001-000000000000 14455 [httpd] 127.0.0.1 - - [27/Oct/2016:01:22:28 +0000] "GET /kapacitor/v1/debug/vars HTTP/1.1" 200 1963 "-" "KapacitorClient" d324bbc2-9be3-11e6-8002-000000000000 6919 [httpd] 127.0.0.1 - - [27/Oct/2016:01:28:17 +0000] "GET /kapacitor/v1/recordings?fields=type&fields=size&fields=date&fields=status&limit=100&offset=0&pattern= HTTP/1.1"$ [httpd] 127.0.0.1 - - [27/Oct/2016:01:29:42 +0000] "POST /kapacitor/v1/loglevel HTTP/1.1" 204 0 "-" "KapacitorClient" d6224e06-9be4-11e6-8004-000000000000 218 [httpd] 127.0.0.1 - - [27/Oct/2016:01:29:55 +0000] "GET /kapacitor/v1/tasks?dot-view=attributes&fields=type&fields=status&fields=executing&fields=dbrps&limit=100&offset$ [influxdb] 2016/10/27 01:30:01 D! linking subscriptions for cluster localhost [httpd] 127.0.0.1 - - [27/Oct/2016:01:30:54 +0000] "POST /kapacitor/v1/recordings/stream HTTP/1.1" 201 211 "-" "KapacitorClient" 00ee1489-9be5-11e6-8006-000000000000 24$ [httpd] 127.0.0.1 - - [27/Oct/2016:01:30:55 +0000] "GET /kapacitor/v1/recordings/55cd21c5-c256-4c4c-b5c0-00493d9467e2 HTTP/1.1" 202 211 "-" "KapacitorClient" 013e4377-9$ [httpd] 127.0.0.1 - - [27/Oct/2016:01:30:55 +0000] "GET /kapacitor/v1/recordings/55cd21c5-c256-4c4c-b5c0-00493d9467e2 HTTP/1.1" 202 211 "-" "KapacitorClient" 018b53e7-9$ [httpd] 127.0.0.1 - - [27/Oct/2016:01:30:56 +0000] "GET /kapacitor/v1/recordings/55cd21c5-c256-4c4c-b5c0-00493d9467e2 HTTP/1.1" 202 211 "-" "KapacitorClient" 01d7e4b7-9$

ayebayley avatar Oct 27 '16 01:10 ayebayley

@nathanielc i'm now recording data. Switched to udp as in #824 and everything works ok it seems. Are there any downsides to udp instead of http? Lots of people seem to be having http issues

ayebayley avatar Oct 27 '16 05:10 ayebayley

@ayebayley UDP will drop packets so you will have to make sure you are configuring your UDP kernel settings appropriately and monitoring any dropped data.

What version are you using?

nathanielc avatar Oct 27 '16 16:10 nathanielc

Hi, I'm having the same issue. Kapacitor just displays the startup header and then hangs. Here's what I have in my log file:

[run] 2017/02/10 21:06:13 I! Kapacitor starting, version 1.2.0, branch master, commit 5408057e5a3493d3b5bd38d5d535ea45b587f8ff  
[run] 2017/02/10 21:06:13 I! Go version go1.7.4  
[srv] 2017/02/10 21:06:13 I! Kapacitor hostname: localhost  
[srv] 2017/02/10 21:06:13 I! ClusterID: ccd5e899-76ee-468f-a197-a1e3ed1da292 ServerID: 804aeff1-65f2-4553-b256-c16c474b7a78  
[task_master:main] 2017/02/10 21:06:13 I! opened  
[srv] 2017/02/10 21:06:13 D! opening service: *storage.Service  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:06:20 +0000] "POST /write?consistency=&db=_internal&precision=ns&rp=monitor HTTP/1.1" 204 0 "-" "InfluxDBClient"
 c515c11e-efd4-11e6-9858-000000000000 1303  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:06:30 +0000] "POST /write?consistency=&db=_internal&precision=ns&rp=monitor HTTP/1.1" 204 0 "-" "InfluxDBClient"
 cb0ba233-efd4-11e6-9859-000000000000 1644  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:06:40 +0000] "POST /write?consistency=&db=_internal&precision=ns&rp=monitor HTTP/1.1" 204 0 "-" "InfluxDBClient"
 d101c9b3-efd4-11e6-985a-000000000000 1239  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:06:50 +0000] "POST /write?consistency=&db=_internal&precision=ns&rp=monitor HTTP/1.1" 204 0 "-" "InfluxDBClient"
 d6f75f6a-efd4-11e6-985b-000000000000 1472  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:07:00 +0000] "POST /write?consistency=&db=_internal&precision=ns&rp=monitor HTTP/1.1" 204 0 "-" "InfluxDBClient"
 dced406a-efd4-11e6-985c-000000000000 1383  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:07:01 +0000] "POST /write?consistency=&db=profile_metrics&precision=ns&rp=autogen HTTP/1.1" 204 0 "-" "InfluxDBC
lient" dd9ff19e-efd4-11e6-985d-000000000000 148  
[httpd] 127.0.0.1 - - [10/Feb/2017:21:07:01 +0000] "POST /write?consistency=&db=profile_metrics&precision=ns&rp=autogen HTTP/1.1" 204 0 "-" "InfluxDBC
lient" dda3481f-efd4-11e6-985e-000000000000 77  

It seems to be trying to make this POST request continuously, but I don't know what its trying to do.

Here is my config file (I changed InfluxDB enabled to false as suggested above):

# The hostname of this node.
# Must be resolvable by any configured InfluxDB hosts.
hostname = "localhost"
# Directory for storing a small amount of metadata about the server.
data_dir = "/var/lib/kapacitor"

# Do not apply configuration overrides during startup.
# Useful if the configuration overrides cause Kapacitor to fail startup.
# This option is intended as a safe guard and should not be needed in practice.
skip-config-overrides = false

# Default retention-policy, if a write is made to Kapacitor and
# it does not have a retention policy associated with it,
# then the retention policy will be set to this value
default-retention-policy = ""

[http]
  # HTTP API Server for Kapacitor
  # This server is always on,
  # it serves both as a write endpoint
  # and as the API endpoint for all other
  # Kapacitor calls.
  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]
  # Enable/Disable the service for overridding configuration via the HTTP API.
  enabled = true

[logging]
    # Destination for logs
    # Can be a path to a file or 'STDOUT', 'STDERR'.
    file = "/var/log/kapacitor/kapacitor.log"
    # Logging level can be one of:
    # DEBUG, INFO, WARN, ERROR, or OFF
    level = "INFO"

[replay]
  # Where to store replay files, aka recordings.
  dir = "/var/lib/kapacitor/replay"

[task]
  # Where to store the tasks database
  # DEPRECATED: This option is not needed for new installations.
  # It is only used to determine the location of the task.db file
  # for migrating to the new `storage` service.
  dir = "/var/lib/kapacitor/tasks"
  # How often to snapshot running task state.
  snapshot-interval = "60s"

[storage]
  # Where to store the Kapacitor boltdb database
  boltdb = "/var/lib/kapacitor/kapacitor.db"

[deadman]
  # Configure a deadman's switch
  # Globally configure deadman's switches on all tasks.
  # NOTE: for this to be of use you must also globally configure at least one alerting method.
  global = false
  # Threshold, if globally configured the alert will be triggered if the throughput in points/interval is <= threshold.
  threshold = 0.0
  # Interval, if globally configured the frequency at which to check the throughput.
  interval = "10s"
  # Id -- the alert Id, NODE_NAME will be replaced with the name of the node being monitored.
  id = "node 'NODE_NAME' in task '{{ .TaskName }}'"
  # The message of the alert. INTERVAL will be replaced by the interval.
  message = "{{ .ID }} is {{ if eq .Level \"OK\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \"collected\" | printf \"%0.3f\" }} points/INTERVAL."


# Multiple InfluxDB configurations can be defined.
# Exactly one must be marked as the default.
# Each one will be given a name and can be referenced in batch queries and InfluxDBOut nodes.
[[influxdb]]
  # Connect to an InfluxDB cluster
  # Kapacitor can subscribe, query and write to this cluster.
  # Using InfluxDB is not required and can be disabled.
  enabled = false
  default = true
  name = "localhost"
  urls = ["http://localhost:8086"]
  username = ""
  password = ""
  timeout = 0
  # Absolute path to pem encoded CA file.
  # A CA can be provided without a key/cert pair
  #   ssl-ca = "/etc/kapacitor/ca.pem"
  # Absolutes paths to pem encoded key and cert files.
  #   ssl-cert = "/etc/kapacitor/cert.pem"
  #   ssl-key = "/etc/kapacitor/key.pem"

  # Do not verify the TLS/SSL certificate.
  # This is insecure.
  insecure-skip-verify = false

  # Maximum time to try and connect to InfluxDB during startup
  startup-timeout = "5m"

  # Turn off all subscriptions
  disable-subscriptions = false

  # Which protocol to use for subscriptions
  # one of 'udp', 'http', or 'https'.
  subscription-protocol = "http"

  # Subscriptions resync time interval
  # Useful if you want to subscribe to new created databases
  # without restart Kapacitord
  subscriptions-sync-interval = "1m0s"

  # Override the global hostname option for this InfluxDB cluster.
  # Useful if the InfluxDB cluster is in a separate network and
  # needs special config to connect back to this Kapacitor instance.
  # Defaults to `hostname` if empty.
  kapacitor-hostname = ""

  # Override the global http port option for this InfluxDB cluster.
  # Useful if the InfluxDB cluster is in a separate network and
  # needs special config to connect back to this Kapacitor instance.
  # Defaults to the port from `[http] bind-address` if 0.
  http-port = 0

  # Host part of a bind address for UDP listeners.
  # For example if a UDP listener is using port 1234
  # and `udp-bind = "hostname_or_ip"`,
  # then the UDP port will be bound to `hostname_or_ip:1234`
  # The default empty value will bind to all addresses.
  udp-bind = ""
  # Subscriptions use the UDP network protocl.
  # The following options of for the created UDP listeners for each subscription.
  # Number of packets to buffer when reading packets off the socket.
  udp-buffer = 1000
  # The size in bytes of the OS read buffer for the UDP socket.
  # A value of 0 indicates use the OS default.
  udp-read-buffer = 0

  [influxdb.subscriptions]
    # Set of databases and retention policies to subscribe to.
    # If empty will subscribe to all, minus the list in
    # influxdb.excluded-subscriptions
    #
    # Format
    # db_name = <list of retention policies>
    #
    # Example:
    # my_database = [ "default", "longterm" ]
  [influxdb.excluded-subscriptions]
    # Set of databases and retention policies to exclude from the subscriptions.
    # If influxdb.subscriptions is empty it will subscribe to all
    # except databases listed here.
    #
    # Format
    # db_name = <list of retention policies>
    #
    # Example:
    # my_database = [ "default", "longterm" ]

[kubernetes]
  # Enable/Disable the kubernetes service.
  # Needed by the k8sAutoscale TICKscript node.
  enabled = false
  # There are several ways to connect to the kubernetes API servers:
  #
  # Via the proxy, start the proxy via the `kubectl proxy` command:
  #   api-servers = ["http://localhost:8001"]
  #
  # From within the cluster itself, in which case
  # kubernetes secrets and DNS services are used
  # to determine the needed configuration.
  #   in-cluster = true
  #
  # Direct connection, in which case you need to know
  # the URL of the API servers,  the authentication token and
  # the path to the ca cert bundle.
  # These value can be found using the `kubectl config view` command.
  #   api-servers = ["http://192.168.99.100:8443"]
  #   token = "..."
  #   ca-path = "/path/to/kubernetes/ca.crt"



[smtp]
  # Configure an SMTP email server
  # Will use TLS and authentication if possible
  # Only necessary for sending emails from alerts.
  enabled = false
  host = "localhost"
  port = 25
  username = ""
  password = ""
  # From address for outgoing mail
  from = ""
  # List of default To addresses.
  # to = ["[email protected]"]

  # Skip TLS certificate verify when connecting to SMTP server
  no-verify = false
  # Close idle connections after timeout
  idle-timeout = "30s"

  # If true the all alerts will be sent via Email
  # without explicitly marking them in the TICKscript.
  global = false
  # Only applies if global is true.
  # Sets all alerts in state-changes-only mode,
  # meaning alerts will only be sent if the alert state changes.
  state-changes-only = false

[snmptrap]
  # Configure an SNMP trap server
  enabled = false
  # The host:port address of the SNMP trap server
  addr = "localhost:162"
  # The community to use for traps
  community = "kapacitor"
  # Number of retries when sending traps
  retries = 1


[opsgenie]
    # Configure OpsGenie with your API key and default routing key.
    enabled = false
    # Your OpsGenie API Key.
    api-key = ""
    # Default OpsGenie teams, can be overridden per alert.
    # teams = ["team1", "team2"]
    # Default OpsGenie recipients, can be overridden per alert.
    # recipients = ["recipient1", "recipient2"]
    # The OpsGenie API URL should not need to be changed.
    url = "https://api.opsgenie.com/v1/json/alert"
    # The OpsGenie Recovery URL, you can change this
    # based on which behavior you want a recovery to
    # trigger (Add Notes, Close Alert, etc.)
    recovery_url = "https://api.opsgenie.com/v1/json/alert/note"
    # If true then all alerts will be sent to OpsGenie
    # without explicitly marking them in the TICKscript.
    # The team and recipients can still be overridden.
    global = false

[victorops]
  # Configure VictorOps with your API key and default routing key.
  enabled = false
  # Your VictorOps API Key.
  api-key = ""
  # Default VictorOps routing key, can be overridden per alert.
  routing-key = ""
  # The VictorOps API URL should not need to be changed.
  url = "https://alert.victorops.com/integrations/generic/20131114/alert"
  # If true the all alerts will be sent to VictorOps
  # without explicitly marking them in the TICKscript.
  # The routing key can still be overridden.
  global = false

[pagerduty]
  # Configure PagerDuty.
  enabled = false
  # Your PagerDuty Service Key.
  service-key = ""
  # The PagerDuty API URL should not need to be changed.
  url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
  # If true the all alerts will be sent to PagerDuty
  # without explicitly marking them in the TICKscript.
  global = false

[slack]
  # Configure Slack.
  enabled = false
  # The Slack webhook URL, can be obtained by adding
  # an Incoming Webhook integration.
  # Visit https://slack.com/services/new/incoming-webhook
  # to add new webhook for Kapacitor.
  url = ""
  # Default channel for messages
  channel = ""
  # If true all the alerts will be sent to Slack
  # without explicitly marking them in the TICKscript.
  global = false
  # Only applies if global is true.
  # Sets all alerts in state-changes-only mode,
  # meaning alerts will only be sent if the alert state changes.
  state-changes-only = false

[telegram]
  # Configure Telegram.
  enabled = false
  # The Telegram Bot URL should not need to be changed.
  url = "https://api.telegram.org/bot"
  # Telegram Bot Token, can be obtained From @BotFather.
  token = ""
  # Default recipient for messages, Contact @myidbot on Telegram to get an ID.
  chat-id = ""
  # Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your alert message.
  #parse-mode  = "Markdown"
  # Disable link previews for links in this message
  disable-web-page-preview = false
  # Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
  disable-notification = false
  # If true the all alerts will be sent to Telegram
  # without explicitly marking them in the TICKscript.
  global = false
  # Only applies if global is true.
  # Sets all alerts in state-changes-only mode,
  # meaning alerts will only be sent if the alert state changes.
  state-changes-only = false

[hipchat]
  # Configure HipChat.
  enabled = false
  # The HipChat API URL. Replace subdomain with your
  # HipChat subdomain.
  url = "https://subdomain.hipchat.com/v2/room"
  # Visit https://www.hipchat.com/docs/apiv2
  # for information on obtaining your room id and
  # authentication token.
  # Default room for messages
  room = ""
  # Default authentication token
  token = ""
  # If true then all alerts will be sent to HipChat
  # without explicitly marking them in the TICKscript.
  global = false
  # Only applies if global is true.
  # Sets all alerts in state-changes-only mode,
  # meaning alerts will only be sent if the alert state changes.
  state-changes-only = false

[alerta]
  # Configure Alerta.
  enabled = false
  # The Alerta URL.
  url = ""
  # Default authentication token.
  token = ""
  # Default environment.
  environment = ""
  # Default origin.
  origin = "kapacitor"

[sensu]
  # Configure Sensu.
  enabled = false
  # The Sensu Client host:port address.
  addr = "sensu-client:3030"
  # Default JIT source.
  source = "Kapacitor"

[reporting]
  # Send usage statistics
  # every 12 hours to Enterprise.
  enabled = true
  url = "https://usage.influxdata.com"

[stats]
  # Emit internal statistics about Kapacitor.
  # To consume these stats create a stream task
  # that selects data from the configured database
  # and retention policy.
  #
  # Example:
  #  stream.from().database('_kapacitor').retentionPolicy('default')...
  #
  enabled = true
  stats-interval = "10s"
  database = "_kapacitor"
  retention-policy= "autogen"

[udf]
# Configuration for UDFs (User Defined Functions)
[udf.functions]
    # Example go UDF.
    # First compile example:
    #   go build -o avg_udf ./udf/agent/examples/moving_avg.go
    #
    # Use in TICKscript like:
    #   stream.goavg()
    #           .field('value')
    #           .size(10)
    #           .as('m_average')
    #
    # uncomment to enable
    #[udf.functions.goavg]
    #   prog = "./avg_udf"
    #   args = []
    #   timeout = "10s"

    # Example python UDF.
    # Use in TICKscript like:
    #   stream.pyavg()
    #           .field('value')
    #           .size(10)
    #           .as('m_average')
    #
    # uncomment to enable
    #[udf.functions.pyavg]
    #   prog = "/usr/bin/python2"
    #   args = ["-u", "./udf/agent/examples/moving_avg.py"]
    #   timeout = "10s"
    #   [udf.functions.pyavg.env]
    #       PYTHONPATH = "./udf/agent/py"

    # Example UDF over a socket
    #[udf.functions.myCustomUDF]
    #   socket = "/path/to/socket"
    #   timeout = "10s"

[talk]
  # Configure Talk.
  enabled = false
  # The Talk webhook URL.
  url = "https://jianliao.com/v2/services/webhook/uuid"
  # The default authorName.
  author_name = "Kapacitor"

##################################
# Input Methods, same as InfluxDB
#

[collectd]
  enabled = false
  bind-address = ":25826"
  database = "collectd"
  retention-policy = ""
  batch-size = 1000
  batch-pending = 5
  batch-timeout = "10s"
  typesdb = "/usr/share/collectd/types.db"

[opentsdb]
  enabled = false
  bind-address = ":4242"
  database = "opentsdb"
  retention-policy = ""
  consistency-level = "one"
  tls-enabled = false
  certificate = "/etc/ssl/influxdb.pem"
  batch-size = 1000
  batch-pending = 5
  batch-timeout = "1s"

Any help is much appreciated, Thanks!

trtiwari avatar Feb 10 '17 21:02 trtiwari