Guest User

Carbon Conf

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