]> git.pld-linux.org Git - packages/carbon.git/blob - carbon.conf
BR: rpmbuild(macros) >= 1.710
[packages/carbon.git] / carbon.conf
1 [cache]
2 # Configure carbon directories.
3 #
4 # OS environment variables can be used to tell carbon where graphite is
5 # installed, where to read configuration from and where to write data.
6 #
7 #   GRAPHITE_ROOT        - Root directory of the graphite installation.
8 #                          Defaults to ../
9 #   GRAPHITE_CONF_DIR    - Configuration directory (where this file lives).
10 #                          Defaults to $GRAPHITE_ROOT/conf/
11 #   GRAPHITE_STORAGE_DIR - Storage directory for whipser/rrd/log/pid files.
12 #                          Defaults to $GRAPHITE_ROOT/storage/
13 #
14 # To change other directory paths, add settings to this file. The following
15 # configuration variables are available with these default values:
16 #
17 #   STORAGE_DIR    = $GRAPHITE_STORAGE_DIR
18 #   LOCAL_DATA_DIR = STORAGE_DIR/whisper/
19 #   WHITELISTS_DIR = STORAGE_DIR/lists/
20 #   CONF_DIR       = STORAGE_DIR/conf/
21 #   LOG_DIR        = STORAGE_DIR/log/
22 #   PID_DIR        = STORAGE_DIR/
23 #
24 # For FHS style directory structures, use:
25 #
26 STORAGE_DIR    = /var/lib/carbon/
27 CONF_DIR       = /etc/carbon/
28 LOG_DIR        = /var/log/carbon/
29 PID_DIR        = /var/run/
30 #
31 #LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
32 LOCAL_DATA_DIR = /var/lib/carbon/whisper/
33
34 WHITELISTS_DIR = /var/lib/carbon/lists/
35
36 # Enable daily log rotation. If disabled, a kill -HUP can be used after a manual rotate
37 ENABLE_LOGROTATION = True
38
39 # Specify the user to drop privileges to
40 # If this is blank carbon runs as the user that invokes it
41 # This user must have write access to the local data directory
42 USER = carbon
43 #
44 # NOTE: The above settings must be set under [relay] and [aggregator]
45 #       to take effect for those daemons as well
46
47 # Limit the size of the cache to avoid swapping or becoming CPU bound.
48 # Sorts and serving cache queries gets more expensive as the cache grows.
49 # Use the value "inf" (infinity) for an unlimited cache size.
50 MAX_CACHE_SIZE = inf
51
52 # Limits the number of whisper update_many() calls per second, which effectively
53 # means the number of write requests sent to the disk. This is intended to
54 # prevent over-utilizing the disk and thus starving the rest of the system.
55 # When the rate of required updates exceeds this, then carbon's caching will
56 # take effect and increase the overall throughput accordingly.
57 MAX_UPDATES_PER_SECOND = 500
58
59 # If defined, this changes the MAX_UPDATES_PER_SECOND in Carbon when a
60 # stop/shutdown is initiated.  This helps when MAX_UPDATES_PER_SECOND is
61 # relatively low and carbon has cached a lot of updates; it enables the carbon
62 # daemon to shutdown more quickly. 
63 # MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000
64
65 # Softly limits the number of whisper files that get created each minute.
66 # Setting this value low (like at 50) is a good way to ensure your graphite
67 # system will not be adversely impacted when a bunch of new metrics are
68 # sent to it. The trade off is that it will take much longer for those metrics'
69 # database files to all get created and thus longer until the data becomes usable.
70 # Setting this value high (like "inf" for infinity) will cause graphite to create
71 # the files quickly but at the risk of slowing I/O down considerably for a while.
72 MAX_CREATES_PER_MINUTE = 50
73
74 LINE_RECEIVER_INTERFACE = 0.0.0.0
75 LINE_RECEIVER_PORT = 2003
76
77 # Set this to True to enable the UDP listener. By default this is off
78 # because it is very common to run multiple carbon daemons and managing
79 # another (rarely used) port for every carbon instance is not fun.
80 ENABLE_UDP_LISTENER = False
81 UDP_RECEIVER_INTERFACE = 0.0.0.0
82 UDP_RECEIVER_PORT = 2003
83
84 PICKLE_RECEIVER_INTERFACE = 0.0.0.0
85 PICKLE_RECEIVER_PORT = 2004
86
87 # Set to false to disable logging of successful connections
88 LOG_LISTENER_CONNECTIONS = True
89
90 # Per security concerns outlined in Bug #817247 the pickle receiver
91 # will use a more secure and slightly less efficient unpickler.
92 # Set this to True to revert to the old-fashioned insecure unpickler.
93 USE_INSECURE_UNPICKLER = False
94
95 CACHE_QUERY_INTERFACE = 0.0.0.0
96 CACHE_QUERY_PORT = 7002
97
98 # Set this to False to drop datapoints received after the cache
99 # reaches MAX_CACHE_SIZE. If this is True (the default) then sockets
100 # over which metrics are received will temporarily stop accepting
101 # data until the cache size falls below 95% MAX_CACHE_SIZE.
102 USE_FLOW_CONTROL = True
103
104 # By default, carbon-cache will log every whisper update and cache hit. This can be excessive and
105 # degrade performance if logging on the same volume as the whisper data is stored.
106 LOG_UPDATES = False
107 LOG_CACHE_HITS = False
108 LOG_CACHE_QUEUE_SORTS = True
109
110 # The thread that writes metrics to disk can use on of the following strategies
111 # determining the order in which metrics are removed from cache and flushed to
112 # disk. The default option preserves the same behavior as has been historically
113 # available in version 0.9.10.
114 #
115 # sorted - All metrics in the cache will be counted and an ordered list of
116 # them will be sorted according to the number of datapoints in the cache at the
117 # moment of the list's creation. Metrics will then be flushed from the cache to
118 # disk in that order.
119 #
120 # max - The writer thread will always pop and flush the metric from cache
121 # that has the most datapoints. This will give a strong flush preference to
122 # frequently updated metrics and will also reduce random file-io. Infrequently
123 # updated metrics may only ever be persisted to disk at daemon shutdown if
124 # there are a large number of metrics which receive very frequent updates OR if
125 # disk i/o is very slow.
126 #
127 # naive - Metrics will be flushed from the cache to disk in an unordered
128 # fashion. This strategy may be desirable in situations where the storage for
129 # whisper files is solid state, CPU resources are very limited or deference to
130 # the OS's i/o scheduler is expected to compensate for the random write
131 # pattern.
132 #
133 CACHE_WRITE_STRATEGY = sorted
134
135 # On some systems it is desirable for whisper to write synchronously.
136 # Set this option to True if you'd like to try this. Basically it will
137 # shift the onus of buffering writes from the kernel into carbon's cache.
138 WHISPER_AUTOFLUSH = False
139
140 # By default new Whisper files are created pre-allocated with the data region
141 # filled with zeros to prevent fragmentation and speed up contiguous reads and
142 # writes (which are common). Enabling this option will cause Whisper to create
143 # the file sparsely instead. Enabling this option may allow a large increase of
144 # MAX_CREATES_PER_MINUTE but may have longer term performance implications
145 # depending on the underlying storage configuration.
146 # WHISPER_SPARSE_CREATE = False
147
148 # Only beneficial on linux filesystems that support the fallocate system call.
149 # It maintains the benefits of contiguous reads/writes, but with a potentially
150 # much faster creation speed, by allowing the kernel to handle the block
151 # allocation and zero-ing. Enabling this option may allow a large increase of
152 # MAX_CREATES_PER_MINUTE. If enabled on an OS or filesystem that is unsupported
153 # this option will gracefully fallback to standard POSIX file access methods.
154 WHISPER_FALLOCATE_CREATE = True
155
156 # Enabling this option will cause Whisper to lock each Whisper file it writes
157 # to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when
158 # multiple carbon-cache daemons are writing to the same files
159 # WHISPER_LOCK_WRITES = False
160
161 # Set this to True to enable whitelisting and blacklisting of metrics in
162 # CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
163 # empty, all metrics will pass through
164 # USE_WHITELIST = False
165
166 # By default, carbon itself will log statistics (such as a count,
167 # metricsReceived) with the top level prefix of 'carbon' at an interval of 60
168 # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
169 # CARBON_METRIC_PREFIX = carbon
170 # CARBON_METRIC_INTERVAL = 60
171
172 # Enable AMQP if you want to receve metrics using an amqp broker
173 # ENABLE_AMQP = False
174
175 # Verbose means a line will be logged for every metric received
176 # useful for testing
177 # AMQP_VERBOSE = False
178
179 # AMQP_HOST = localhost
180 # AMQP_PORT = 5672
181 # AMQP_VHOST = /
182 # AMQP_USER = guest
183 # AMQP_PASSWORD = guest
184 # AMQP_EXCHANGE = graphite
185 # AMQP_METRIC_NAME_IN_BODY = False
186
187 # The manhole interface allows you to SSH into the carbon daemon
188 # and get a python interpreter. BE CAREFUL WITH THIS! If you do
189 # something like time.sleep() in the interpreter, the whole process
190 # will sleep! This is *extremely* helpful in debugging, assuming
191 # you are familiar with the code. If you are not, please don't
192 # mess with this, you are asking for trouble :)
193 #
194 # ENABLE_MANHOLE = False
195 # MANHOLE_INTERFACE = 127.0.0.1
196 # MANHOLE_PORT = 7222
197 # MANHOLE_USER = admin
198 # MANHOLE_PUBLIC_KEY = ssh-rsa AAAAB3NzaC1yc2EAAAABiwAaAIEAoxN0sv/e4eZCPpi3N3KYvyzRaBaMeS2RsOQ/cDuKv11dlNzVeiyc3RFmCv5Rjwn/lQ79y0zyHxw67qLyhQ/kDzINc4cY41ivuQXm2tPmgvexdrBv5nsfEpjs3gLZfJnyvlcVyWK/lId8WUvEWSWHTzsbtmXAF2raJMdgLTbQ8wE=
199
200 # Patterns for all of the metrics this machine will store. Read more at
201 # http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings
202 #
203 # Example: store all sales, linux servers, and utilization metrics
204 # BIND_PATTERNS = sales.#, servers.linux.#, #.utilization
205 #
206 # Example: store everything
207 # BIND_PATTERNS = #
208
209 # To configure special settings for the carbon-cache instance 'b', uncomment this:
210 #[cache:b]
211 #LINE_RECEIVER_PORT = 2103
212 #PICKLE_RECEIVER_PORT = 2104
213 #CACHE_QUERY_PORT = 7102
214 # and any other settings you want to customize, defaults are inherited
215 # from [carbon] section.
216 # You can then specify the --instance=b option to manage this instance
217
218
219
220 [relay]
221 LINE_RECEIVER_INTERFACE = 0.0.0.0
222 LINE_RECEIVER_PORT = 2013
223 PICKLE_RECEIVER_INTERFACE = 0.0.0.0
224 PICKLE_RECEIVER_PORT = 2014
225
226 # Set to false to disable logging of successful connections
227 LOG_LISTENER_CONNECTIONS = True
228
229 # Carbon-relay has several options for metric routing controlled by RELAY_METHOD
230 #
231 # Use relay-rules.conf to route metrics to destinations based on pattern rules
232 #RELAY_METHOD = rules
233 #
234 # Use consistent-hashing for even distribution of metrics between destinations
235 #RELAY_METHOD = consistent-hashing
236 #
237 # Use consistent-hashing but take into account an aggregation-rules.conf shared
238 # by downstream carbon-aggregator daemons. This will ensure that all metrics
239 # that map to a given aggregation rule are sent to the same carbon-aggregator
240 # instance.
241 # Enable this for carbon-relays that send to a group of carbon-aggregators
242 #RELAY_METHOD = aggregated-consistent-hashing
243 RELAY_METHOD = rules
244
245 # If you use consistent-hashing you can add redundancy by replicating every
246 # datapoint to more than one machine.
247 REPLICATION_FACTOR = 1
248
249 # This is a list of carbon daemons we will send any relayed or
250 # generated metrics to. The default provided would send to a single
251 # carbon-cache instance on the default port. However if you
252 # use multiple carbon-cache instances then it would look like this:
253 #
254 # DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b
255 #
256 # The general form is IP:PORT:INSTANCE where the :INSTANCE part is
257 # optional and refers to the "None" instance if omitted.
258 #
259 # Note that if the destinations are all carbon-caches then this should
260 # exactly match the webapp's CARBONLINK_HOSTS setting in terms of
261 # instances listed (order matters!).
262 #
263 # If using RELAY_METHOD = rules, all destinations used in relay-rules.conf
264 # must be defined in this list
265 DESTINATIONS = 127.0.0.1:2004
266
267 # This defines the maximum "message size" between carbon daemons.
268 # You shouldn't need to tune this unless you really know what you're doing.
269 MAX_DATAPOINTS_PER_MESSAGE = 500
270 MAX_QUEUE_SIZE = 10000
271
272 # Set this to False to drop datapoints when any send queue (sending datapoints
273 # to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
274 # default) then sockets over which metrics are received will temporarily stop accepting
275 # data until the send queues fall below 80% MAX_QUEUE_SIZE.
276 USE_FLOW_CONTROL = True
277
278 # Set this to True to enable whitelisting and blacklisting of metrics in
279 # CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
280 # empty, all metrics will pass through
281 # USE_WHITELIST = False
282
283 # By default, carbon itself will log statistics (such as a count,
284 # metricsReceived) with the top level prefix of 'carbon' at an interval of 60
285 # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
286 # CARBON_METRIC_PREFIX = carbon
287 # CARBON_METRIC_INTERVAL = 60
288
289
290 [aggregator]
291 LINE_RECEIVER_INTERFACE = 0.0.0.0
292 LINE_RECEIVER_PORT = 2023
293
294 PICKLE_RECEIVER_INTERFACE = 0.0.0.0
295 PICKLE_RECEIVER_PORT = 2024
296
297 # Set to false to disable logging of successful connections
298 LOG_LISTENER_CONNECTIONS = True
299
300 # If set true, metric received will be forwarded to DESTINATIONS in addition to
301 # the output of the aggregation rules. If set false the carbon-aggregator will
302 # only ever send the output of aggregation.
303 FORWARD_ALL = True
304
305 # This is a list of carbon daemons we will send any relayed or
306 # generated metrics to. The default provided would send to a single
307 # carbon-cache instance on the default port. However if you
308 # use multiple carbon-cache instances then it would look like this:
309 #
310 # DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b
311
312 # The format is comma-delimited IP:PORT:INSTANCE where the :INSTANCE part is
313 # optional and refers to the "None" instance if omitted.
314 #
315 # Note that if the destinations are all carbon-caches then this should
316 # exactly match the webapp's CARBONLINK_HOSTS setting in terms of
317 # instances listed (order matters!).
318 DESTINATIONS = 127.0.0.1:2004
319
320 # If you want to add redundancy to your data by replicating every
321 # datapoint to more than one machine, increase this.
322 REPLICATION_FACTOR = 1
323
324 # This is the maximum number of datapoints that can be queued up
325 # for a single destination. Once this limit is hit, we will
326 # stop accepting new data if USE_FLOW_CONTROL is True, otherwise
327 # we will drop any subsequently received datapoints.
328 MAX_QUEUE_SIZE = 10000
329
330 # Set this to False to drop datapoints when any send queue (sending datapoints
331 # to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
332 # default) then sockets over which metrics are received will temporarily stop accepting
333 # data until the send queues fall below 80% MAX_QUEUE_SIZE.
334 USE_FLOW_CONTROL = True
335
336 # This defines the maximum "message size" between carbon daemons.
337 # You shouldn't need to tune this unless you really know what you're doing.
338 MAX_DATAPOINTS_PER_MESSAGE = 500
339
340 # This defines how many datapoints the aggregator remembers for
341 # each metric. Aggregation only happens for datapoints that fall in
342 # the past MAX_AGGREGATION_INTERVALS * intervalSize seconds.
343 MAX_AGGREGATION_INTERVALS = 5
344
345 # By default (WRITE_BACK_FREQUENCY = 0), carbon-aggregator will write back
346 # aggregated data points once every rule.frequency seconds, on a per-rule basis.
347 # Set this (WRITE_BACK_FREQUENCY = N) to write back all aggregated data points
348 # every N seconds, independent of rule frequency. This is useful, for example,
349 # to be able to query partially aggregated metrics from carbon-cache without
350 # having to first wait rule.frequency seconds.
351 # WRITE_BACK_FREQUENCY = 0
352
353 # Set this to True to enable whitelisting and blacklisting of metrics in
354 # CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
355 # empty, all metrics will pass through
356 # USE_WHITELIST = False
357
358 # By default, carbon itself will log statistics (such as a count,
359 # metricsReceived) with the top level prefix of 'carbon' at an interval of 60
360 # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
361 # CARBON_METRIC_PREFIX = carbon
362 # CARBON_METRIC_INTERVAL = 60
This page took 0.082053 seconds and 3 git commands to generate.