| 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 whisper/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)s/whisper/ |
| 19 |
# WHITELISTS_DIR = %(STORAGE_DIR)s/lists/ |
| 20 |
# CONF_DIR = %(STORAGE_DIR)s/conf/ |
| 21 |
# LOG_DIR = %(STORAGE_DIR)s/log/ |
| 22 |
# PID_DIR = %(STORAGE_DIR)s/ |
| 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 |
STORAGE_DIR = /var/lib/graphite/ |
| 34 |
LOCAL_DATA_DIR = /var/lib/graphite/whisper/ |
| 35 |
CONF_DIR = /etc/carbon/ |
| 36 |
LOG_DIR = /var/log/carbon/ |
| 37 |
PID_DIR = /var/run/ |
| 38 |
|
| 39 |
# Specify the database library used to store metric data on disk. Each database |
| 40 |
# may have configurable options to change the behaviour of how it writes to |
| 41 |
# persistent storage. |
| 42 |
# |
| 43 |
# whisper - Fixed-size database, similar in design and purpose to RRD. This is |
| 44 |
# the default storage backend for carbon and the most rigorously tested. |
| 45 |
# |
| 46 |
# ceres - Experimental alternative database that supports storing data in sparse |
| 47 |
# files of arbitrary fixed-size resolutions. |
| 48 |
DATABASE = whisper |
| 49 |
|
| 50 |
# Enable daily log rotation. If disabled, a new file will be opened whenever the log file path no |
| 51 |
# longer exists (i.e. it is removed or renamed) |
| •52 |
ENABLE_LOGROTATION = False |
| 53 |
|
| 54 |
# Specify the user to drop privileges to |
| 55 |
# If this is blank carbon-cache runs as the user that invokes it |
| 56 |
# This user must have write access to the local data directory |
| •57 |
USER = _graphite |
| 58 |
|
| 59 |
# Limit the size of the cache to avoid swapping or becoming CPU bound. |
| 60 |
# Sorts and serving cache queries gets more expensive as the cache grows. |
| 61 |
# Use the value "inf" (infinity) for an unlimited cache size. |
| 62 |
# value should be an integer number of metric datapoints. |
| 63 |
MAX_CACHE_SIZE = inf |
| 64 |
|
| 65 |
# Limits the number of whisper update_many() calls per second, which effectively |
| 66 |
# means the number of write requests sent to the disk. This is intended to |
| 67 |
# prevent over-utilizing the disk and thus starving the rest of the system. |
| 68 |
# When the rate of required updates exceeds this, then carbon's caching will |
| 69 |
# take effect and increase the overall throughput accordingly. |
| 70 |
MAX_UPDATES_PER_SECOND = 500 |
| 71 |
|
| 72 |
# If defined, this changes the MAX_UPDATES_PER_SECOND in Carbon when a |
| 73 |
# stop/shutdown is initiated. This helps when MAX_UPDATES_PER_SECOND is |
| 74 |
# relatively low and carbon has cached a lot of updates; it enables the carbon |
| 75 |
# daemon to shutdown more quickly. |
| 76 |
# MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000 |
| 77 |
|
| 78 |
# Softly limits the number of whisper files that get created each minute. |
| 79 |
# Setting this value low (e.g. 50) is a good way to ensure that your carbon |
| 80 |
# system will not be adversely impacted when a bunch of new metrics are |
| 81 |
# sent to it. The trade off is that any metrics received in excess of this |
| 82 |
# value will be silently dropped, and the whisper file will not be created |
| 83 |
# until such point as a subsequent metric is received and fits within the |
| 84 |
# defined rate limit. Setting this value high (like "inf" for infinity) will |
| 85 |
# cause carbon to create the files quickly but at the risk of increased I/O. |
| 86 |
MAX_CREATES_PER_MINUTE = 50 |
| 87 |
|
| 88 |
# Set the minimum timestamp resolution supported by this instance. This allows |
| 89 |
# internal optimisations by overwriting points with equal truncated timestamps |
| 90 |
# in order to limit the number of updates to the database. It defaults to one |
| 91 |
# second. |
| 92 |
MIN_TIMESTAMP_RESOLUTION = 1 |
| 93 |
|
| 94 |
# Set the minimum lag in seconds for a point to be written to the database |
| 95 |
# in order to optimize batching. This means that each point will wait at least |
| 96 |
# the duration of this lag before being written. Setting this to 0 disable the feature. |
| 97 |
# This currently only works when using the timesorted write strategy. |
| 98 |
# MIN_TIMESTAMP_LAG = 0 |
| 99 |
|
| 100 |
# Set the interface and port for the line (plain text) listener. Setting the |
| 101 |
# interface to 0.0.0.0 listens on all interfaces. Port can be set to 0 to |
| 102 |
# disable this listener if it is not required. |
| 103 |
LINE_RECEIVER_INTERFACE = 0.0.0.0 |
| 104 |
LINE_RECEIVER_PORT = 2003 |
| 105 |
|
| 106 |
# Set this to True to enable the UDP listener. By default this is off |
| 107 |
# because it is very common to run multiple carbon daemons and managing |
| 108 |
# another (rarely used) port for every carbon instance is not fun. |
| 109 |
ENABLE_UDP_LISTENER = False |
| 110 |
UDP_RECEIVER_INTERFACE = 0.0.0.0 |
| 111 |
UDP_RECEIVER_PORT = 2003 |
| 112 |
|
| 113 |
# Set the interface and port for the pickle listener. Setting the interface to |
| 114 |
# 0.0.0.0 listens on all interfaces. Port can be set to 0 to disable this |
| 115 |
# listener if it is not required. |
| 116 |
PICKLE_RECEIVER_INTERFACE = 0.0.0.0 |
| 117 |
PICKLE_RECEIVER_PORT = 2004 |
| 118 |
|
| 119 |
# Set the maximum length for a received pickle string (in bytes). |
| 120 |
# If the string length is bigger, the receiver will silently close connection. |
| 121 |
# Useful for big metric batches. |
| 122 |
# Default value is 1 Mb |
| 123 |
PICKLE_RECEIVER_MAX_LENGTH = 1048576 |
| 124 |
|
| 125 |
# Set the interface and port for the protobuf listener. Setting the interface to |
| 126 |
# 0.0.0.0 listens on all interfaces. Port can be set to 0 to disable this |
| 127 |
# listener if it is not required. |
| 128 |
# PROTOBUF_RECEIVER_INTERFACE = 0.0.0.0 |
| 129 |
# PROTOBUF_RECEIVER_PORT = 2005 |
| 130 |
|
| 131 |
# Limit the number of open connections the receiver can handle as any time. |
| 132 |
# Default is no limit. Setting up a limit for sites handling high volume |
| 133 |
# traffic may be recommended to avoid running out of TCP memory or having |
| 134 |
# thousands of TCP connections reduce the throughput of the service. |
| 135 |
#MAX_RECEIVER_CONNECTIONS = inf |
| 136 |
|
| 137 |
# Per security concerns outlined in Bug #817247 the pickle receiver |
| 138 |
# will use a more secure and slightly less efficient unpickler. |
| 139 |
# Set this to True to revert to the old-fashioned insecure unpickler. |
| 140 |
USE_INSECURE_UNPICKLER = False |
| 141 |
|
| 142 |
CACHE_QUERY_INTERFACE = 0.0.0.0 |
| 143 |
CACHE_QUERY_PORT = 7002 |
| 144 |
|
| 145 |
# Set this to False to drop datapoints received after the cache |
| 146 |
# reaches MAX_CACHE_SIZE. If this is True (the default) then sockets |
| 147 |
# over which metrics are received will temporarily stop accepting |
| 148 |
# data until the cache size falls below 95% MAX_CACHE_SIZE. |
| 149 |
USE_FLOW_CONTROL = True |
| 150 |
|
| 151 |
# If enabled this setting is used to timeout metric client connection if no |
| 152 |
# metrics have been sent in specified time in seconds |
| 153 |
#METRIC_CLIENT_IDLE_TIMEOUT = None |
| 154 |
|
| 155 |
# By default, carbon-cache will log every whisper update and cache hit. |
| 156 |
# This can be excessive and degrade performance if logging on the same |
| 157 |
# volume as the whisper data is stored. |
| 158 |
LOG_UPDATES = False |
| 159 |
LOG_CREATES = False |
| 160 |
LOG_CACHE_HITS = False |
| 161 |
LOG_CACHE_QUEUE_SORTS = False |
| 162 |
|
| 163 |
# The thread that writes metrics to disk can use one of the following strategies |
| 164 |
# determining the order in which metrics are removed from cache and flushed to |
| 165 |
# disk. The default option preserves the same behavior as has been historically |
| 166 |
# available in version 0.9.10. |
| 167 |
# |
| 168 |
# sorted - All metrics in the cache will be counted and an ordered list of |
| 169 |
# them will be sorted according to the number of datapoints in the cache at the |
| 170 |
# moment of the list's creation. Metrics will then be flushed from the cache to |
| 171 |
# disk in that order. |
| 172 |
# |
| 173 |
# timesorted - All metrics in the list will be looked at and sorted according |
| 174 |
# to the timestamp of there datapoints. The metric that were the least recently |
| 175 |
# written will be written first. This is an hybrid strategy between max and |
| 176 |
# sorted which is particularly adapted to sets of metrics with non-uniform |
| 177 |
# resolutions. |
| 178 |
# |
| 179 |
# max - The writer thread will always pop and flush the metric from cache |
| 180 |
# that has the most datapoints. This will give a strong flush preference to |
| 181 |
# frequently updated metrics and will also reduce random file-io. Infrequently |
| 182 |
# updated metrics may only ever be persisted to disk at daemon shutdown if |
| 183 |
# there are a large number of metrics which receive very frequent updates OR if |
| 184 |
# disk i/o is very slow. |
| 185 |
# |
| 186 |
# naive - Metrics will be flushed from the cache to disk in an unordered |
| 187 |
# fashion. This strategy may be desirable in situations where the storage for |
| 188 |
# whisper files is solid state, CPU resources are very limited or deference to |
| 189 |
# the OS's i/o scheduler is expected to compensate for the random write |
| 190 |
# pattern. |
| 191 |
# |
| 192 |
CACHE_WRITE_STRATEGY = sorted |
| 193 |
|
| 194 |
# On some systems it is desirable for whisper to write synchronously. |
| 195 |
# Set this option to True if you'd like to try this. Basically it will |
| 196 |
# shift the onus of buffering writes from the kernel into carbon's cache. |
| 197 |
WHISPER_AUTOFLUSH = False |
| 198 |
|
| 199 |
# By default new Whisper files are created pre-allocated with the data region |
| 200 |
# filled with zeros to prevent fragmentation and speed up contiguous reads and |
| 201 |
# writes (which are common). Enabling this option will cause Whisper to create |
| 202 |
# the file sparsely instead. Enabling this option may allow a large increase of |
| 203 |
# MAX_CREATES_PER_MINUTE but may have longer term performance implications |
| 204 |
# depending on the underlying storage configuration. |
| 205 |
# WHISPER_SPARSE_CREATE = False |
| 206 |
|
| 207 |
# Only beneficial on linux filesystems that support the fallocate system call. |
| 208 |
# It maintains the benefits of contiguous reads/writes, but with a potentially |
| 209 |
# much faster creation speed, by allowing the kernel to handle the block |
| 210 |
# allocation and zero-ing. Enabling this option may allow a large increase of |
| 211 |
# MAX_CREATES_PER_MINUTE. If enabled on an OS or filesystem that is unsupported |
| 212 |
# this option will gracefully fallback to standard POSIX file access methods. |
| 213 |
# If enabled, disables WHISPER_SPARSE_CREATE regardless of the value. |
| 214 |
WHISPER_FALLOCATE_CREATE = True |
| 215 |
|
| 216 |
# Enabling this option will cause Whisper to lock each Whisper file it writes |
| 217 |
# to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when |
| 218 |
# multiple carbon-cache daemons are writing to the same files. |
| 219 |
# WHISPER_LOCK_WRITES = False |
| 220 |
|
| 221 |
# On systems which has a large number of metrics, an amount of Whisper write(2)'s |
| 222 |
# pageback sometimes cause disk thrashing due to memory shortage, so that abnormal |
| 223 |
# disk reads occur. Enabling this option makes it possible to decrease useless |
| 224 |
# page cache memory by posix_fadvise(2) with POSIX_FADVISE_RANDOM option. |
| 225 |
# WHISPER_FADVISE_RANDOM = False |
| 226 |
|
| 227 |
# By default all nodes stored in Ceres are cached in memory to improve the |
| 228 |
# throughput of reads and writes to underlying slices. Turning this off will |
| 229 |
# greatly reduce memory consumption for databases with millions of metrics, at |
| 230 |
# the cost of a steep increase in disk i/o, approximately an extra two os.stat |
| 231 |
# calls for every read and write. Reasons to do this are if the underlying |
| 232 |
# storage can handle stat() with practically zero cost (SSD, NVMe, zRAM). |
| 233 |
# Valid values are: |
| 234 |
# all - all nodes are cached |
| 235 |
# none - node caching is disabled |
| 236 |
# CERES_NODE_CACHING_BEHAVIOR = all |
| 237 |
|
| 238 |
# Ceres nodes can have many slices and caching the right ones can improve |
| 239 |
# performance dramatically. Note that there are many trade-offs to tinkering |
| 240 |
# with this, and unless you are a ceres developer you *really* should not |
| 241 |
# mess with this. Valid values are: |
| 242 |
# latest - only the most recent slice is cached |
| 243 |
# all - all slices are cached |
| 244 |
# none - slice caching is disabled |
| 245 |
# CERES_SLICE_CACHING_BEHAVIOR = latest |
| 246 |
|
| 247 |
# If a Ceres node accumulates too many slices, performance can suffer. |
| 248 |
# This can be caused by intermittently reported data. To mitigate |
| 249 |
# slice fragmentation there is a tolerance for how much space can be |
| 250 |
# wasted within a slice file to avoid creating a new one. That tolerance |
| 251 |
# level is determined by MAX_SLICE_GAP, which is the number of consecutive |
| 252 |
# null datapoints allowed in a slice file. |
| 253 |
# If you set this very low, you will waste less of the *tiny* bit disk space |
| 254 |
# that this feature wastes, and you will be prone to performance problems |
| 255 |
# caused by slice fragmentation, which can be pretty severe. |
| 256 |
# If you set this really high, you will waste a bit more disk space (each |
| 257 |
# null datapoint wastes 8 bytes, but keep in mind your filesystem's block |
| 258 |
# size). If you suffer slice fragmentation issues, you should increase this or |
| 259 |
# run the ceres-maintenance defrag plugin more often. However you should not |
| 260 |
# set it to be huge because then if a large but allowed gap occurs it has to |
| 261 |
# get filled in, which means instead of a simple 8-byte write to a new file we |
| 262 |
# could end up doing an (8 * MAX_SLICE_GAP)-byte write to the latest slice. |
| 263 |
# CERES_MAX_SLICE_GAP = 80 |
| 264 |
|
| 265 |
# Enabling this option will cause Ceres to lock each Ceres file it writes to |
| 266 |
# to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when |
| 267 |
# multiple carbon-cache daemons are writing to the same files. |
| 268 |
# CERES_LOCK_WRITES = False |
| 269 |
|
| 270 |
# Set this to True to enable whitelisting and blacklisting of metrics in |
| 271 |
# CONF_DIR/whitelist.conf and CONF_DIR/blacklist.conf. If the whitelist is |
| 272 |
# missing or empty, all metrics will pass through |
| 273 |
# USE_WHITELIST = False |
| 274 |
|
| 275 |
# By default, carbon itself will log statistics (such as a count, |
| 276 |
# metricsReceived) with the top level prefix of 'carbon' at an interval of 60 |
| 277 |
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation |
| 278 |
# CARBON_METRIC_PREFIX = carbon |
| 279 |
# CARBON_METRIC_INTERVAL = 60 |
| 280 |
|
| 281 |
# Enable AMQP if you want to receive metrics using an amqp broker |
| 282 |
# ENABLE_AMQP = False |
| 283 |
|
| 284 |
# Verbose means a line will be logged for every metric received |
| 285 |
# useful for testing |
| 286 |
# AMQP_VERBOSE = False |
| 287 |
|
| 288 |
# AMQP_HOST = localhost |
| 289 |
# AMQP_PORT = 5672 |
| 290 |
# AMQP_VHOST = / |
| 291 |
# AMQP_USER = guest |
| 292 |
# AMQP_PASSWORD = guest |
| 293 |
# AMQP_EXCHANGE = graphite |
| 294 |
# AMQP_METRIC_NAME_IN_BODY = False |
| 295 |
|
| 296 |
# The manhole interface allows you to SSH into the carbon daemon |
| 297 |
# and get a python interpreter. BE CAREFUL WITH THIS! If you do |
| 298 |
# something like time.sleep() in the interpreter, the whole process |
| 299 |
# will sleep! This is *extremely* helpful in debugging, assuming |
| 300 |
# you are familiar with the code. If you are not, please don't |
| 301 |
# mess with this, you are asking for trouble :) |
| 302 |
# |
| 303 |
# You need the bcrypt, cryptography and pyasn1 python modules installed for |
| 304 |
# manhole to work. |
| 305 |
# |
| 306 |
# Generate host keys with: |
| 307 |
# `ckeygen -t rsa -f /example/host_keys/ssh_host_key_rsa` |
| 308 |
# |
| 309 |
# ENABLE_MANHOLE = False |
| 310 |
# MANHOLE_INTERFACE = 127.0.0.1 |
| 311 |
# MANHOLE_PORT = 7222 |
| 312 |
# MANHOLE_USER = admin |
| 313 |
# MANHOLE_PUBLIC_KEY = ssh-rsa AAAAB3NzaC1yc2EAAAABiwAaAIEAoxN0sv/e4eZCPpi3N3KYvyzRaBaMeS2RsOQ/cDuKv11dlNzVeiyc3RFmCv5Rjwn/lQ79y0zyHxw67qLyhQ/kDzINc4cY41ivuQXm2tPmgvexdrBv5nsfEpjs3gLZfJnyvlcVyWK/lId8WUvEWSWHTzsbtmXAF2raJMdgLTbQ8wE= |
| 314 |
# MANHOLE_HOST_KEY_DIR = /example/host_keys |
| 315 |
|
| 316 |
# Patterns for all of the metrics this machine will store. Read more at |
| 317 |
# http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings |
| 318 |
# |
| 319 |
# Example: store all sales, linux servers, and utilization metrics |
| 320 |
# BIND_PATTERNS = sales.#, servers.linux.#, #.utilization |
| 321 |
# |
| 322 |
# Example: store everything |
| 323 |
# BIND_PATTERNS = # |
| 324 |
|
| 325 |
# URL of graphite-web instance, this is used to add incoming series to the tag database |
| 326 |
# GRAPHITE_URL = http://127.0.0.1:80 |
| 327 |
|
| 328 |
# Tag support, when enabled carbon will make HTTP calls to graphite-web to update the tag index |
| 329 |
# ENABLE_TAGS = True |
| 330 |
|
| 331 |
# Skip tagging when metric do not contain tags |
| 332 |
# SKIP_TAGS_FOR_NONTAGGED = True |
| 333 |
|
| 334 |
# Tag update interval, this specifies how frequently updates to existing series will trigger |
| 335 |
# an update to the tag index, the default setting is once every 100 updates |
| 336 |
# TAG_UPDATE_INTERVAL = 100 |
| 337 |
|
| 338 |
# Tag hash filenames, this specifies whether tagged metric filenames should use the hash of the metric name |
| 339 |
# or a human-readable name, using hashed names avoids issues with path length when using a large number of tags |
| 340 |
# TAG_HASH_FILENAMES = True |
| 341 |
|
| 342 |
# Tag batch size, this specifies the maximum number of series to be sent to graphite-web in a single batch |
| 343 |
# TAG_BATCH_SIZE = 100 |
| 344 |
|
| 345 |
# Tag queue size, this specifies the maximum number of series to be queued for sending to graphite-web |
| 346 |
# There are separate queues for new series and for updates to existing series |
| 347 |
# TAG_QUEUE_SIZE = 10000 |
| 348 |
|
| 349 |
# Set to enable Sentry.io exception monitoring. |
| 350 |
# RAVEN_DSN='YOUR_DSN_HERE'. |
| 351 |
|
| 352 |
# To configure special settings for the carbon-cache instance 'b', uncomment this: |
| 353 |
#[cache:b] |
| 354 |
#LINE_RECEIVER_PORT = 2103 |
| 355 |
#PICKLE_RECEIVER_PORT = 2104 |
| 356 |
#CACHE_QUERY_PORT = 7102 |
| 357 |
# and any other settings you want to customize, defaults are inherited |
| 358 |
# from the [cache] section. |
| 359 |
# You can then specify the --instance=b option to manage this instance |
| 360 |
# |
| 361 |
# In order to turn off logging of successful connections for the line |
| 362 |
# receiver, set this to False |
| 363 |
# LOG_LISTENER_CONN_SUCCESS = True |
| 364 |
# |
| 365 |
# To turn off logging of lost connections for the line receiver set this to |
| 366 |
# False |
| 367 |
# LOG_LISTENER_CONN_LOST = False |
| 368 |
|
| 369 |
[relay] |
| 370 |
LINE_RECEIVER_INTERFACE = 0.0.0.0 |
| 371 |
LINE_RECEIVER_PORT = 2013 |
| 372 |
PICKLE_RECEIVER_INTERFACE = 0.0.0.0 |
| 373 |
PICKLE_RECEIVER_PORT = 2014 |
| 374 |
PICKLE_RECEIVER_MAX_LENGTH = 1048576 |
| 375 |
|
| 376 |
# Carbon-relay has several options for metric routing controlled by RELAY_METHOD |
| 377 |
# |
| 378 |
# Use relay-rules.conf to route metrics to destinations based on pattern rules |
| 379 |
#RELAY_METHOD = rules |
| 380 |
# |
| 381 |
# Use consistent-hashing for even distribution of metrics between destinations |
| 382 |
#RELAY_METHOD = consistent-hashing |
| 383 |
# |
| 384 |
# Use consistent-hashing but take into account an aggregation-rules.conf shared |
| 385 |
# by downstream carbon-aggregator daemons. This will ensure that all metrics |
| 386 |
# that map to a given aggregation rule are sent to the same carbon-aggregator |
| 387 |
# instance. |
| 388 |
# Enable this for carbon-relays that send to a group of carbon-aggregators |
| 389 |
#RELAY_METHOD = aggregated-consistent-hashing |
| 390 |
# |
| 391 |
# You can also use fast-hashing and fast-aggregated-hashing which are in O(1) |
| 392 |
# and will always redirect the metrics to the same destination but do not try |
| 393 |
# to minimize rebalancing when the list of destinations is changing. |
| 394 |
RELAY_METHOD = rules |
| 395 |
|
| 396 |
# If you use consistent-hashing you can add redundancy by replicating every |
| 397 |
# datapoint to more than one machine. |
| 398 |
REPLICATION_FACTOR = 1 |
| 399 |
|
| 400 |
# When relaying tagged metrics, you should consider setting TAG_RELAY_NORMALIZED |
| 401 |
# to True so that metrics are normalized before they are relayed. Without |
| 402 |
# normalization, there might be inconsistencies between the destination selected |
| 403 |
# by the consistent-hashing method and where graphite-web actually expects the |
| 404 |
# metrics to end up (carbon-cache and thus graphite-web always normalize). In |
| 405 |
# this case, graphite-web query results will be missing some of the data that |
| 406 |
# hasn't been written to disk yet by carbon-cache. This increases CPU usage |
| 407 |
# though, so you might leave this off if you know that only normalized metrics |
| 408 |
# will be received by your relay, for example because an upstream relay already |
| 409 |
# does normalization. |
| 410 |
#TAG_RELAY_NORMALIZED = False |
| 411 |
|
| 412 |
# For REPLICATION_FACTOR >=2, set DIVERSE_REPLICAS to True to guarantee replicas |
| 413 |
# across distributed hosts. With this setting disabled, it's possible that replicas |
| 414 |
# may be sent to different caches on the same host. This has been the default |
| 415 |
# behavior since introduction of 'consistent-hashing' relay method. |
| 416 |
# Note that enabling this on an existing pre-0.9.14 cluster will require rebalancing |
| 417 |
# your metrics across the cluster nodes using a tool like Carbonate. |
| 418 |
#DIVERSE_REPLICAS = True |
| 419 |
|
| 420 |
# This is a list of carbon daemons we will send any relayed or |
| 421 |
# generated metrics to. The default provided would send to a single |
| 422 |
# carbon-cache instance on the default port. However if you |
| 423 |
# use multiple carbon-cache instances then it would look like this: |
| 424 |
# |
| 425 |
# DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b |
| 426 |
# |
| 427 |
# The general form is IP:PORT:INSTANCE where the :INSTANCE part is |
| 428 |
# optional and refers to the "None" instance if omitted. |
| 429 |
# |
| 430 |
# Note that if the destinations are all carbon-caches then this should |
| 431 |
# exactly match the webapp's CARBONLINK_HOSTS setting in terms of |
| 432 |
# instances listed (order matters!). |
| 433 |
# |
| 434 |
# If using RELAY_METHOD = rules, all destinations used in relay-rules.conf |
| 435 |
# must be defined in this list |
| 436 |
DESTINATIONS = 127.0.0.1:2004 |
| 437 |
|
| 438 |
# This define the protocol to use to contact the destination. It can be |
| 439 |
# set to one of "line", "pickle", "udp" and "protobuf". This list can be |
| 440 |
# extended with CarbonClientFactory plugins and defaults to "pickle". |
| 441 |
# DESTINATION_PROTOCOL = pickle |
| 442 |
|
| 443 |
# This defines the wire transport, either none or ssl. |
| 444 |
# If SSL is used any TCP connection will be upgraded to TLS1. The system's |
| 445 |
# trust authority will be used unless DESTINATION_SSL_CA is specified in |
| 446 |
# which case an alternative certificate authority chain will be used for |
| 447 |
# verifying the remote certificate. |
| 448 |
# To use SSL you'll need the cryptography, service_identity, and twisted >= 14 |
| 449 |
# DESTINATION_TRANSPORT = none |
| 450 |
# DESTINATION_SSL_CA=/path/to/private-ca.crt |
| 451 |
|
| 452 |
# This allows to have multiple connections per destinations, this will |
| 453 |
# pool all the replicas of a single host in the same queue and distribute |
| 454 |
# points across these replicas instead of replicating them. |
| 455 |
# The following example will balance the load between :0 and :1. |
| 456 |
## DESTINATIONS = foo:2001:0, foo:2001:1 |
| 457 |
## RELAY_METHOD = rules |
| 458 |
# Note: this is currently incompatible with USE_RATIO_RESET which gets |
| 459 |
# disabled if this option is enabled. |
| 460 |
# DESTINATIONS_POOL_REPLICAS = False |
| 461 |
|
| 462 |
# When using consistent hashing it sometime makes sense to make |
| 463 |
# the ring dynamic when you don't want to loose points when a |
| 464 |
# single destination is down. Replication is an answer to that |
| 465 |
# but it can be quite expensive. |
| 466 |
# DYNAMIC_ROUTER = False |
| 467 |
|
| 468 |
# Controls the number of connection attempts before marking a |
| 469 |
# destination as down. We usually do one connection attempt per |
| 470 |
# second. |
| 471 |
# DYNAMIC_ROUTER_MAX_RETRIES = 5 |
| 472 |
|
| 473 |
# This is the maximum number of datapoints that can be queued up |
| 474 |
# for a single destination. Once this limit is hit, we will |
| 475 |
# stop accepting new data if USE_FLOW_CONTROL is True, otherwise |
| 476 |
# we will drop any subsequently received datapoints. |
| 477 |
MAX_QUEUE_SIZE = 10000 |
| 478 |
|
| 479 |
# This defines the maximum "message size" between carbon daemons. If |
| 480 |
# your queue is large, setting this to a lower number will cause the |
| 481 |
# relay to forward smaller discrete chunks of stats, which may prevent |
| 482 |
# overloading on the receiving side after a disconnect. |
| 483 |
MAX_DATAPOINTS_PER_MESSAGE = 500 |
| 484 |
|
| 485 |
# Limit the number of open connections the receiver can handle as any time. |
| 486 |
# Default is no limit. Setting up a limit for sites handling high volume |
| 487 |
# traffic may be recommended to avoid running out of TCP memory or having |
| 488 |
# thousands of TCP connections reduce the throughput of the service. |
| 489 |
#MAX_RECEIVER_CONNECTIONS = inf |
| 490 |
|
| 491 |
# Specify the user to drop privileges to |
| 492 |
# If this is blank carbon-relay runs as the user that invokes it |
| 493 |
# USER = |
| 494 |
|
| 495 |
# This is the percentage that the queue must be empty before it will accept |
| 496 |
# more messages. For a larger site, if the queue is very large it makes sense |
| 497 |
# to tune this to allow for incoming stats. So if you have an average |
| 498 |
# flow of 100k stats/minute, and a MAX_QUEUE_SIZE of 3,000,000, it makes sense |
| 499 |
# to allow stats to start flowing when you've cleared the queue to 95% since |
| 500 |
# you should have space to accommodate the next minute's worth of stats |
| 501 |
# even before the relay incrementally clears more of the queue |
| 502 |
QUEUE_LOW_WATERMARK_PCT = 0.8 |
| 503 |
|
| 504 |
# To allow for batch efficiency from the pickle protocol and to benefit from |
| 505 |
# other batching advantages, all writes are deferred by putting them into a queue, |
| 506 |
# and then the queue is flushed and sent a small fraction of a second later. |
| 507 |
TIME_TO_DEFER_SENDING = 0.0001 |
| 508 |
|
| 509 |
# Set this to False to drop datapoints when any send queue (sending datapoints |
| 510 |
# to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the |
| 511 |
# default) then sockets over which metrics are received will temporarily stop accepting |
| 512 |
# data until the send queues fall below QUEUE_LOW_WATERMARK_PCT * MAX_QUEUE_SIZE. |
| 513 |
USE_FLOW_CONTROL = True |
| 514 |
|
| 515 |
# If enabled this setting is used to timeout metric client connection if no |
| 516 |
# metrics have been sent in specified time in seconds |
| 517 |
#METRIC_CLIENT_IDLE_TIMEOUT = None |
| 518 |
|
| 519 |
# Set this to True to enable whitelisting and blacklisting of metrics in |
| 520 |
# CONF_DIR/whitelist.conf and CONF_DIR/blacklist.conf. If the whitelist is |
| 521 |
# missing or empty, all metrics will pass through |
| 522 |
# USE_WHITELIST = False |
| 523 |
|
| 524 |
# By default, carbon itself will log statistics (such as a count, |
| 525 |
# metricsReceived) with the top level prefix of 'carbon' at an interval of 60 |
| 526 |
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation |
| 527 |
# CARBON_METRIC_PREFIX = carbon |
| 528 |
# CARBON_METRIC_INTERVAL = 60 |
| 529 |
# |
| 530 |
# In order to turn off logging of successful connections for the line |
| 531 |
# receiver, set this to False |
| 532 |
# LOG_LISTENER_CONN_SUCCESS = True |
| 533 |
# |
| 534 |
# To turn off logging of lost connections for the line receiver set this to |
| 535 |
# False |
| 536 |
# LOG_LISTENER_CONN_LOST = False |
| 537 |
|
| 538 |
# If you're connecting from the relay to a destination that's over the |
| 539 |
# internet or similarly iffy connection, a backlog can develop because |
| 540 |
# of internet weather conditions, e.g. acks getting lost or similar issues. |
| 541 |
# To deal with that, you can enable USE_RATIO_RESET which will let you |
| 542 |
# re-set the connection to an individual destination. Defaults to being off. |
| 543 |
USE_RATIO_RESET=False |
| 544 |
|
| 545 |
# When there is a small number of stats flowing, it's not desirable to |
| 546 |
# perform any actions based on percentages - it's just too "twitchy". |
| 547 |
MIN_RESET_STAT_FLOW=1000 |
| 548 |
|
| 549 |
# When the ratio of stats being sent in a reporting interval is far |
| 550 |
# enough from 1.0, we will disconnect the socket and reconnect to |
| 551 |
# clear out queued stats. The default ratio of 0.9 indicates that 10% |
| 552 |
# of stats aren't being delivered within one CARBON_METRIC_INTERVAL |
| 553 |
# (default of 60 seconds), which can lead to a queue backup. Under |
| 554 |
# some circumstances re-setting the connection can fix this, so |
| 555 |
# set this according to your tolerance, and look in the logs for |
| 556 |
# "resetConnectionForQualityReasons" to observe whether this is kicking |
| 557 |
# in when your sent queue is building up. |
| 558 |
MIN_RESET_RATIO=0.9 |
| 559 |
|
| 560 |
# The minimum time between resets. When a connection is re-set, we |
| 561 |
# need to wait before another reset is performed. |
| 562 |
# (2*CARBON_METRIC_INTERVAL) + 1 second is the minimum time needed |
| 563 |
# before stats for the new connection will be available. Setting this |
| 564 |
# below (2*CARBON_METRIC_INTERVAL) + 1 second will result in a lot of |
| 565 |
# reset connections for no good reason. |
| 566 |
MIN_RESET_INTERVAL=121 |
| 567 |
|
| 568 |
# Enable TCP Keep Alive (http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html). |
| 569 |
# Default settings will send a probe every 30s. Default is False. |
| 570 |
# TCP_KEEPALIVE=True |
| 571 |
# The interval between the last data packet sent (simple ACKs are not |
| 572 |
# considered data) and the first keepalive probe; after the connection is marked |
| 573 |
# to need keepalive, this counter is not used any further. |
| 574 |
# TCP_KEEPIDLE=10 |
| 575 |
# The interval between subsequential keepalive probes, regardless of what |
| 576 |
# the connection has exchanged in the meantime. |
| 577 |
# TCP_KEEPINTVL=30 |
| 578 |
# The number of unacknowledged probes to send before considering the connection |
| 579 |
# dead and notifying the application layer. |
| 580 |
# TCP_KEEPCNT=2 |
| 581 |
|
| 582 |
|
| 583 |
[aggregator] |
| 584 |
LINE_RECEIVER_INTERFACE = 0.0.0.0 |
| 585 |
LINE_RECEIVER_PORT = 2023 |
| 586 |
|
| 587 |
PICKLE_RECEIVER_INTERFACE = 0.0.0.0 |
| 588 |
PICKLE_RECEIVER_PORT = 2024 |
| 589 |
|
| 590 |
# If set true, metric received will be forwarded to DESTINATIONS in addition to |
| 591 |
# the output of the aggregation rules. If set false the carbon-aggregator will |
| 592 |
# only ever send the output of aggregation. |
| 593 |
FORWARD_ALL = True |
| 594 |
|
| 595 |
# Filenames of the configuration files to use for this instance of aggregator. |
| 596 |
# Filenames are relative to CONF_DIR. |
| 597 |
# |
| 598 |
# AGGREGATION_RULES = aggregation-rules.conf |
| 599 |
# REWRITE_RULES = rewrite-rules.conf |
| 600 |
|
| 601 |
# This is a list of carbon daemons we will send any relayed or |
| 602 |
# generated metrics to. The default provided would send to a single |
| 603 |
# carbon-cache instance on the default port. However if you |
| 604 |
# use multiple carbon-cache instances then it would look like this: |
| 605 |
# |
| 606 |
# DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b |
| 607 |
# |
| 608 |
# The format is comma-delimited IP:PORT:INSTANCE where the :INSTANCE part is |
| 609 |
# optional and refers to the "None" instance if omitted. |
| 610 |
# |
| 611 |
# Note that if the destinations are all carbon-caches then this should |
| 612 |
# exactly match the webapp's CARBONLINK_HOSTS setting in terms of |
| 613 |
# instances listed (order matters!). |
| 614 |
DESTINATIONS = 127.0.0.1:2004 |
| 615 |
|
| 616 |
# If you want to add redundancy to your data by replicating every |
| 617 |
# datapoint to more than one machine, increase this. |
| 618 |
REPLICATION_FACTOR = 1 |
| 619 |
|
| 620 |
# This is the maximum number of datapoints that can be queued up |
| 621 |
# for a single destination. Once this limit is hit, we will |
| 622 |
# stop accepting new data if USE_FLOW_CONTROL is True, otherwise |
| 623 |
# we will drop any subsequently received datapoints. |
| 624 |
MAX_QUEUE_SIZE = 10000 |
| 625 |
|
| 626 |
# Set this to False to drop datapoints when any send queue (sending datapoints |
| 627 |
# to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the |
| 628 |
# default) then sockets over which metrics are received will temporarily stop accepting |
| 629 |
# data until the send queues fall below 80% MAX_QUEUE_SIZE. |
| 630 |
USE_FLOW_CONTROL = True |
| 631 |
|
| 632 |
# If enabled this setting is used to timeout metric client connection if no |
| 633 |
# metrics have been sent in specified time in seconds |
| 634 |
#METRIC_CLIENT_IDLE_TIMEOUT = None |
| 635 |
|
| 636 |
# This defines the maximum "message size" between carbon daemons. |
| 637 |
# You shouldn't need to tune this unless you really know what you're doing. |
| 638 |
MAX_DATAPOINTS_PER_MESSAGE = 500 |
| 639 |
|
| 640 |
# This defines how many datapoints the aggregator remembers for |
| 641 |
# each metric. Aggregation only happens for datapoints that fall in |
| 642 |
# the past MAX_AGGREGATION_INTERVALS * intervalSize seconds. |
| 643 |
MAX_AGGREGATION_INTERVALS = 5 |
| 644 |
|
| 645 |
# Limit the number of open connections the receiver can handle as any time. |
| 646 |
# Default is no limit. Setting up a limit for sites handling high volume |
| 647 |
# traffic may be recommended to avoid running out of TCP memory or having |
| 648 |
# thousands of TCP connections reduce the throughput of the service. |
| 649 |
#MAX_RECEIVER_CONNECTIONS = inf |
| 650 |
|
| 651 |
# By default (WRITE_BACK_FREQUENCY = 0), carbon-aggregator will write back |
| 652 |
# aggregated data points once every rule.frequency seconds, on a per-rule basis. |
| 653 |
# Set this (WRITE_BACK_FREQUENCY = N) to write back all aggregated data points |
| 654 |
# every N seconds, independent of rule frequency. This is useful, for example, |
| 655 |
# to be able to query partially aggregated metrics from carbon-cache without |
| 656 |
# having to first wait rule.frequency seconds. |
| 657 |
# WRITE_BACK_FREQUENCY = 0 |
| 658 |
|
| 659 |
# Set this to True to enable whitelisting and blacklisting of metrics in |
| 660 |
# CONF_DIR/whitelist.conf and CONF_DIR/blacklist.conf. If the whitelist is |
| 661 |
# missing or empty, all metrics will pass through |
| 662 |
# USE_WHITELIST = False |
| 663 |
|
| 664 |
# By default, carbon itself will log statistics (such as a count, |
| 665 |
# metricsReceived) with the top level prefix of 'carbon' at an interval of 60 |
| 666 |
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation |
| 667 |
# CARBON_METRIC_PREFIX = carbon |
| 668 |
# CARBON_METRIC_INTERVAL = 60 |
| 669 |
|
| 670 |
# In order to turn off logging of successful connections for the line |
| 671 |
# receiver, set this to False |
| 672 |
# LOG_LISTENER_CONN_SUCCESS = True |
| 673 |
# |
| 674 |
# To turn off logging of lost connections for the line receiver set this to |
| 675 |
# False |
| 676 |
# LOG_LISTENER_CONN_LOST = False |
| 677 |
|
| 678 |
# In order to turn off logging of metrics with no corresponding |
| 679 |
# aggregation rules receiver, set this to False |
| 680 |
# LOG_AGGREGATOR_MISSES = False |
| 681 |
|
| 682 |
# Specify the user to drop privileges to |
| 683 |
# If this is blank carbon-aggregator runs as the user that invokes it |
| 684 |
# USER = |
| 685 |
|
| 686 |
# Part of the code, and particularly aggregator rules, need |
| 687 |
# to cache metric names. To avoid leaking too much memory you |
| 688 |
# can tweak the size of this cache. The default allow for 1M |
| 689 |
# different metrics per rule (~200MiB). |
| 690 |
# CACHE_METRIC_NAMES_MAX=1000000 |
| 691 |
|
| 692 |
# You can optionally set a ttl to this cache. |
| 693 |
# CACHE_METRIC_NAMES_TTL=600 |