forked from facesea/banshee
-
Notifications
You must be signed in to change notification settings - Fork 1
/
doc.go
78 lines (67 loc) · 3.28 KB
/
doc.go
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
// Copyright 2015 Eleme Inc. All rights reserved.
/*
Package config handles configuration parser and container.
Example
Configuration is in JSON file, for example:
{
"interval": 10,
"period": 86400,
"expiration": 604800,
"storage": {
"path": "storage/"
},
"detector": {
"port": 2015,
"trendingFactor": 0.1,
"filterOffset": 0.01,
"leastCount": 30,
"blacklist": ["statsd.*"],
"intervalHitLimit": 100,
"defaultThresholdMaxs": {},
"defaultThresholdMins": {"timer.mean_90": 300},
"fillBlankZeros": ["counter.*.exc"]
},
"webapp": {
"port": 2016,
"auth": ["user", "pass"],
"static": "static/dist"
},
"alerter": {
"command": "",
"workers": 4,
"interval": 1200,
"oneDayLimit": 5
},
"cleaner": {
"interval": 10800,
"threshold": 259200
}
}
To use config file with banshee:
banshee -c path/to/config.json
Documents
The documents for each configuration item with default values:
interval // All metrics incoming interval (in seconds), default: 10
period // All metrics period (in seconds), default: 86400 (1 day)
expiration // All metrics expiration (in seconds), default: 604800 (7 days)
storage.path // Storage directory path.
detector.port // Detector tcp port to listen.
detector.trendingFactor // Detection weighted moving factor, should be a number between 0 and 1, default: 0.1
detector.filterOffset // Offset to filter history data, as a percentage to period, default: 0.01
detector.leastCount // Least count to start detection. default: 30
detector.blacklist // Incoming metrics blacklist, each one should be a wildcard pattern, default: []
detector.intervalHitLimit // Limitation for number of filtered metrics for each rule in one interval. default: 100
detector.defaultThresholdMaxs // Default thresholdMax for all rules, a wildcard pattern to number map. default: {}
detector.defaultThresholdMins // Default thresholdMin for all rules, a wildcard pattern to number map. default: {}
detector.filterBlankZeros // Detector will fill metric blanks with zeros if it matches any of these wildcard patterns. default: []
webapp.port // Webapp http port to listen.
webapp.auth // Webapp admin pages basic auth, in form of [user, pass], use empty string ["", ""] to disable auth. default: ["admin", "admin"]
webapp.static // Webapp static files (htmls/css/js) path, default: "static/dist"
alerter.command // Alerter command or script to execute on anomalies found. default: ""
alerter.workers // Number of workers to consume command execution jobs. default: 4
alerter.interval // Minimal interval (in seconds) between two alerting message for one metric. default: 1200
alerter.oneDayLimit // Limitation for number of alerting times for one metric in a day. default: 5
cleaner.interval // Time interval to check outdated data to clean. default: 10800 (4 hours)
cleaner.threshold // One metric will be cleaned if the age it incoming exceeds this threshold (in seconds). default: 259200 (3 days)
*/
package config