local plugin_name = "kafka-logger" local stale_timer_running = false; local timer_at = ngx.timer.at local tostring = tostring local ngx = ngx local buffers = {} local schema = { type = "object", properties = { broker_list = { type = "object" }, kafka_topic = {type = "string...
"include_resp_body": false, "kafka_topic": "apisix-logger-test", "log_format": { "api": "$request_uri", "userId": "$http_sub", "userName": "$http_preferred_username", "now":"$time_iso8601", }, "producer_type": "async", "required_acks": 1 } $开头表示是系统变量 $http_...
具体示例可参考下方: {"plugins": {"kafka-logger": {"broker_list" : {"127.0.0.1":9092},"kafka_topic" : "test2","include_resp_body": true,"include_resp_body_expr": [["sent_http_content_length","<","4096"],["sent_http_content_type","==","application/json"],]}},"upstream": ...
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" KAFKA_BROKER_ID: 1 KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO" depends_on: - zookeeper kafka2: image: confluentinc/cp-kafka:...
"kafka-logger": { "broker_list" : { "127.0.0.1":9092 }, "kafka_topic" : "test2", "include_resp_body": true, "include_resp_body_expr": [ [ "sent_http_content_length", "<", "4096" ], [ "sent_http_content_type", "==", ...
"kafka-logger": { "broker_list":{ "127.0.0.1":9092 }, "kafka_topic" : "test2", "request_body": { "expr": [ ["request_length", "<", "1024"], ] }, "key" : "key1", "batch_max_size": 1, "name": "kafka logger" ...
以下是部分测试验证的细节,启动log-kafka插件收集 {"broker_list": {"192.168.11.22": 9092,"192.168.11.23": 9092,"192.168.11.24": 9092 },"kafka_topic":"test_apisix","key":"key1","batch_max_size": 1,"name":"kafka logger","include_req_body":true,"meta_format":"default","log_format"...
1curl-XPUT'http://127.0.0.1:9080/apisix/admin/routes/r1'\2--header'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'\3--header'Content-Type: application/json'\4--data-raw'{5"uri": "/*",6"plugins": {7"kafka-logger": {8"batch_max_size": 1,9"broker_list": {10"127.0.0.1":...
refactor(kafka-logger): identify the broker ahead of time (apache#4863) Aug 26, 2021 utils chore: Use build-tools release v2.0.0 instead of the master branch (a… Aug 24, 2021 .asf.yaml ci: protect release branches from deleted (apache#4841) ...
Support sasl config in kafka-logger plugin: #8050 Support set resolve domain in proxy-mirror plugin: #7861 Support brokers property in kafka-logger plugin, which supports different broker to set the same host: #7999 Support get response body in ext-plugin-post-resp: #7947 Added cas-auth plu...