Replies: 1 comment 3 replies
-
要将APISIX的全部访问日志接入到Elasticsearch,而不需要为每个路由单独配置,可以通过在APISIX的全局插件配置中启用 以下是一个示例配置,展示如何在全局启用 curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/elasticsearch-logger \
-H "X-API-KEY: $admin_key" -X PUT -d '
{
"log_format": {
"host": "$host",
"@timestamp": "$time_iso8601",
"client_ip": "$remote_addr"
}
}' 通过这种方式, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
elasticsearch-logger 插件我看要配合指定路由才能用,我不想单一配置,不能把全部经过网关的请求都发到es吗?
Beta Was this translation helpful? Give feedback.
All reactions