.. _metrics_user_site: ################# User Site Metrics ################# The metrics in user site side shows the application layer stats for each explicit user sites. The metrics path will have prefix user.site., where *site_id* is specified in config option :ref:`id `. The following are the tags for all user metrics: * :ref:`daemon_group ` * :ref:`stat_id ` * user_group Show the name of the user group. * user Show the name of the user. * user_type Show the type of the user. See :ref:`user type ` for more details. .. versionadded:: 1.7.0 Request ======= The following tags are set for metrics in this section: * server Set the server name that received the request. Extra tags set at server side will also be added. The following tag is also set for *user.connection.\** metrics: * :ref:`connection ` The following tag is also set for *user.request.\** metrics: * :ref:`request ` The metric names are: * user..connection.total **type**: count Show how many client connections from the user. Connections that failed at authentication stage is not counted in. * user..request.total **type**: count Show the total requests that has been received from the user. The value should be larger than or equal to the value of user.connection.total, as the connection may be reused for some protocols. * user..request.alive **type**: gauge Show the alive requests for the user. * user..request.ready **type**: count Show the total tasks that have reached the *ready* stage for the user. The remote connection may be a new connection, or an old keepalive connection. * user..request.reuse **type**: count Show the total number of reuse of the old remote keepalive connections. Note the reuse may be failed. * user..request.renew **type**: count Show the total number of failed reuse of the old remote keepalive connections. After the old connection failed at some recoverable stage, a new connection is made to retry the request. * user..l7.connection.alive **type**: gauge Show the alive layer 7 proxy connections. .. versionadded:: 1.4.0 Traffic ======= The following tags are set for metrics in this section: * :ref:`request ` * server Set the server name that received the request. Extra tags set at server side will also be added. The io stats for user only include application layer stats, i.e. the negotiation data in socks protocol is not counted in, and the tls layer for https forward is not counted in also. The metric names are: * user..traffic.in.bytes **type**: count Show the total bytes received from client. * user..traffic.in.packets **type**: count Show the total datagram packets received from client. Note that this is not available for stream type transport protocols. * user..traffic.out.bytes **type**: count Show the total bytes sent to client. * user..traffic.out.packets **type**: count Show the total datagram packets sent to client. Note that this is not available for stream type transport protocols. Upstream Traffic ================ The following tags are set for metrics in this section: * :ref:`transport ` * escaper Set the server name that received the request. Extra tags set at escaper side will also be added. The io stats for user only include application layer stats, and the tls layer for https forward is not counted in also. The metric names are: * user..upstream.traffic.in.bytes **type**: count Show the total bytes received from upstream. * user..upstream.traffic.in.packets **type**: count Show the total datagram packets received from upstream. Note that this is not available for stream type transport protocols. * user..upstream.traffic.out.bytes **type**: count Show the total bytes sent to upstream. * user..upstream.traffic.out.packets **type**: count Show the total datagram packets sent to upstream. Note that this is not available for stream type transport protocols.