nginx.access.conf 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. agent01.sources = source1 source2 source3 source4 source5 source6 source7 source8
  2. agent01.channels = sink01 sink02
  3. agent01.sinks = elasticSearch
  4. #agent01.sources.source1.type = exec
  5. #agent01.sources.source1.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  6. #agent01.sources.source1.restart = true
  7. #agent01.sources.source1.logStdErr = true
  8. #agent01.sources.source1.batchSize = 500
  9. #agent01.sources.source1.channels = sink02
  10. ####source1######
  11. agent01.sources.source1.type = exec
  12. agent01.sources.source1.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  13. agent01.sources.source1.restart = true
  14. agent01.sources.source1.logStdErr = true
  15. agent01.sources.source1.channels = sink02
  16. agent01.sources.source1.interceptors = interceptor1 interceptor2 interceptor3
  17. agent01.sources.source1.interceptors.interceptor1.type = host
  18. agent01.sources.source1.interceptors.interceptor1.hostHeader = host
  19. agent01.sources.source1.interceptors.interceptor2.type = regex_extractor
  20. agent01.sources.source1.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  21. agent01.sources.source1.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  22. agent01.sources.source1.interceptors.interceptor2.serializers.s1.name = remote_addr
  23. agent01.sources.source1.interceptors.interceptor2.serializers.s2.name = remote_user
  24. agent01.sources.source1.interceptors.interceptor2.serializers.s3.name = datetime
  25. #这里的时间已经是ISO8601格式,kibana可以直接识别为时间格式,所以下面的3行可以不用
  26. #agent01.sources.source1.interceptors.interceptor2.serializers.s3.type = org.apache.flume.interceptor.RegexExtractorInterceptorMillisSerializer
  27. #agent01.sources.source1.interceptors.interceptor2.serializers.s3.name = timestamp
  28. #agent01.sources.source1.interceptors.interceptor2.serializers.s3.pattern = yyyy-MM-dd'T'HH:mm:ssZ
  29. agent01.sources.source1.interceptors.interceptor2.serializers.s4.name = http_method
  30. agent01.sources.source1.interceptors.interceptor2.serializers.s5.name = uri
  31. agent01.sources.source1.interceptors.interceptor2.serializers.s6.name = status
  32. agent01.sources.source1.interceptors.interceptor2.serializers.s7.name = body_length
  33. agent01.sources.source1.interceptors.interceptor2.serializers.s8.name = http_referer
  34. agent01.sources.source1.interceptors.interceptor2.serializers.s9.name = user_agent
  35. agent01.sources.source1.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  36. agent01.sources.source1.interceptors.interceptor2.serializers.s11.name = request_time
  37. agent01.sources.source1.interceptors.interceptor2.serializers.s12.name = upstream_addr
  38. agent01.sources.source1.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  39. agent01.sources.source1.interceptors.interceptor2.serializers.s14.name = post_body
  40. agent01.sources.source1.interceptors.interceptor2.serializers.s15.name = domain_url
  41. agent01.sources.source1.interceptors.interceptor3.type = timestamp
  42. ####source2######
  43. agent01.sources.source2.type = exec
  44. agent01.sources.source2.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  45. agent01.sources.source2.channels = sink02
  46. agent01.sources.source2.interceptors = interceptor1 interceptor2 interceptor3
  47. agent01.sources.source2.interceptors.interceptor1.type = host
  48. agent01.sources.source2.interceptors.interceptor1.hostHeader = host
  49. agent01.sources.source2.interceptors.interceptor2.type = regex_extractor
  50. agent01.sources.source2.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  51. agent01.sources.source2.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  52. agent01.sources.source2.interceptors.interceptor2.serializers.s1.name = remote_addr
  53. agent01.sources.source2.interceptors.interceptor2.serializers.s2.name = remote_user
  54. agent01.sources.source2.interceptors.interceptor2.serializers.s3.name = datetime
  55. agent01.sources.source2.interceptors.interceptor2.serializers.s4.name = http_method
  56. agent01.sources.source2.interceptors.interceptor2.serializers.s5.name = uri
  57. agent01.sources.source2.interceptors.interceptor2.serializers.s6.name = status
  58. agent01.sources.source2.interceptors.interceptor2.serializers.s7.name = body_length
  59. agent01.sources.source2.interceptors.interceptor2.serializers.s8.name = http_referer
  60. agent01.sources.source2.interceptors.interceptor2.serializers.s9.name = user_agent
  61. agent01.sources.source2.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  62. agent01.sources.source2.interceptors.interceptor2.serializers.s11.name = request_time
  63. agent01.sources.source2.interceptors.interceptor2.serializers.s12.name = upstream_addr
  64. agent01.sources.source2.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  65. agent01.sources.source2.interceptors.interceptor2.serializers.s14.name = post_body
  66. agent01.sources.source2.interceptors.interceptor2.serializers.s15.name = domain_url
  67. agent01.sources.source2.interceptors.interceptor3.type = timestamp
  68. ####source3######
  69. agent01.sources.source3.type = exec
  70. agent01.sources.source3.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  71. agent01.sources.source3.channels = sink02
  72. agent01.sources.source3.interceptors = interceptor1 interceptor2 interceptor3
  73. agent01.sources.source3.interceptors.interceptor1.type = host
  74. agent01.sources.source3.interceptors.interceptor1.hostHeader = host
  75. agent01.sources.source3.interceptors.interceptor2.type = regex_extractor
  76. agent01.sources.source3.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  77. agent01.sources.source3.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  78. agent01.sources.source3.interceptors.interceptor2.serializers.s1.name = remote_addr
  79. agent01.sources.source3.interceptors.interceptor2.serializers.s2.name = remote_user
  80. agent01.sources.source3.interceptors.interceptor2.serializers.s3.name = datetime
  81. agent01.sources.source3.interceptors.interceptor2.serializers.s4.name = http_method
  82. agent01.sources.source3.interceptors.interceptor2.serializers.s5.name = uri
  83. agent01.sources.source3.interceptors.interceptor2.serializers.s6.name = status
  84. agent01.sources.source3.interceptors.interceptor2.serializers.s7.name = body_length
  85. agent01.sources.source3.interceptors.interceptor2.serializers.s8.name = http_referer
  86. agent01.sources.source3.interceptors.interceptor2.serializers.s9.name = user_agent
  87. agent01.sources.source3.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  88. agent01.sources.source3.interceptors.interceptor2.serializers.s11.name = request_time
  89. agent01.sources.source3.interceptors.interceptor2.serializers.s12.name = upstream_addr
  90. agent01.sources.source3.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  91. agent01.sources.source3.interceptors.interceptor2.serializers.s14.name = post_body
  92. agent01.sources.source3.interceptors.interceptor2.serializers.s15.name = domain_url
  93. agent01.sources.source3.interceptors.interceptor3.type = timestamp
  94. ####source4######
  95. agent01.sources.source4.type = exec
  96. agent01.sources.source4.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  97. agent01.sources.source4.channels = sink02
  98. agent01.sources.source4.interceptors = interceptor1 interceptor2 interceptor3
  99. agent01.sources.source4.interceptors.interceptor1.type = host
  100. agent01.sources.source4.interceptors.interceptor1.hostHeader = host
  101. agent01.sources.source4.interceptors.interceptor2.type = regex_extractor
  102. agent01.sources.source4.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  103. agent01.sources.source4.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  104. agent01.sources.source4.interceptors.interceptor2.serializers.s1.name = remote_addr
  105. agent01.sources.source4.interceptors.interceptor2.serializers.s2.name = remote_user
  106. agent01.sources.source4.interceptors.interceptor2.serializers.s3.name = datetime
  107. agent01.sources.source4.interceptors.interceptor2.serializers.s4.name = http_method
  108. agent01.sources.source4.interceptors.interceptor2.serializers.s5.name = uri
  109. agent01.sources.source4.interceptors.interceptor2.serializers.s6.name = status
  110. agent01.sources.source4.interceptors.interceptor2.serializers.s7.name = body_length
  111. agent01.sources.source4.interceptors.interceptor2.serializers.s8.name = http_referer
  112. agent01.sources.source4.interceptors.interceptor2.serializers.s9.name = user_agent
  113. agent01.sources.source4.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  114. agent01.sources.source4.interceptors.interceptor2.serializers.s11.name = request_time
  115. agent01.sources.source4.interceptors.interceptor2.serializers.s12.name = upstream_addr
  116. agent01.sources.source4.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  117. agent01.sources.source4.interceptors.interceptor2.serializers.s14.name = post_body
  118. agent01.sources.source4.interceptors.interceptor2.serializers.s15.name = domain_url
  119. agent01.sources.source4.interceptors.interceptor3.type = timestamp
  120. ###source5######
  121. agent01.sources.source5.type = exec
  122. agent01.sources.source5.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  123. agent01.sources.source5.channels = sink02
  124. agent01.sources.source5.interceptors = interceptor1 interceptor2 interceptor3
  125. agent01.sources.source5.interceptors.interceptor1.type = host
  126. agent01.sources.source5.interceptors.interceptor1.hostHeader = host
  127. agent01.sources.source5.interceptors.interceptor2.type = regex_extractor
  128. agent01.sources.source5.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  129. agent01.sources.source5.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  130. agent01.sources.source5.interceptors.interceptor2.serializers.s1.name = remote_addr
  131. agent01.sources.source5.interceptors.interceptor2.serializers.s2.name = remote_user
  132. agent01.sources.source5.interceptors.interceptor2.serializers.s3.name = datetime
  133. agent01.sources.source5.interceptors.interceptor2.serializers.s4.name = http_method
  134. agent01.sources.source5.interceptors.interceptor2.serializers.s5.name = uri
  135. agent01.sources.source5.interceptors.interceptor2.serializers.s6.name = status
  136. agent01.sources.source5.interceptors.interceptor2.serializers.s7.name = body_length
  137. agent01.sources.source5.interceptors.interceptor2.serializers.s8.name = http_referer
  138. agent01.sources.source5.interceptors.interceptor2.serializers.s9.name = user_agent
  139. agent01.sources.source5.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  140. agent01.sources.source5.interceptors.interceptor2.serializers.s11.name = request_time
  141. agent01.sources.source5.interceptors.interceptor2.serializers.s12.name = upstream_addr
  142. agent01.sources.source5.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  143. agent01.sources.source5.interceptors.interceptor2.serializers.s14.name = post_body
  144. agent01.sources.source5.interceptors.interceptor2.serializers.s15.name = domain_url
  145. agent01.sources.source5.interceptors.interceptor3.type = timestamp
  146. ##source6######
  147. agent01.sources.source6.type = exec
  148. agent01.sources.source6.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  149. agent01.sources.source6.channels = sink02
  150. agent01.sources.source6.interceptors = interceptor1 interceptor2 interceptor3
  151. agent01.sources.source6.interceptors.interceptor1.type = host
  152. agent01.sources.source6.interceptors.interceptor1.hostHeader = host
  153. agent01.sources.source6.interceptors.interceptor2.type = regex_extractor
  154. agent01.sources.source6.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  155. agent01.sources.source6.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  156. agent01.sources.source6.interceptors.interceptor2.serializers.s1.name = remote_addr
  157. agent01.sources.source6.interceptors.interceptor2.serializers.s2.name = remote_user
  158. agent01.sources.source6.interceptors.interceptor2.serializers.s3.name = datetime
  159. agent01.sources.source6.interceptors.interceptor2.serializers.s4.name = http_method
  160. agent01.sources.source6.interceptors.interceptor2.serializers.s5.name = uri
  161. agent01.sources.source6.interceptors.interceptor2.serializers.s6.name = status
  162. agent01.sources.source6.interceptors.interceptor2.serializers.s7.name = body_length
  163. agent01.sources.source6.interceptors.interceptor2.serializers.s8.name = http_referer
  164. agent01.sources.source6.interceptors.interceptor2.serializers.s9.name = user_agent
  165. agent01.sources.source6.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  166. agent01.sources.source6.interceptors.interceptor2.serializers.s11.name = request_time
  167. agent01.sources.source6.interceptors.interceptor2.serializers.s12.name = upstream_addr
  168. agent01.sources.source6.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  169. agent01.sources.source6.interceptors.interceptor2.serializers.s14.name = post_body
  170. agent01.sources.source6.interceptors.interceptor2.serializers.s15.name = domain_url
  171. agent01.sources.source6.interceptors.interceptor3.type = timestamp
  172. ######source7######
  173. agent01.sources.source7.type = exec
  174. agent01.sources.source7.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  175. agent01.sources.source7.channels = sink02
  176. agent01.sources.source7.interceptors = interceptor1 interceptor2 interceptor3
  177. agent01.sources.source7.interceptors.interceptor1.type = host
  178. agent01.sources.source7.interceptors.interceptor1.hostHeader = host
  179. agent01.sources.source7.interceptors.interceptor2.type = regex_extractor
  180. agent01.sources.source7.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  181. agent01.sources.source7.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  182. agent01.sources.source7.interceptors.interceptor2.serializers.s1.name = remote_addr
  183. agent01.sources.source7.interceptors.interceptor2.serializers.s2.name = remote_user
  184. agent01.sources.source7.interceptors.interceptor2.serializers.s3.name = datetime
  185. agent01.sources.source7.interceptors.interceptor2.serializers.s4.name = http_method
  186. agent01.sources.source7.interceptors.interceptor2.serializers.s5.name = uri
  187. agent01.sources.source7.interceptors.interceptor2.serializers.s6.name = status
  188. agent01.sources.source7.interceptors.interceptor2.serializers.s7.name = body_length
  189. agent01.sources.source7.interceptors.interceptor2.serializers.s8.name = http_referer
  190. agent01.sources.source7.interceptors.interceptor2.serializers.s9.name = user_agent
  191. agent01.sources.source7.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  192. agent01.sources.source7.interceptors.interceptor2.serializers.s11.name = request_time
  193. agent01.sources.source7.interceptors.interceptor2.serializers.s12.name = upstream_addr
  194. agent01.sources.source7.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  195. agent01.sources.source7.interceptors.interceptor2.serializers.s14.name = post_body
  196. agent01.sources.source7.interceptors.interceptor2.serializers.s15.name = domain_url
  197. agent01.sources.source7.interceptors.interceptor3.type = timestamp
  198. #####source8######
  199. agent01.sources.source8.type = exec
  200. agent01.sources.source8.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  201. agent01.sources.source8.channels = sink02
  202. agent01.sources.source8.interceptors = interceptor1 interceptor2 interceptor3
  203. agent01.sources.source8.interceptors.interceptor1.type = host
  204. agent01.sources.source8.interceptors.interceptor1.hostHeader = host
  205. agent01.sources.source8.interceptors.interceptor2.type = regex_extractor
  206. agent01.sources.source8.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  207. agent01.sources.source8.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  208. agent01.sources.source8.interceptors.interceptor2.serializers.s1.name = remote_addr
  209. agent01.sources.source8.interceptors.interceptor2.serializers.s2.name = remote_user
  210. agent01.sources.source8.interceptors.interceptor2.serializers.s3.name = datetime
  211. agent01.sources.source8.interceptors.interceptor2.serializers.s4.name = http_method
  212. agent01.sources.source8.interceptors.interceptor2.serializers.s5.name = uri
  213. agent01.sources.source8.interceptors.interceptor2.serializers.s6.name = status
  214. agent01.sources.source8.interceptors.interceptor2.serializers.s7.name = body_length
  215. agent01.sources.source8.interceptors.interceptor2.serializers.s8.name = http_referer
  216. agent01.sources.source8.interceptors.interceptor2.serializers.s9.name = user_agent
  217. agent01.sources.source8.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  218. agent01.sources.source8.interceptors.interceptor2.serializers.s11.name = request_time
  219. agent01.sources.source8.interceptors.interceptor2.serializers.s12.name = upstream_addr
  220. agent01.sources.source8.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  221. agent01.sources.source8.interceptors.interceptor2.serializers.s14.name = post_body
  222. agent01.sources.source8.interceptors.interceptor2.serializers.s15.name = domain_url
  223. agent01.sources.source8.interceptors.interceptor3.type = timestamp
  224. #####source9######
  225. agent01.sources.source9.type = exec
  226. agent01.sources.source9.command = tail -F /usr/local/openresty/nginx/logs/some_access.log
  227. agent01.sources.source9.channels = sink02
  228. agent01.sources.source9.interceptors = interceptor1 interceptor2 interceptor3
  229. agent01.sources.source9.interceptors.interceptor1.type = host
  230. agent01.sources.source9.interceptors.interceptor1.hostHeader = host
  231. agent01.sources.source9.interceptors.interceptor2.type = regex_extractor
  232. agent01.sources.source9.interceptors.interceptor2.regex = ([^\\s]*)\\s-\\s([^\\s]*)\\s\\[(.*)\\]\\s+\\"([\\S]*)\\s+([\\S]*)\\s+[\\S]*\\"\\s+(\\d+)\\s+(\\d+)\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"([^\\"]*)\\"\\s+\\"(.*?)\\"\\s+\\"([^\\"]*)\\"
  233. agent01.sources.source9.interceptors.interceptor2.serializers = s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
  234. agent01.sources.source9.interceptors.interceptor2.serializers.s1.name = remote_addr
  235. agent01.sources.source9.interceptors.interceptor2.serializers.s2.name = remote_user
  236. agent01.sources.source9.interceptors.interceptor2.serializers.s3.name = datetime
  237. agent01.sources.source9.interceptors.interceptor2.serializers.s4.name = http_method
  238. agent01.sources.source9.interceptors.interceptor2.serializers.s5.name = uri
  239. agent01.sources.source9.interceptors.interceptor2.serializers.s6.name = status
  240. agent01.sources.source9.interceptors.interceptor2.serializers.s7.name = body_length
  241. agent01.sources.source9.interceptors.interceptor2.serializers.s8.name = http_referer
  242. agent01.sources.source9.interceptors.interceptor2.serializers.s9.name = user_agent
  243. agent01.sources.source9.interceptors.interceptor2.serializers.s10.name = http_x_forwarded_for
  244. agent01.sources.source9.interceptors.interceptor2.serializers.s11.name = request_time
  245. agent01.sources.source9.interceptors.interceptor2.serializers.s12.name = upstream_addr
  246. agent01.sources.source9.interceptors.interceptor2.serializers.s13.name = upstream_response_time
  247. agent01.sources.source9.interceptors.interceptor2.serializers.s14.name = post_body
  248. agent01.sources.source9.interceptors.interceptor2.serializers.s15.name = domain_url
  249. agent01.sources.source9.interceptors.interceptor3.type = timestamp
  250. agent01.sinks.elasticSearch.type = org.apache.flume.sink.elasticsearch.ElasticSearchSink
  251. agent01.sinks.elasticSearch.timeZone=Asia/Shanghai
  252. agent01.sinks.elasticSearch.channel = sink02
  253. agent01.sinks.elasticSearch.batchSize = 2000
  254. agent01.sinks.elasticSearch.hostNames = 10.31.88.120:9300
  255. agent01.sinks.elasticSearch.indexName = nginx_access_log
  256. agent01.sinks.elasticSearch.indexType = static
  257. agent01.sinks.elasticSearch.clusterName = elasticsearch-zzb1
  258. agent01.sinks.elasticSearch.client = transport
  259. agent01.sinks.elasticSearch.serializer = org.apache.flume.sink.elasticsearch.ElasticSearchLogStashEventSerializer
  260. # Each sink's type must be defined
  261. agent01.sinks.loggerSink.type = logger
  262. #Specify the channel the sink should use
  263. agent01.sinks.loggerSink.channel = sink01
  264. # Each channel's type is defined.
  265. agent01.channels.sink01.type = memory
  266. agent01.channels.sink01.capacity = 10000
  267. agent01.channels.sink01.transactionCapacity = 10000
  268. agent01.channels.sink01.byteCapacityBufferPercentage = 20
  269. agent01.channels.sink01.keep-alive = 30
  270. agent01.channels.sink02.type = file
  271. agent01.channels.sink02.checkpointDir = /data/flume/data/checkpointDir
  272. agent01.channels.sink02.dataDirs = /data/flume/data/dataDirs