You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kamly (via GitHub)" <gi...@apache.org> on 2023/06/04 07:49:35 UTC

[GitHub] [apisix] kamly opened a new issue, #9596: help request: How to filter HEAD requests when using file-logger?

kamly opened a new issue, #9596:
URL: https://github.com/apache/apisix/issues/9596

   ### Description
   
   many head request , i want to filter it
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.3.0
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix] An-DJ commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "An-DJ (via GitHub)" <gi...@apache.org>.
An-DJ commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1576415394

   > but what I want is that if the method is a head request, the log is not recorded
   
   FYI it is not supported in APISIX yet.
   
   IMHO, filtering, aggregation, count and other analysis operation can be further done based on the raw log data. If we do more restriction conditions on logging, it may lose the control of observability.
   
   Recommend you filter and aggregate logs with other tools and OLAP system. : )


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] shreemaan-abhishek commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1576603435

   I think you will have to patch apisix for this use case.


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kamly commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "kamly (via GitHub)" <gi...@apache.org>.
kamly commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1576564683

   in nginx, we can 
   
   ```
   map $request_method $ignore_head_request {
       HEAD 0;
       default 1;
   }
   access_log /data/logs/nginx/nginx_access.log json if=$ignore_head_request;
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] monkeyDluffy6017 closed issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed issue #9596: help request: How to filter HEAD requests when using file-logger?
URL: https://github.com/apache/apisix/issues/9596


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kamly commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "kamly (via GitHub)" <gi...@apache.org>.
kamly commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1576067815

   > https://apisix.apache.org/docs/apisix/plugins/file-logger/
   > 
   > You may need `include_resp_body_expr`?
   
   i think `include_resp_body_expr` records the conditions of the body
   
   ```
   "include_resp_body": true,
   "include_resp_body_expr": [
       [
         "arg_foo",
         "==",
         "bar"
       ]
   ]
   ```
   is arg foo is bar , can log the response body
   
   but what I want is that if the method is a head request, the log is not recorded


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tao12345666333 commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1588448878

   @monkeyDluffy6017 PTAL, thanks


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] An-DJ commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "An-DJ (via GitHub)" <gi...@apache.org>.
An-DJ commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1575980592

   https://apisix.apache.org/docs/apisix/plugins/file-logger/
   
   You may need `include_resp_body_expr`?


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kamly commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "kamly (via GitHub)" <gi...@apache.org>.
kamly commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1584475662

   @shreemaan-abhishek want help~


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kamly commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "kamly (via GitHub)" <gi...@apache.org>.
kamly commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1590314452

   @monkeyDluffy6017 hi,  please look look, thanks~


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kamly commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "kamly (via GitHub)" <gi...@apache.org>.
kamly commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1585483020

   @spacewander hi ,  can file-logger support `filter_expr` 
   
   example:
   ```
   {
       "file-logger": {
           "filter_expr": [
               [
                   "http_method",
                   "!=",
                   "HEAD"
               ]
           ]
       }
   }
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] kamly commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "kamly (via GitHub)" <gi...@apache.org>.
kamly commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1576614023

   I want to push mr to apisix, but where should I start to solve this problem?  Can you provide some ideas?


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9596: help request: How to filter HEAD requests when using file-logger?

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9596:
URL: https://github.com/apache/apisix/issues/9596#issuecomment-1606744548

   LGTM


-- 
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: notifications-unsubscribe@apisix.apache.org

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