Though the ability to log requests on a per-virtual-service basis is a powerful feature, if not fine-tuned, it can consume huge disk space by logging irrelevant data. Superfluous data can be filtered out after being collected. A more effective approach is to filter out such data before it bloats a disk log. For this purpose, the Avi Load Balancer permits the user to establish user-defined filters.

To create a user-defined filter:

  1. Navigate to Applications > Virtual Services > CREATE VIRTUAL SERVICE > Advanced Setup.

  2. In Step 3: Analytics of the virtual service wizard, navigate to the Client Log Filters section and click the Add Client Log Filter button.

  3. Enter the Filter Name and specify a Duration (in minutes) for the filter to be applied to application traffic.

  4. Specify the condition for the match by identifying what needs to be matched. You can apply the Matching Filter to any inbound request, the client IP address, the request path, or their combinations.

  5. To apply the filter to Client IP addresses inside or outside the set of given addresses, select Client IP from the Matching Filter drop-down menu and specify some addresses for which the filtering has to be applied. Select Is or Is not to filter inside or outside the set of addresses specified.

    Note:

    The list of client IP addresses can also appear within a named IP group.

    1. Click Add Item to specify additional IP addresses.

  6. To add a filter matching a specific path, select Path from the Matching Filter drop-down menu and add the path-match criteria.



  7. Once all desired matching criteria are specified for the filter, it is added to the list of filters defined for the virtual service.

Immediately after a filter is defined, it is added in the enabled state, so the Enable button is greyed out. From the enabled state, you can transition a checked filter into either the disabled state or the removed state. In the disabled state, the filter definition remains, but it is not applied to requests. In the removed state, the filter definition is removed altogether.