Application Delivery Management

Enable analytics and configure alarms on a virtual server defined in a StyleBook

You can use the operations construct to configure NetScaler Console analytics to collect appflow records on all or some of the traffic transactions handled by any virtual server component that is part of a StyleBook. You can also use this construct to configure alarms to get insight into the traffic managed by the virtual server.

The following example shows an operations section of a StyleBook:

operations:
  analytics:
   -
    name: lbvserver-ops
    properties:
    target: $components.basic-lb-comp.outputs.lbvserver
    filter: HTTP.REQ.URL.CONTAINS("catalog")
   -
    alarms:
     -
      name: lbvserver-alarm
      properties:
      target: $outputs.lbvserver
      email-profile: $parameters.emailprofile
      sms-profile: "NetScalerSMS"

    rules:
     -
      metric: "total_requests"
      operator: "greaterthan"
      value: 25
      period-unit: $parameters.period
     -
       metric: "total_bytes"
       operator: "lessthan"
       value: 60
       period-unit: "day"
<!--NeedCopy-->

The attributes in the analytics section are used to instruct NetScaler Console analytics feature to collect appflow records on a virtual server component identified by the target property. You can also optionally specify a filter property that accepts a NetScaler policy expression to filter requests for which appflow records are collected on the virtual server.

When a config pack is created from this StyleBook, the NetScaler Console analytics feature is configured to collect appflow records on the virtual servers that were specified when these are created in the process of creating a config pack.

The attributes in the alarms section are used to set thresholds to generate alarms and send notifications on the virtual server identified by the target property. In the above example, the email-profile and sms-profile properties are used to specify where the notifications should be sent. The rules section defines the thresholds. For example, if the total requests handled by the virtual server are greater than 25 and for a period defined by the user, an alarm is set and notification is sent. The “period-unit” specifies how frequently an alarm is triggered. It can take the value of the day, hour, or weekly.

You can use the following operators when comparing the metric value to the threshold value:

  • “greaterthan” for “>”
  • “lessthan” for “<”
  • “greaterthanequal” for “>=”
  • “lessthanequal” for “<=”

Note that StyleBooks use API names for the metrics and not the names displayed on the NetScaler Console analytics GUI.

To learn how to view and analyze data collected on virtual servers that were created as part of a config pack, see the NetScaler Console analytics documentation.

Enable analytics and configure alarms on a virtual server defined in a StyleBook

In this article