unit statistics

Tobias Genannt tobias.genannt at kappa-velorum.net
Tue Sep 20 17:16:35 UTC 2022


Hello,

I was just testing the new statistics feature, which looks really nice. 
I'm using Unit inside a docker container and the configuration API 
should only be visible inside the container, but I would like to see the 
statistics from the outside. So to solve the problem I added a route 
like this:

{
     "match": {
         "uri": "/status/*"
     },

     "action": {
         "proxy": "http://unix:/opt/unit/unit.sock"
     }
}

This works as expected but now all calls to the /status/ will change the 
stats. So it would be nice if the stats could be disabled for a route or 
if this is not possible for a listener.

I also noticed that my connections object looks like this:
connections": {
     "accepted": 8,
     "active": -41,
     "idle": 0,
     "closed": 49
}

Notice the negative number for "active". For reference the complete 
configuration is this:
https://github.com/netbox-community/netbox-docker/blob/release/docker/nginx-unit.json
+ the additional route as seen above.


Greetings,
Tobias



More information about the unit mailing list