Advertisement
Guest User

Untitled

a guest
Jan 15th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1. root@ip-10-0-0-130:/etc/kafka# cat /etc/dd-agent/conf.d/kafka.yaml
  2. ##########
  3. # WARNING
  4. ##########
  5. # This sample works only for Kafka >= 0.8.2.
  6. # If you are running a version older than that, you can refer to agent 5.2.x released
  7. # sample files, https://raw.githubusercontent.com/DataDog/dd-agent/5.2.1/conf.d/kafka.yaml.example
  8.  
  9. instances:
  10. - host: localhost
  11. port: 9999 # This is the JMX port on which Kafka exposes its metrics (usually 9999)
  12. user: xxxxx
  13. password: xxxxx
  14.  
  15.  
  16. # user: username
  17. # password: password
  18. # process_name_regex: .*process_name.* # Instead of specifying a host, and port. The agent can connect using the attach api.
  19. # # This requires the JDK to be installed and the path to tools.jar to be set below.
  20. # tools_jar_path: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar # To be set when process_name_regex is set
  21. # name: kafka_instance
  22. # java_bin_path: /path/to/java # Optional, should be set if the agent cannot find your java executable
  23. # trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled
  24. # trust_store_password: password
  25. # tags:
  26. # env: stage
  27. # newTag: test
  28.  
  29. init_config:
  30. is_jmx: true
  31.  
  32. # Metrics collected by this check. You should not have to modify this.
  33. conf:
  34. #
  35. # Aggregate cluster stats
  36. #
  37. - include:
  38. domain: 'kafka.server'
  39. bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec'
  40. attribute:
  41. MeanRate:
  42. metric_type: gauge
  43. alias: kafka.net.bytes_out
  44. - include:
  45. domain: 'kafka.server'
  46. bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec'
  47. attribute:
  48. MeanRate:
  49. metric_type: gauge
  50. alias: kafka.net.bytes_in
  51. - include:
  52. domain: 'kafka.server'
  53. bean: 'kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec'
  54. attribute:
  55. MeanRate:
  56. metric_type: gauge
  57. alias: kafka.messages_in
  58. - include:
  59. domain: 'kafka.server'
  60. bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesRejectedPerSec'
  61. attribute:
  62. MeanRate:
  63. metric_type: gauge
  64. alias: kafka.net.bytes_rejected
  65.  
  66. #
  67. # Request timings
  68. #
  69. - include:
  70. domain: 'kafka.server'
  71. bean: 'kafka.server:type=BrokerTopicMetrics,name=FailedFetchRequestsPerSec'
  72. attribute:
  73. MeanRate:
  74. metric_type: gauge
  75. alias: kafka.request.fetch.failed
  76. - include:
  77. domain: 'kafka.server'
  78. bean: 'kafka.server:type=BrokerTopicMetrics,name=FailedProduceRequestsPerSec'
  79. attribute:
  80. MeanRate:
  81. metric_type: gauge
  82. alias: kafka.request.produce.failed
  83. - include:
  84. domain: 'kafka.network'
  85. bean: 'kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce'
  86. attribute:
  87. Mean:
  88. metric_type: gauge
  89. alias: kafka.request.produce.time.avg
  90. 99thPercentile:
  91. metric_type: gauge
  92. alias: kafka.request.produce.time.99percentile
  93. - include:
  94. domain: 'kafka.network'
  95. bean: 'kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Fetch'
  96. attribute:
  97. Mean:
  98. metric_type: gauge
  99. alias: kafka.request.fetch.time.avg
  100. 99thPercentile:
  101. metric_type: gauge
  102. alias: kafka.request.fetch.time.99percentile
  103. - include:
  104. domain: 'kafka.network'
  105. bean: 'kafka.network:type=RequestMetrics,name=TotalTimeMs,request=UpdateMetadata'
  106. attribute:
  107. Mean:
  108. metric_type: gauge
  109. alias: kafka.request.update_metadata.time.avg
  110. 99thPercentile:
  111. metric_type: gauge
  112. alias: kafka.request.update_metadata.time.99percentile
  113. - include:
  114. domain: 'kafka.network'
  115. bean: 'kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Metadata'
  116. attribute:
  117. Mean:
  118. metric_type: gauge
  119. alias: kafka.request.metadata.time.avg
  120. 99thPercentile:
  121. metric_type: gauge
  122. alias: kafka.request.metadata.time.99percentile
  123. - include:
  124. domain: 'kafka.network'
  125. bean: 'kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Offsets'
  126. attribute:
  127. Mean:
  128. metric_type: gauge
  129. alias: kafka.request.offsets.time.avg
  130. 99thPercentile:
  131. metric_type: gauge
  132. alias: kafka.request.offsets.time.99percentile
  133. - include:
  134. domain: 'kafka.server'
  135. bean: 'kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent'
  136. attribute:
  137. MeanRate:
  138. metric_type: gauge
  139. alias: kafka.request.handler.avg.idle.pct
  140.  
  141. #
  142. # Replication stats
  143. #
  144. - include:
  145. domain: 'kafka.server'
  146. bean: 'kafka.server:type=ReplicaManager,name=IsrShrinksPerSec'
  147. attribute:
  148. MeanRate:
  149. metric_type: gauge
  150. alias: kafka.replication.isr_shrinks
  151. - include:
  152. domain: 'kafka.server'
  153. bean: 'kafka.server:type=ReplicaManager,name=IsrExpandsPerSec'
  154. attribute:
  155. MeanRate:
  156. metric_type: gauge
  157. alias: kafka.replication.isr_expands
  158. - include:
  159. domain: 'kafka.controller'
  160. bean: 'kafka.controller:type=ControllerStats,name=LeaderElectionRateAndTimeMs'
  161. attribute:
  162. MeanRate:
  163. metric_type: gauge
  164. alias: kafka.replication.leader_elections
  165. - include:
  166. domain: 'kafka.controller'
  167. bean: 'kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec'
  168. attribute:
  169. MeanRate:
  170. metric_type: gauge
  171. alias: kafka.replication.unclean_leader_elections
  172.  
  173. #
  174. # Log flush stats
  175. #
  176. - include:
  177. domain: 'kafka.log'
  178. bean: 'kafka.log:type=LogFlushStats,name=LogFlushRateAndTimeMs'
  179. attribute:
  180. MeanRate:
  181. metric_type: gauge
  182. alias: kafka.log.flush_rate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement