Advertisement
Guest User

Untitled

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