Grouping records on attribute values
Statistical information such as the number of times a particular URL has been accessed overall and per client, and the total number of GET and POST requests per client can provide valuable insights into whether any of your resources need to be expanded to meet the demand or be optimized for delivery. To obtain such statistics, you must use an appropriate set of selector expressions, and then use the pattern parameter in the stat stream identifier command. The grouping is based on the pattern that is specified in the command. Grouping can be performed concurrently on the values of multiple expressions.
In the command-line interface, you can group the output by using patterns of your choice. In the GUI, the pattern depends on the choices you make when drilling down through the values of various selector expressions. For example, consider a selector that has the expressions HTTP.REQ.URL, CLIENT.IP.SRC, and HTTP.REQ.LB_VSERVER.NAME, in that order. The statistics home page displays icons for each of these expressions. If you click the icon for CLIENT.IP.SRC, the output is based on the patterns ?. The output displays statistics for each client IP address. If you click an IP address, the output is based on the patterns *
<IP address> ? and ?
<IP address> * where
<IP address> is the IP address you selected. In the resulting output, if you click a URL, the pattern used is
<URL> <IP address> ?.
To group the records on the values of selector expressions by using the command line interface
At the command prompt, enter the following command to group the records on the basis of a selector expression:
stat stream identifier <name> [<pattern> ...]
Each example uses a different pattern to demonstrate the effect of the pattern on the output of the stat stream identifier command. The selector expressions are HTTP.REQ.URL and HTTP.REQ.HEADER(“UserHeader”), in that order. The requests contain a custom header whose name is UserHeader. Note that in the examples, a given statistical value changes as determined by the grouping, but the sum total of the values for a given field remains the same.
In the following command, the pattern used is ? ?. The appliance groups the output on the values collected for both selector expressions. The row headers consist of the expression values separated by a question mark (?). The row with the header /mysite/mypage1.html?Ed displays statistics for requests made by user Ed for the URL /mysite/mypage1.html.
> stat stream identifier myidentifier ? ? -fullValues Stream Session statistics Req BandW /mysite/mypage2.html?Grace 1 2553 /mysite/mypage1.html?Grace 2 4 /mysite/mypage1.html?Ed 8 16 /mysite/mypage2.html?Joe 1 2554 /mysite/mypage1.html?Joe 5 10 /mysite/?Joe 1 4 RspTime Conn /mysite/mypage2.html?Grace 0 0 /mysite/mypage1.html?Grace 0 0 /mysite/mypage1.html?Ed 0 0 /mysite/mypage2.html?Joe 0 0 /mysite/mypage1.html?Joe 0 0 /mysite/?Joe 6 0 Done
In the following command, the pattern used is * ?. The appliance groups the output on the values accumulated for the second expression HTTP.REQ.HEADER(“UserHeader”). The rows display statistics for all requests made by users Grace, Ed, and Joe.
> stat stream identifier myidentifier * ? Stream Session statistics Req BandW RspTime Conn Grace 3 2557 0 0 Ed 8 16 0 0 Joe 7 2568 6 0 Done
In the following command, the pattern used is ? *, which is the default pattern. The output is grouped on the values collected for the first selector expression. Each row displays statistics for one URL.
> stat stream identifier myidentifier ? * -fullValues Stream Session statistics Req BandW /mysite/mypage2.html 2 5107 /mysite/mypage1.html 15 30 /mysite/ 1 4 RspTime Conn /mysite/mypage2.html 0 0 /mysite/mypage1.html 0 0 /mysite/ 6 0 Done
In the following command, the pattern used is * *. The appliance displays one set of collective statistics for all the requests received, with no row title.
> stat stream identifier myidentifier * * Stream Session statistics Req BandW RspTime Conn 18 5141 6 0 Done
In the following command, the pattern is /mysite/mypage1.html *. The appliance displays one set of collective statistics for all the requests received for the URL /mysite/mypage1.html, with no row title.
> stat stream identifier myidentifier /mysite/mypage1.html * Stream Session statistics Req BandW RspTime Conn 15 30 0 0 Done
To group the records on the values of selector expressions by using the GUI
- Navigate to AppExpert > Action Analytics > Stream Identifiers.
- In the details pane, click the stream identifier for which you want to view statistics, and then click Stream Sessions.
- On the Home page, click the icon for the stream selector by which you want to group the output.
- To return to the Home page from the statistics page for a selector expression, click Home.
- To view statistics for the value of a given selector expression, click the value. You can repeat this step for a selector expression value in each subsequent output until you obtain the statistics you want.