Advertisement
Guest User

Untitled

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