Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.18 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. CONF_DIR = /etc/carbon/
  20. LOG_DIR = /var/log/carbon/
  21. PID_DIR = /var/run/
  22.  
  23. LOCAL_DATA_DIR = /var/lib/graphite/whisper/
  24.  
  25. # Enable daily log rotation. If disabled, a kill -HUP can be used after a manual rotate
  26. ENABLE_LOGROTATION = True
  27.  
  28. # Specify the user to drop privileges to
  29. # If this is blank carbon runs as the user that invokes it
  30. # This user must have write access to the local data directory
  31. USER = _graphite
  32. #
  33. # NOTE: The above settings must be set under [relay] and [aggregator]
  34. # to take effect for those daemons as well
  35.  
  36. # Limit the size of the cache to avoid swapping or becoming CPU bound.
  37. # Sorts and serving cache queries gets more expensive as the cache grows.
  38. # Use the value "inf" (infinity) for an unlimited cache size.
  39. MAX_CACHE_SIZE = inf
  40.  
  41. # Limits the number of whisper update_many() calls per second, which effectively
  42. # means the number of write requests sent to the disk. This is intended to
  43. # prevent over-utilizing the disk and thus starving the rest of the system.
  44. # When the rate of required updates exceeds this, then carbon's caching will
  45. # take effect and increase the overall throughput accordingly.
  46. MAX_UPDATES_PER_SECOND = 500
  47.  
  48. # If defined, this changes the MAX_UPDATES_PER_SECOND in Carbon when a
  49. # stop/shutdown is initiated. This helps when MAX_UPDATES_PER_SECOND is
  50. # relatively low and carbon has cached a lot of updates; it enables the carbon
  51. # daemon to shutdown more quickly.
  52. # MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000
  53.  
  54. # Softly limits the number of whisper files that get created each minute.
  55. # Setting this value low (like at 50) is a good way to ensure your graphite
  56. # system will not be adversely impacted when a bunch of new metrics are
  57. # sent to it. The trade off is that it will take much longer for those metrics'
  58. # database files to all get created and thus longer until the data becomes usable.
  59. # Setting this value high (like "inf" for infinity) will cause graphite to create
  60. # the files quickly but at the risk of slowing I/O down considerably for a while.
  61. MAX_CREATES_PER_MINUTE = 50
  62.  
  63. LINE_RECEIVER_INTERFACE = 0.0.0.0
  64. LINE_RECEIVER_PORT = 2003
  65.  
  66. # Set this to True to enable the UDP listener. By default this is off
  67. # because it is very common to run multiple carbon daemons and managing
  68. # another (rarely used) port for every carbon instance is not fun.
  69. ENABLE_UDP_LISTENER = False
  70. UDP_RECEIVER_INTERFACE = 0.0.0.0
  71. UDP_RECEIVER_PORT = 2003
  72.  
  73. PICKLE_RECEIVER_INTERFACE = 0.0.0.0
  74. PICKLE_RECEIVER_PORT = 2004
  75.  
  76. # Set to false to disable logging of successful connections
  77. LOG_LISTENER_CONNECTIONS = True
  78.  
  79. # Per security concerns outlined in Bug #817247 the pickle receiver
  80. # will use a more secure and slightly less efficient unpickler.
  81. # Set this to True to revert to the old-fashioned insecure unpickler.
  82. USE_INSECURE_UNPICKLER = False
  83.  
  84. CACHE_QUERY_INTERFACE = 0.0.0.0
  85. CACHE_QUERY_PORT = 7002
  86.  
  87. # Set this to False to drop datapoints received after the cache
  88. # reaches MAX_CACHE_SIZE. If this is True (the default) then sockets
  89. # over which metrics are received will temporarily stop accepting
  90. # data until the cache size falls below 95% MAX_CACHE_SIZE.
  91. USE_FLOW_CONTROL = True
  92.  
  93. # By default, carbon-cache will log every whisper update and cache hit. This can be excessive and
  94. # degrade performance if logging on the same volume as the whisper data is stored.
  95. LOG_UPDATES = False
  96. LOG_CACHE_HITS = False
  97. LOG_CACHE_QUEUE_SORTS = True
  98.  
  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 = sorted
  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.  
  145. # Enabling this option will cause Whisper to lock each Whisper file it writes
  146. # to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when
  147. # multiple carbon-cache daemons are writing to the same files
  148. # WHISPER_LOCK_WRITES = False
  149.  
  150. # Set this to True to enable whitelisting and blacklisting of metrics in
  151. # CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
  152. # empty, all metrics will pass through
  153. # USE_WHITELIST = False
  154.  
  155. # By default, carbon itself will log statistics (such as a count,
  156. # metricsReceived) with the top level prefix of 'carbon' at an interval of 60
  157. # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
  158. # CARBON_METRIC_PREFIX = carbon
  159. # CARBON_METRIC_INTERVAL = 60
  160.  
  161. # Enable AMQP if you want to receve metrics using an amqp broker
  162. # ENABLE_AMQP = False
  163.  
  164. # Verbose means a line will be logged for every metric received
  165. # useful for testing
  166. # AMQP_VERBOSE = False
  167.  
  168. # AMQP_HOST = localhost
  169. # AMQP_PORT = 5672
  170. # AMQP_VHOST = /
  171. # AMQP_USER = guest
  172. # AMQP_PASSWORD = guest
  173. # AMQP_EXCHANGE = graphite
  174. # AMQP_METRIC_NAME_IN_BODY = False
  175.  
  176. # The manhole interface allows you to SSH into the carbon daemon
  177. # and get a python interpreter. BE CAREFUL WITH THIS! If you do
  178. # something like time.sleep() in the interpreter, the whole process
  179. # will sleep! This is *extremely* helpful in debugging, assuming
  180. # you are familiar with the code. If you are not, please don't
  181. # mess with this, you are asking for trouble :)
  182. #
  183. # ENABLE_MANHOLE = False
  184. # MANHOLE_INTERFACE = 127.0.0.1
  185. # MANHOLE_PORT = 7222
  186. # MANHOLE_USER = admin
  187. # MANHOLE_PUBLIC_KEY = ssh-rsa AAAAB3NzaC1yc2EAAAABiwAaAIEAoxN0sv/e4eZCPpi3N3KYvyzRaBaMeS2RsOQ/cDuKv11dlNzVeiyc3RFmCv5Rjwn/lQ79y0zyHxw67qLyhQ/kDzINc4cY41ivuQXm2tPmgvexdrBv5nsfEpjs3gLZfJnyvlcVyWK/lId8WUvEWSWHTzsbtmXAF2raJMdgLTbQ8wE=
  188.  
  189. # Patterns for all of the metrics this machine will store. Read more at
  190. # http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings
  191. #
  192. # Example: store all sales, linux servers, and utilization metrics
  193. # BIND_PATTERNS = sales.#, servers.linux.#, #.utilization
  194. #
  195. # Example: store everything
  196. # BIND_PATTERNS = #
  197.  
  198. # To configure special settings for the carbon-cache instance 'b', uncomment this:
  199. #[cache:b]
  200. #LINE_RECEIVER_PORT = 2103
  201. #PICKLE_RECEIVER_PORT = 2104
  202. #CACHE_QUERY_PORT = 7102
  203. # and any other settings you want to customize, defaults are inherited
  204. # from [carbon] section.
  205. # You can then specify the --instance=b option to manage this instance
  206.  
  207.  
  208.  
  209. [relay]
  210. LINE_RECEIVER_INTERFACE = 0.0.0.0
  211. LINE_RECEIVER_PORT = 2013
  212. PICKLE_RECEIVER_INTERFACE = 0.0.0.0
  213. PICKLE_RECEIVER_PORT = 2014
  214.  
  215. # Set to false to disable logging of successful connections
  216. LOG_LISTENER_CONNECTIONS = True
  217.  
  218. # Carbon-relay has several options for metric routing controlled by RELAY_METHOD
  219. #
  220. # Use relay-rules.conf to route metrics to destinations based on pattern rules
  221. #RELAY_METHOD = rules
  222. #
  223. # Use consistent-hashing for even distribution of metrics between destinations
  224. #RELAY_METHOD = consistent-hashing
  225. #
  226. # Use consistent-hashing but take into account an aggregation-rules.conf shared
  227. # by downstream carbon-aggregator daemons. This will ensure that all metrics
  228. # that map to a given aggregation rule are sent to the same carbon-aggregator
  229. # instance.
  230. # Enable this for carbon-relays that send to a group of carbon-aggregators
  231. #RELAY_METHOD = aggregated-consistent-hashing
  232. RELAY_METHOD = rules
  233.  
  234. # If you use consistent-hashing you can add redundancy by replicating every
  235. # datapoint to more than one machine.
  236. REPLICATION_FACTOR = 1
  237.  
  238. # This is a list of carbon daemons we will send any relayed or
  239. # generated metrics to. The default provided would send to a single
  240. # carbon-cache instance on the default port. However if you
  241. # use multiple carbon-cache instances then it would look like this:
  242. #
  243. # DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b
  244. #
  245. # The general form is IP:PORT:INSTANCE where the :INSTANCE part is
  246. # optional and refers to the "None" instance if omitted.
  247. #
  248. # Note that if the destinations are all carbon-caches then this should
  249. # exactly match the webapp's CARBONLINK_HOSTS setting in terms of
  250. # instances listed (order matters!).
  251. #
  252. # If using RELAY_METHOD = rules, all destinations used in relay-rules.conf
  253. # must be defined in this list
  254. DESTINATIONS = 127.0.0.1:2004
  255.  
  256. # This defines the maximum "message size" between carbon daemons.
  257. # You shouldn't need to tune this unless you really know what you're doing.
  258. MAX_DATAPOINTS_PER_MESSAGE = 500
  259. MAX_QUEUE_SIZE = 10000
  260.  
  261. # Set this to False to drop datapoints when any send queue (sending datapoints
  262. # to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
  263. # default) then sockets over which metrics are received will temporarily stop accepting
  264. # data until the send queues fall below 80% MAX_QUEUE_SIZE.
  265. USE_FLOW_CONTROL = True
  266.  
  267. # Set this to True to enable whitelisting and blacklisting of metrics in
  268. # CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
  269. # empty, all metrics will pass through
  270. # USE_WHITELIST = False
  271.  
  272. # By default, carbon itself will log statistics (such as a count,
  273. # metricsReceived) with the top level prefix of 'carbon' at an interval of 60
  274. # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
  275. # CARBON_METRIC_PREFIX = carbon
  276. # CARBON_METRIC_INTERVAL = 60
  277.  
  278.  
  279. [aggregator]
  280. LINE_RECEIVER_INTERFACE = 0.0.0.0
  281. LINE_RECEIVER_PORT = 2023
  282.  
  283. PICKLE_RECEIVER_INTERFACE = 0.0.0.0
  284. PICKLE_RECEIVER_PORT = 2024
  285.  
  286. # Set to false to disable logging of successful connections
  287. LOG_LISTENER_CONNECTIONS = True
  288.  
  289. # If set true, metric received will be forwarded to DESTINATIONS in addition to
  290. # the output of the aggregation rules. If set false the carbon-aggregator will
  291. # only ever send the output of aggregation.
  292. FORWARD_ALL = True
  293.  
  294. # This is a list of carbon daemons we will send any relayed or
  295. # generated metrics to. The default provided would send to a single
  296. # carbon-cache instance on the default port. However if you
  297. # use multiple carbon-cache instances then it would look like this:
  298. #
  299. # DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b
  300. #
  301. # The format is comma-delimited IP:PORT:INSTANCE where the :INSTANCE part is
  302. # optional and refers to the "None" instance if omitted.
  303. #
  304. # Note that if the destinations are all carbon-caches then this should
  305. # exactly match the webapp's CARBONLINK_HOSTS setting in terms of
  306. # instances listed (order matters!).
  307. DESTINATIONS = 127.0.0.1:4002
  308.  
  309. # If you want to add redundancy to your data by replicating every
  310. # datapoint to more than one machine, increase this.
  311. REPLICATION_FACTOR = 1
  312.  
  313. # This is the maximum number of datapoints that can be queued up
  314. # for a single destination. Once this limit is hit, we will
  315. # stop accepting new data if USE_FLOW_CONTROL is True, otherwise
  316. # we will drop any subsequently received datapoints.
  317. MAX_QUEUE_SIZE = 10000
  318.  
  319. # Set this to False to drop datapoints when any send queue (sending datapoints
  320. # to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
  321. # default) then sockets over which metrics are received will temporarily stop accepting
  322. # data until the send queues fall below 80% MAX_QUEUE_SIZE.
  323. USE_FLOW_CONTROL = True
  324.  
  325. # This defines the maximum "message size" between carbon daemons.
  326. # You shouldn't need to tune this unless you really know what you're doing.
  327. MAX_DATAPOINTS_PER_MESSAGE = 500
  328.  
  329. # This defines how many datapoints the aggregator remembers for
  330. # each metric. Aggregation only happens for datapoints that fall in
  331. # the past MAX_AGGREGATION_INTERVALS * intervalSize seconds.
  332. MAX_AGGREGATION_INTERVALS = 5
  333.  
  334. # By default (WRITE_BACK_FREQUENCY = 0), carbon-aggregator will write back
  335. # aggregated data points once every rule.frequency seconds, on a per-rule basis.
  336. # Set this (WRITE_BACK_FREQUENCY = N) to write back all aggregated data points
  337. # every N seconds, independent of rule frequency. This is useful, for example,
  338. # to be able to query partially aggregated metrics from carbon-cache without
  339. # having to first wait rule.frequency seconds.
  340. # WRITE_BACK_FREQUENCY = 0
  341.  
  342. # Set this to True to enable whitelisting and blacklisting of metrics in
  343. # CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
  344. # empty, all metrics will pass through
  345. # USE_WHITELIST = False
  346.  
  347. # By default, carbon itself will log statistics (such as a count,
  348. # metricsReceived) with the top level prefix of 'carbon' at an interval of 60
  349. # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
  350. # CARBON_METRIC_PREFIX = carbon
  351. # CARBON_METRIC_INTERVAL = 60
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement