You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/05 03:14:58 UTC

[GitHub] [apisix] diaosj opened a new issue #3526: request help: Can I drop requests from Prometheus in access.log?

diaosj opened a new issue #3526:
URL: https://github.com/apache/apisix/issues/3526


   ### Issue description
   I enable the Prometheus plugin and the `access.log` file is filled with requests from Prometheus.
   ```
   {"remote_addr":"","time_local":"05/Feb/2021:11:11:10 +0800","http_host":"","request":"GET /apisix/prometheus/metrics HTTP/1.1", "status": 200,"body_bytes_sent": 304059,"request_time":"0.085", "http_referrer":"","http_user_agent":"Prometheus/2.10.0","upstream_addr":"", "upstream_status":"","upstream_response_time":"", "upstream_url":"http://10.199.4.69", "uin":"","ti_project_id": ,"ti_business_id": , "api_version":"","client_ip":"","event_type":"", "service":"","action":"","request_id":""}
   ```
   Should I remove these request logs? If so, how to remove them? What is the best practice?
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):2.1
   * OS (cmd: `uname -a`): Linux 4.14.105-19-0017 #1 SMP Wed Oct 28 12:13:16 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   nginx version: openresty/1.19.3.1
   built by gcc 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
   built with OpenSSL 1.1.1h  22 Sep 2020
   TLS SNI support enabled
   * 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:
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] diaosj commented on issue #3526: request help: Can I drop requests from Prometheus in access.log?

Posted by GitBox <gi...@apache.org>.
diaosj commented on issue #3526:
URL: https://github.com/apache/apisix/issues/3526#issuecomment-773844108


   > Since Nginx doesn't support disabling access log on the fly, AFAIK there is no way to do that.
   > Previously I solved this problem at the collector side, like skipping special UA/path in the filebeat/fluentd.
   
   Got it. Thanks!
   Currently, I deal with it in the same way. Drop these in the filebeat.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #3526: request help: Can I drop requests from Prometheus in access.log?

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3526:
URL: https://github.com/apache/apisix/issues/3526#issuecomment-773764929


   Since Nginx doesn't support disabling access log on the fly, AFAIK there is no way to do that.
   Previously I solved this problem at the collector side, like skipping special UA/path in the filebeat/fluentd.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #3526: request help: Can I drop requests from Prometheus in access.log?

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3526:
URL: https://github.com/apache/apisix/issues/3526#issuecomment-773764929


   Since Nginx doesn't support disabling access log on the fly, AFAIK there is no way to do that.
   Previously I solved this problem at the collector side, like skipping special UA/path in the filebeat/fluentd.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] diaosj closed issue #3526: request help: Can I drop requests from Prometheus in access.log?

Posted by GitBox <gi...@apache.org>.
diaosj closed issue #3526:
URL: https://github.com/apache/apisix/issues/3526


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] diaosj closed issue #3526: request help: Can I drop requests from Prometheus in access.log?

Posted by GitBox <gi...@apache.org>.
diaosj closed issue #3526:
URL: https://github.com/apache/apisix/issues/3526


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] diaosj commented on issue #3526: request help: Can I drop requests from Prometheus in access.log?

Posted by GitBox <gi...@apache.org>.
diaosj commented on issue #3526:
URL: https://github.com/apache/apisix/issues/3526#issuecomment-773844108


   > Since Nginx doesn't support disabling access log on the fly, AFAIK there is no way to do that.
   > Previously I solved this problem at the collector side, like skipping special UA/path in the filebeat/fluentd.
   
   Got it. Thanks!
   Currently, I deal with it in the same way. Drop these in the filebeat.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org