-
Notifications
You must be signed in to change notification settings - Fork 8
/
filter.example.yml
93 lines (93 loc) · 4.41 KB
/
filter.example.yml
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
# Redis configuration depends on fields specified in redis config section:
# 1. Use field `master_name` to enable Redis Sentinel support
# 2. Specify two or more `addrs` to enable cluster support
# 3. Otherwise, standalone configuration is enabled
redis:
# Sentinel master name
master_name: ""
# address list, format: {host1_name:port},{ip:port}
addrs: "localhost:6379"
# Redis username
username: "username"
# Redis password
password: "password"
# Redis Sentinel username
sentinel_username: "sentinel_username"
# Redis Sentinel password
sentinel_password: "sentinel_password"
# Moira will delete metrics older than this value from Redis. Large values will lead to various problems everywhere.
# See https://github.com/moira-alert/moira/pull/519
metrics_ttl: 3h
# Dial timeout for establishing new connections
# Default is 500 milliseconds
dial_timeout: 1s
# Timeout for socket reads. If reached, commands will fail
# with a timeout instead of blocking. Default is 3 seconds.
# Skip this setting or set 0 for default.
read_timeout: 5s
# Timeout for socket writes. If reached, commands will fail
# with a timeout instead of blocking. Default is ReadTimeout.
# Skip this setting or set 0 for default.
write_timeout: 5s
# Enables read-only commands on slave nodes
# The flag does not work without `route_randomly` or `route_by_latency` set to true
read_only: true
# Allows routing read-only commands to the **random** master or slave node
# It automatically enables ReadOnly
route_randomly: true
# Allows routing read-only commands to the **closest** master or slave node
# It automatically enables ReadOnly
route_by_latency: false
telemetry:
# Common port for all telemetry data: Prometheus scraping, pprof, etc.
listen: ":8091"
pprof:
# If true, pprof will be enabled on common telemetry port.
enabled: false
graphite:
# If true, graphite sender will be enabled.
enabled: true
# If true, runtime stats will be captured and sent to graphite. Note: It takes to call stoptheworld() with configured "graphite.interval" to capture runtime stats (https://golang.org/src/runtime/mstats.go)
runtime_stats: false
# Graphite relay URI, format: ip:port
uri: "graphite-relay:2003"
# Moira metrics prefix. Use 'prefix: {hostname}' to use hostname autoresolver.
prefix: DevOps.moira
# Metrics sending interval
interval: 60s
filter:
# Metrics listener uri
listen: ":2003"
# Retentions config file path. Simply use your original storage-schemas.conf or create new if you're using Moira without existing Graphite installation.
retention_config: /etc/moira/storage-schemas.conf
# Number of metrics to cache before checking them.
# Note: As this value increases, Redis CPU usage decreases.
# Normally, this value must be an order of magnitude less than graphite.prefix.filter.recevied.matching.count | nonNegativeDerivative() | scaleToSeconds(1)
# For example: with 100 matching metrics, set cache_capacity to 10. With 1000 matching metrics, increase cache_capacity up to 100.
cache_capacity: 10
# Defines number of threads to match incoming graphite-metrics.
# Equals to the number of processor cores found on Moira host by default or when variable is defined as 0.
max_parallel_matches: 0
# Period in which patterns will be reloaded from Redis
patterns_update_period: 1s
# Compatibility with different versions of graphite supported (carbon and clickhouse)
# By default moira is compatible with carbon, but can be configured to be compatible with clickhouse
graphite_compatibility:
# Controls how regices in tag matching are treated
# If false (default value), regex will match start of the string strictly. 'tag~=foo' is equivalent to 'tag~=^foo.*'
# If true, regex will match start of the string loosely. 'tag~=foo' is equivalent to 'tag~=.*foo.*'
allow_regex_loose_start_match: false
# Controls how absent tags are treated
# If true (default value), empty tags in regices will be matched
# If false, empty tags will be discarded
allow_regex_match_empty: true
# Time after which the batch of metrics is forced to be saved, default is 1s
batch_forced_save_timeout: 1s
# Defines the configuration for pattern storage
pattern_storage:
# Determines the size of the pattern matching cache
# It is better to put no less than the number of triggers
pattern_matching_cache_size: 1000
log:
log_file: stdout
log_level: info