You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "mattyw (via GitHub)" <gi...@apache.org> on 2025/07/18 05:00:41 UTC

[I] cache_promote.so adding --stats-enable-with-id requires restart [trafficserver]

mattyw opened a new issue, #12368:
URL: https://github.com/apache/trafficserver/issues/12368

   The `--stats-enable-with-id` argument on cache_promote requires a full ATS restart to function correctly. This isn't documented, and is painful if you want to only enable cache promote statistics for a short time to do some analysis.
   
   To reproduce:
   
   Create a simple remap rule:
   
   ```
   map http://localhost:8080/batch1 http://localhost:8081/batch1 \
       @plugin=cache_promote.so @pparam=--policy=lru @pparam=--hits=2
   ```
   
   Start ATS, then edit the remap rule to add `--stats-enable-with-id` and `traffic_ctl config reload`
   
   
   ```
   map http://localhost:8080/batch1 http://localhost:8081/batch1 \
       @plugin=cache_promote.so @pparam=--policy=lru @pparam=--hits=2 @pparam=--stats-enable-with-id=remap1
   ```
   
   Then send some requests and you'll observe the stats remain at 0
   
   ```
   $ curl -v http://localhost:8080/batch1?max-age=5 
   $ traffic_ctl metric match cache_promote
   ...
   plugin.cache_promote.remap1.total_requests 0
   ...
   ```
   
   Restart ATS and send another request and you'll see the metric be correctly incremented
   
   ```
   $ curl -v http://localhost:8080/batch1?max-age=5 
   $ traffic_ctl metric match cache_promote
   ...
   plugin.cache_promote.remap1.total_requests 1
   ...
   ```


-- 
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: issues-unsubscribe@trafficserver.apache.org.apache.org

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


Re: [I] cache_promote.so adding --stats-enable-with-id requires restart [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop closed issue #12368: cache_promote.so adding --stats-enable-with-id requires restart
URL: https://github.com/apache/trafficserver/issues/12368


-- 
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: issues-unsubscribe@trafficserver.apache.org

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