Advertisement
Guest User

Untitled

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