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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to