Advertisement
Guest User

Untitled

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