Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: compute_engine_scripts/monitoring/carbon.conf

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

Powered by Google App Engine
This is Rietveld 408576698