- Configuring the AppFlow Feature
- Exporting Performance Data of Web Pages to AppFlow Collector
- Session Reliability on NetScaler High Availability Pair
You configure AppFlow in the same manner as most other policy-based features. First, you enable the AppFlow feature. Then you specify the collectors to which the flow records are sent. After that, you define actions, which are sets of configured collectors. Then you configure one or more policies and associate an action to each policy. The policy tells the NetScaler appliance to select requests the flow records of which are sent to the associated action. Finally, you bind each policy either globally or to specific vservers to put it into effect.
The configuration utility provides tools that help users define the policies and actions that determine exactly how the NetScaler appliance export records for a particular flow to a set of collectors(action.) The command line interface provides a corresponding set of CLI-based commands for experienced users who prefer a command line.
To be able to use the AppFlow feature, you must first enable it.
At the command prompt, type one of the following commands:
At the command prompt, type the following commands to add a collector and verify the configuration:
> add appflow collector col1 -IPaddress 10.102.29.251 -port 8000 -netprofile n2
At the command prompt, type the following commands to add multiple collectors:
An AppFlow action is a set collectors, to which the flow records are sent if the associated AppFlow policy matches.
> add appflow action apfl-act-collector-1-and-3 -collectors collector-1 collecter-3
After you configure an AppFlow action, you must next configure an AppFlow policy. An AppFlow policy is based on a rule, which consists of one or more expressions.
> add appflow policy apfl-pol-tcp-dsprt client.TCP.DSTPORT.EQ(22) apfl-act-collector-1-and-3
To put a policy into effect, you must bind it either globally, so that it applies to all traffic that flows through the NetScaler, or to a specific virtual server, so that the policy applies only to the traffic related to that virtual server.
When you bind a policy, you assign it a priority. The priority determines the order in which the policies you define are evaluated. You can set the priority to any positive integer.
In the NetScaler operating system, policy priorities work in reverse order—the higher the number, the lower the priority. For example, if you have three policies with priorities of 10, 100, and 1000, the policy assigned a priority of 10 is performed first, then the policy assigned a priority of 100, and finally the policy assigned an order of 1000.
You can leave yourself plenty of room to add other policies in any order, and still set them to evaluate in the order you want, by setting priorities with intervals of 50 or 100 between each policy when you globally bind it. You can then add additional policies at any time without having to change the priority of an existing policy.
bind appflow global af_policy_lb1_10.102.71.190 1 NEXT -type REQ_OVERRIDE -invoke vserver google
bind lb vserver google -policyname af_policy_google_10.102.19.179 -priority 251
At the command prompt, type:
set cs vserver <name> <protocol> <IPAddress> <port> -appflowLog ENABLED
> set cs vserver Vserver-CS-1 HTTP 10.102.29.161 80 -appflowLog ENABLED
At the command prompt, type:
set service ser -appflowLog ENABLED
At the command prompt, type the following commands to set the AppFlow parameters and verify the settings:
> set appflow Param -templateRefresh 240 -udpPmtu 128 -httpUrl enabled
The following example illustrates the procedure for configuring AppFlow for DataStream using the command line interface.
> enable feature appflow > add db user sa password freebsd > add lbvserver lb0 MSSQL 10.102.147.97 1433 -appflowLog ENABLED > add service sv0 10.103.24.132 MSSQL 1433 -appflowLog ENABLED > bind lbvserver lb0 sv0 > add appflow collector col0 -IPAddress 10.102.147.90 > add appflow action act0 -collectors col0 > add appflow policy pol0 "mssql.req.query.text.contains(\"select\")" act0 > bind lbvserver lb0 -policyName pol0 -priority 10
When the Netscaler appliance receives a database request, the appliance evaluates the request against a configured policy. If a match is found, the details are sent to the AppFlow collector configured in the policy.