Manual Chapter : Using Local Traffic Policies with Analytics

Applies To:

Show Versions Show Versions

BIG-IP AAM

  • 14.0.1, 14.0.0

BIG-IP APM

  • 14.0.1, 14.0.0

BIG-IP Analytics

  • 14.0.1, 14.0.0

BIG-IP Link Controller

  • 14.0.1, 14.0.0

BIG-IP LTM

  • 14.0.1, 14.0.0

BIG-IP PEM

  • 14.0.1, 14.0.0

BIG-IP AFM

  • 14.0.1, 14.0.0

BIG-IP DNS

  • 14.0.1, 14.0.0

BIG-IP ASM

  • 14.0.1, 14.0.0
Manual Chapter

Using Local Traffic Policies with Analytics

Overview: Using local traffic policies with Analytics

When you attach an Analytics (AVR) profile to a virtual server, the BIG-IP® system can gather, log, notify, and display statistical information about the traffic. You can associate a local traffic policy with a virtual server to further define which transactions to include or exclude in the statistics. Rules in the local traffic policy can enable or disable AVR for whatever type of traffic you want to define. You might want to do this to save system resources by not deploying Analytics on parts of the traffic that you are not interested in monitoring.

This implementation shows how to create an HTTP Analytics profile to store statistics locally. It then describes how to create a local traffic policy and add rules to the policy so that the Analytics module saves statistics for all traffic except that which has a URI containing the word index. (In this case, you are not interested in monitoring traffic directed towards index pages.)

Other options are available for configuring local traffic policies with Analytics. By following through the steps in this example, you can see the other options that are available on the screens, and can adjust the example for your needs.

Task Summary

Collecting application statistics locally

You need to provision the Application Visibility and Reporting (AVR) module before you can collect application statistics locally.
You can configure the BIG-IP system to collect specific application statistics locally.
  1. On the Main tab, click Local Traffic > Profiles > Analytics > HTTP Analytics .
    Tip: If Analytics is not listed, this indicates that Application Visibility and Reporting (AVR) is not provisioned, or you do not have rights to create profiles.
    The HTTP Analytics screen opens.
  2. Click Create.
    The New HTTP Analytics profile screen opens.
  3. In the Profile Name field, type a unique name for the Analytics profile.
  4. From the Parent Profile list, select the profile from which you want to inherit settings.
    The default profile is often used as the parent profile.
    The new profile inherits the values from the parent profile. If the parent is changed, the inherited values in the new profile also change.
  5. Select the Custom check box.
  6. For the Statistics Logging Type setting, verify that Internal is selected. If it is not, select it.
    Selecting Internal causes the system to store statistics locally, and you can view the charts on the system by starting at the Main tab, and clicking Statistics > Analytics .
  7. You can use the default values for the rest of the General Configuration settings.
  8. In the Associated Virtual Servers area, specify the virtual servers for which to capture application statistics:
    1. For the Virtual Servers setting, click Add.
    2. From the Select Virtual Server popup that opens, select the virtual servers to include and then click Done.
    Note: Only virtual servers previously configured with an HTTP profile display in the list (because the data being collected applies to HTTP traffic). Also, you can assign only one HTTP Analytics profile to a virtual server; therefore, the list displays only virtual servers that have not been assigned an Analytics profile.
    Special considerations apply if using Analytics on a BIG-IP system with both Application Security Manager and Access Policy Manager, where security settings (in Portal Access webtop or an iRule) redirect traffic from one virtual server to another. In this case, you need to attach the HTTP Analytics profile to the second virtual server to ensure that the charts show accurate statistics.
  9. In the Statistics Gathering Configuration area, select the Custom check box.
  10. In the Statistics Gathering Configuration area, for Collected Metrics, select additional statistics you want the system to collect from the requests:
    Option Description
    Max TPS and Throughput Collects and logs statistics regarding the maximum number of transactions occurring per second (TPS) and the amount of traffic moving through the system.
    Note: Maximum request and response throughput is collected and recorded separately. Each value is then displayed separately when you drill down into details of Transaction Outcomes ( Statistics > Analytics > Overview ).
    HTTP Timing (RTT, TTFB, Duration) Collects and logs statistics regarding the HTTP request and response times, including round-trip time, time to first byte and overall transaction duration time.
    Page Load Time Collects and logs statistics regarding the time it takes an application user to get a complete response from the application, including network latency and completed page processing.
    Note: End-user response times and latencies can vary significantly based on geographic location and connection types.
    User Sessions Collects and logs statistics regarding the number of unique user sessions. For Timeout, select the allowed minutes of user inactivity before the system considers the session to be over.
    For Cookie Secure Attribute, specify whether to secure session cookies:
    • Always, the secure attribute is always added to the session cookie.
    • Never, the secure attribute is never added to the session cookie.
    • Only SSL, the secure attribute is added to the session cookie only when the virtual server has a client SSL profile (the default value).
    By default, the system collects many metrics, including TPS, throughput, server latency, response time, network latency. You can select the metrics here, in addition to the ones already collected, once the Analytics profile is attached to one or more virtual servers.
  11. In the Statistics Gathering Configuration area, for Collected Entities, select additional entities to collect statistics for each request.
    By default, the system collects many entity statistics, including virtual servers, pool members, browser names, operating system, and so on. You can select the ones here in addition to the ones already collected once the Analytics profile is attached to one or more virtual servers.
    Note: When you select URLs, Countries, Client IP Addresses or Client Subnets you have additional options configure specific statistics filtering options.
    Option Description
    URLs Saves the URLs that were requested.
    Countries Saves the name of the country where the request came from, and is based on the client IP address criteria.
    Client IP Addresses Saves the IP address where the request originated. The address saved also depends on whether the request has an XFF (X-forwarded-for) header and whether the HTTP profile accepts XFF headers.
    Client Subnets Saves statistics for predefined client subnets. Client subnets can be added in the Subnets area of the default HTTP Analytics profile.
    Response Codes Saves HTTP response codes that the server returned in response to requests.
    User Agents Saves information about browsers making the request.
    Methods Saves HTTP methods in requests.
    OS and Browsers Saves information about the operating system and browser making the request.
  12. In the Statistics Gathering Configuration area, for Collect URLs, you can configure whether the system collects traffic from all or from specific URLs.
    1. Select All to collect traffic from all URLs.
      By default, the system collects traffic from all URLs, when you select URLs from the Collected Entities list.
    2. Select Only to collect traffic from specific URLs.
    3. Specify the URLs for which to capture traffic and click Add. You can add up to 10 URLs to the list.
      Note: If you select Only and leave the list empty, the system collects traffic data from all URLs.
  13. In the Statistics Gathering Configuration area, for Collect Countries, you can configure whether the system collects traffic from all or from specific countries.
    1. Select All to collect traffic from all countries.
      By default, the system collects traffic from all countries, when you select Countries from the Collected Entities list.
    2. Select Only to collect traffic from specific countries.
    3. Specify the countries for which to capture traffic. Select from the Available Countries list and use the arrow keys to move each country to the Selected Countries list. You can add up to 10 countries to the Selected list.
      Note: If you select Only and leave the list empty, the system collects traffic data from all countries.
  14. In the Statistics Gathering Configuration area, for Collect Client IP Addresses, you can configure whether the system collects traffic from all or from specific client IPs.
    1. Select All to collect traffic from all client IP addresses.
      By default, the system collects traffic from all client IPs, when you select Client IP Addresses from the Collected Entities list.
    2. Select Only to collect traffic from specific client IP addresses.
    3. Specify the client IP addresses for which to capture traffic and click Add. You can add up to client IP addresses to the list.
      Note: If you select Only and leave the list empty, the system collects traffic data from all client IP addresses.
  15. In the Statistics Gathering Configuration area, for Collect Client Subnets, you can configure whether the system collects traffic from all or from specific client subnet IPs.
    1. Select All to collect traffic from all subnets.
      By default, the system collects traffic from all subnets, when you select Client Subnets from the Collected Entities list.
    2. Select Only to collect traffic from specific subnets.
    3. Specify the subnet IPs for which to capture traffic and click Add. You can add up to 10 subnet IPs to the list.
      Important: You can filter the listed subnets by one type of IP protocol. Adding both IPv4 and IPv6 protocols results in an error.
      Note: If you select Only and leave the list empty, the system collects traffic data from all subnets.
  16. Click Finished.
The BIG-IP system collects the statistics specified in the Analytics profile. You can view the statistics by clicking Statistics > Analytics .

Creating a local traffic policy for Analytics

Before you can create a local traffic policy for Analytics, you need to provision the Application Visibility and Reporting (AVR) module.
You can create a local traffic policy to define which traffic should be included (or excluded) from Analytics statistics collection. This example creates one rule that looks at all traffic and excludes traffic that has the word "index" in the URI.
  1. On the Main tab, click Local Traffic > Policies > Policy List .
    The Policy List Page screen opens.
  2. Click Create.
    The New Policy screen opens.
  3. In the Policy Name field, type a unique name for the policy.
  4. For the Strategysetting, select first to apply the actions in the first rule that matches.
  5. If you see a Type setting, leave it set to Traffic Policy.
  6. Click Create Policy.
    The Draft Policy screen opens.
  7. In the Rules area, click Create to create a rule that defines when traffic is handled by the security policy.
  8. In the Name field, type the word index.
  9. In the Match all of the following conditions area, click + and specify these conditions:
    1. For the first condition, select HTTP URI.
    2. For the second condition, select path.
    3. For the third condition, select contains.
    4. For the fourth condition, by the field below any of, type index and click Add.
    This rule looks for requests with a URI that contains the word "index".
  10. In the Do the following when the traffic is matched area, click + and specify the actions:
    1. For the first action, select Disable.
      For the second action, select avr.
  11. Click Save to add the rule to the local traffic policy.
    The policy properties screen opens.
  12. Create a default rule that tells the system to store statistics for all other traffic.
    1. In the Rules area, click Create.
    2. In the Name field, type the word default.
    3. Leave Match all of the following conditions set to All traffic.
    4. In the Do the following when the traffic is matched area, click +.
    5. For the actions, select Enable, then avr.
    6. Click Save to add the rule to the local traffic policy.
  13. To save the updated policy, click Save Draft.
    The Policy List Page opens.
  14. Select the check box next to the draft policy you edited, and click Publish.
You have created and published a local traffic policy that controls Analytics. It looks at all traffic and disables statistics gathering for any request that includes the word index in the URI. For all other traffic, statistics are collected.

Associating a published local traffic policy with a virtual server

After you publish a local traffic policy, you associate that published policy with the virtual server created to handle application traffic.
  1. On the Main tab, click Local Traffic > Virtual Servers .
    The Virtual Server List screen opens.
  2. Click the name of the virtual server you want to modify.
  3. On the menu bar, click Resources.
  4. In the Policies area, click the Manage button.
  5. For the Policies setting, select the local traffic policy you created from the Available list and move it to the Enabled list.
  6. Click Finished.
The published policy is associated with the virtual server.

Implementation results

When you have completed the steps in this implementation, you have configured the BIG-IP® system to store statistics locally. A local traffic policy instructs the Analytics module to save statistics for all traffic except that which has a URI containing the word index.