-
Notifications
You must be signed in to change notification settings - Fork 2
/
riemann-relay.conf
152 lines (129 loc) · 5.34 KB
/
riemann-relay.conf
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
# Global options
## Stats & Prometheus metrics
listen_http = "127.0.0.1:9999"
## How frequently to print stats in the logs
stats_interval = "5s"
## Logging level
log_level = "debug"
# One or more inputs under 'input' subtree
[input.input1]
# Listen parameters can be IP:Port or Unix Socket path
# Set the parameter to empty or comment it out to disable it
# At least one of 'listen' or 'listenWS' have to be specified
## Port to receive Riemann TCP Protobuf events on
listen = "127.0.0.1:1234"
## Port to receive WebSocket Riemann JSON events on
listen_ws = "127.0.0.1:12345"
# Read timeout on incoming connections
timeout_read = "5s"
# Write timeout on incoming connections
timeout_write = "5s"
# A list of outputs where to send events received
# by this input. At least one output is required
outputs = [ "output1" ]
# One or more outputs under 'output' subtree
[output.output1]
# Output type, can be 'carbon' or 'riemann'
# Carbon is a plaintext one-metric-per-line
# Riemann is a Protobuf based output
type = "carbon"
# Algorithm to use when choosing targets
#
# Can be one of:
# - roundrobin: spread metrics over all targets evenly
# - broadcast: copy metrics to all targets
# - hash: use hash to choose a target to get consistent target mapping
# See parameter 'hash_fields' below for hashing key
# - failover: send metrics to the first live target (left to right in the target list, see below)
algo = "hash"
# Send events to a random/next live target if the target selected by roundrobin/hash algorithms is dead.
# Obviously this makes no sense for broadcast/failover algorithms.
#
# If this is 'false' then the events for the down targets will be accumulated in their buffers and,
# if the target is down for an extended period of time, new events will be discarded.
#
# Be aware that the status of the target is not be reflected instantly and some small number of metrics
# might anyway go to target's buffer while it's still considered alive.
algo_failover = false
# List of Riemann event fields to use to form output.
# Required if output type is 'carbon' or 'clickhouse'.
#
# For Carbon the values of the fields are joined together with a '.' separator.
# For Clickhouse they are mapped to the columns in the target table.
# This means that the number of columns in the table should be equal to the number of fields in this setting.
# And their types should support the corresponding fields.
#
# Possible values:
# - state
# - service
# - host
# - description
#
# These directly map to corresponding fields in the event Protobuf.
#
# Additionally you can use:
# - tag:name
# If there's a tag 'name' in the Event then 'name' will be used as value
# - attr:name
# If there's an attribute 'name' in the Event then it's value will be used
# - custom:whatever
# Just use the constant after the ':' as a value. Makes no sense for 'hash_fields',
# but can be useful in 'carbon_fields'
# If there's no tag/attribute found by this name then it's ignored
#
# For Clickhouse you can also use:
# - timestamp
# - value
riemann_fields = [ "attr:prefix", "host", "service", "custom:foobar" ]
# Which Riemann value field to use when forming a Carbon or Clickhouse metric.
# Riemann Protobuf has 3 value fields (int, float and double)
#
# Possible values:
# - int
# - float
# - double
# - any
#
# If you specify 'any' then all fields are checked (double -> int -> float)
# and first non-zero is used as a value. If all of them are zero then zero is used.
# This is probably the same that Riemann itself does according to docs.
#
# Value is converted to float64
riemann_value = "any"
# List of Riemann event fields to use as a hashing key, required if the 'algo' is 'hash'
# These are evaluated left-to-right, although for hashing purposes it does not matter.
# Only string fields are supported (all except 'timestamp' and 'value')
#
# For syntax see 'riemann_fields' parameter up there.
hash_fields = [ "attr:foo", "host", "service", "tag:bar" ]
# Clickhouse table in 'table' or 'db.table' format
# Applicable only to the Clickhouse output type
ch_table = "metrics"
# List of targets to send events to.
# Can be IP:Port or a Unix Socket path for Riemann/Carbon and URL for Clickhouse.
targets = [ "1.1.1.1:1234", "2.2.2.2:1234", "3.3.3.3:1234" ]
# Output metric buffer size *per target* (number of events)
#
# If the target is down then the metrics are accumulated in this buffer until
# the target is up again (unless 'algo_failover' is 'true')
# If the buffer is full then new metrics will be discarded.
buffer_size = 200000
# Number of metrics/events to send in one iteration.
#
# For Carbon this is a number of metrics in a single TCP write (larger batch -> fewer system calls)
# For Riemann this is a number of events sent in a single Protobuf message.
# For Clickhouse this is a number of events sent in one HTTP request. This should be large enough (e.g. several 10s of thousands)
#
# If the amount of pending metrics is equal to this value then they're flushed immediately.
# If it's less then it will be flushed every 'batch_timeout'
batch_size = 50
# How frequently to flush batches to a target if it's less than 'batch_size'
batch_timeout = "1s"
# Delay between connection retries when the target is down
reconnect_interval = "1s"
# How long to wait for the connection to be established
connect_timeout = "1s"
# Read timeout on outgoing connections
timeout_read = "5s"
# Write timeout on outgoing connections
timeout_write = "5s"