zhendongcmss opened a new issue #6011: URL: https://github.com/apache/apisix/issues/6011
### Issue description config: http-logger and error-log-logger at the same time will get a prometheus error. ``` 2022/01/04 16:06:53 [error] 29080#29080: *11531 [lua] prometheus.lua:860: log_error(): inconsistent labels count, expected 3, got 1, context: ngx.timer 2022/01/04 16:06:53 [error] 29080#29080: *11531 [lua] prometheus.lua:860: log_error(): inconsistent labels count, expected 3, got 1, context: ngx.timer 2022/01/04 16:06:53 [error] 29080#29080: *11531 [lua] prometheus.lua:860: log_error(): inconsistent labels count, expected 3, got 1, context: ngx.timer 2022/01/04 16:06:53 [error] 29080#29080: *11531 [lua] prometheus.lua:860: log_error(): inconsistent labels count, expected 3, got 1, context: ngx.timer 2022/01/04 16:06:53 [error] 29080#29080: *11531 [lua] prometheus.lua:860: log_error(): inconsistent labels count, expected 3, got 1, context: ngx.timer ``` ### Environment - apisix version (cmd: `apisix version`): 2.10.1 - OS (cmd: `uname -a`): - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): - apisix-dashboard version, if have: - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): - luarocks version, if the issue is about installation (cmd: `luarocks --version`): ### Steps to reproduce ``` curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/http-logger -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "log_format": { "request": "$request", "http_user_agent": "$http_user_agent", "upstream_header_time": "$upstream_header_time", "upstream_connect_time": "$upstream_connect_time", "content_length": "$content_length" } }' ``` ``` curl http://127.0.0.1:9080/apisix/admin/global_rules/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "plugins": { "http-logger": { "max_retry_count": 0, "timeout": 3, "retry_delay": 1, "batch_max_size": 2, "auth_header": "", "use_tcp_transmission": true, "inactive_timeout": 5, "uri": "http://100.76.0.76:15151", "include_req_body": false, "name": "http logger", "concat_method": "new_line", "send_prometheus_data": false, "buffer_duration": 60 } } }' ``` ``` curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/error-log-logger -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "tcp": { "host": "100.76.0.76", "port": 15151 }, "inactive_timeout": 1, "batch_max_size": 10, "level": "WARN" }' ``` ### Actual result  ### Error log  ### Expected result _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
