-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathkapacitor.conf
More file actions
494 lines (443 loc) · 12.4 KB
/
kapacitor.conf
File metadata and controls
494 lines (443 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
hostname = "localhost"
data_dir = "/var/lib/kapacitor"
skip-config-overrides = false
default-retention-policy = ""
[http]
bind-address = ":9092"
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"
[task]
dir = "/var/lib/kapacitor/tasks"
snapshot-interval = "60s"
[storage]
boltdb = "/var/lib/kapacitor/kapacitor.db"
[deadman]
global = false
threshold = 0.0
interval = "10s"
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."
# 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]]
enabled = true
default = true
name = "localInflux"
urls = ["http://localhost:8086"]
username = ""
password = ""
timeout = 0
insecure-skip-verify = false
startup-timeout = "5m"
disable-subscriptions = true
subscription-protocol = "http"
subscriptions-sync-interval = "1m0s"
kapacitor-hostname = ""
http-port = 0
udp-bind = ""
udp-buffer = 1000
udp-read-buffer = 0
[influxdb.subscriptions]
# my_database = [ "default", "longterm" ]
[influxdb.excluded-subscriptions]
telegraf = [ "autogen" ]
# This is sample configuration for shipping metrics with Kapacitor
# Set enabled = true, set your remote influxdb url, connection paramaters
# and define and enable the tickscript in this folder to enable shipping
[[influxdb]]
enabled = false
default = false
name = "cloudInflux"
urls = ["https://my-influx-cloud.influxcloud.net:8086"]
username = "myInfluxCloudUsername"
password = "myInfluxCloudPassword"
timeout = 0
insecure-skip-verify = false
startup-timeout = "5m"
disable-subscriptions = true
subscription-protocol = "http"
subscriptions-sync-interval = "1m0s"
kapacitor-hostname = ""
http-port = 0
udp-bind = ""
udp-buffer = 1000
udp-read-buffer = 0
[influxdb.subscriptions]
[influxdb.excluded-subscriptions]
[kubernetes]
enabled = false
[smtp]
enabled = false
host = "localhost"
port = 25
username = ""
password = ""
from = ""
no-verify = false
idle-timeout = "30s"
global = false
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
[pushover]
# Configure Pushover.
enabled = false
# Your Pushover API token.
token = ""
# Your Pushover USER_TOKEN.
user-key = ""
# The URL for the Pushover API.
url = "https://api.pushover.net/1/messages.json"
##########################################
# Configure Alert POST request Endpoints
# As ENV variables:
# KAPACITOR_HTTPPOST_0_ENDPOINT = "example"
# KAPACITOR_HTTPPOST_0_URL = "http://example.com"
# KAPACITOR_HTTPPOST_0_HEADERS_Example = "header"
# [[httppost]]
# endpoint = "example"
# url = "http://example.com"
# headers = { Example = "your-key" }
# basic-auth = { username = "my-user", password = "my-pass" }
[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 token prefix
# If you are on older versions of alerta you may need to change this to "Key"
token-prefix = "Bearer"
# 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('autogen')...
#
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"
# Service Discovery and metric scraping
[[scraper]]
enabled = false
name = "myscraper"
# Specify the id of a discoverer service specified below
discoverer-id = ""
# Specify the type of discoverer service being used.
discoverer-service = ""
db = "prometheus_raw"
rp = "autogen"
type = "prometheus"
scheme = "http"
metrics-path = "/metrics"
scrape-interval = "1m0s"
scrape-timeout = "10s"
username = ""
password = ""
bearer-token = ""
ssl-ca = ""
ssl-cert = ""
ssl-key = ""
ssl-server-name = ""
insecure-skip-verify = false
# Supported discovery services
[[azure]]
enabled = false
id = "myazure"
port = 80
subscription-id = ""
tenant-id = ""
client-id = ""
client-secret = ""
refresh-interval = "5m0s"
[[consul]]
enabled = false
id = "myconsul"
address = "127.0.0.1:8500"
token = ""
datacenter = ""
tag-separator = ","
scheme = "http"
username = ""
password = ""
ssl-ca = ""
ssl-cert = ""
ssl-key = ""
ssl-server-name = ""
insecure-skip-verify = false
[[dns]]
enabled = false
id = "mydns"
refresh-interval = "30s"
## Type can be SRV, A, or AAAA
type = "SRV"
## Port is the port to scrape for records returned by A or AAAA types
port = 80
[[ec2]]
enabled = false
id = "myec2"
region = "us-east-1"
access-key = ""
secret-key = ""
profile = ""
refresh-interval = "1m0s"
port = 80
[[file-discovery]]
enabled = false
id = "myfile"
refresh-interval = "5m0s"
files = []
[[gce]]
enabled = false
id = "mygce"
project = ""
zone = ""
filter = ""
refresh-interval = "1m0s"
port = 80
tag-separator = ","
[[marathon]]
enabled = false
id = "mymarathon"
timeout = "30s"
refresh-interval = "30s"
bearer-token = ""
ssl-ca = ""
ssl-cert = ""
ssl-key = ""
ssl-server-name = ""
insecure-skip-verify = false
[[nerve]]
enabled = false
id = "mynerve"
timeout = "10s"
[[serverset]]
enabled = false
id = "myserverset"
timeout = "10s"
[[static-discovery]]
enabled = false
id = "mystatic"
targets = ["localhost:9100"]
[static.labels]
region = "us-east-1"
[[triton]]
enabled = false
id = "mytriton"
account = ""
dns-suffix = ""
endpoint = ""
port = 9163
refresh-interval = "1m0s"
version = 1
ssl-ca = ""
ssl-cert = ""
ssl-key = ""
ssl-server-name = ""
insecure-skip-verify = false