- Release notes
- All how to articles
- System requirements
- Get started
- NetScaler MAS with Citrix XenServer
- NetScaler MAS with Microsoft Hyper-V
- NetScaler MAS with VMware ESXi
- NetScaler MAS with Linux KVM server
- Configure high availability deployment
- Configure disaster recovery for high availability
- Configure on-prem agents for multisite deployment
- Migrate from NetScaler Insight Center to NetScaler MAS
- Migrate Command Center configurations to NetScaler MAS
- Integrate NetScaler MAS with Citrix XenDesktop Director
- Attach an additional disk to NetScaler MAS
- Access control
- StyleBook groups
- Use default StyleBooks
- Business application StyleBooks
Create and use custom StyleBooks
- StyleBook to create a load balancing virtual server
- StyleBook to create a basic load balancing configuration
- Create a composite StyleBook
- Use GUI attributes in a custom StyleBook
- Use custom StyleBooks
- Create a StyleBook to upload files to NetScaler MAS
- Create a StyleBook to upload SSL certificate and certificate key files to NetScaler MAS
- Enable analytics and configure alarms on a virtual server defined in a StyleBook
- Create a Stylebook to perform non-CRUD operations
- Use API to create configurations from StyleBooks
- Import StyleBooks
- Parameters-default-sources construct
- Helper components
- Optional properties
- Properties-default-sources construct
- Nested components
- Condition construct
- Repeat construct
- Repeat-condition construct
- Nested repeats
- Parameter reference
- Parent reference
- Components reference
- Substitutions reference
- Variable reference
- In-place interpolations
- Built-in functions
- Dependency detection
- Monitor globally distributed sites
- Manage admin partitions of NetScaler instances
- Back up and restore NetScaler instances
- Force a failover to the secondary NetScaler instance
- Force a secondary NetScaler instance to stay secondary
- Create instance groups
- Rediscover multiple NetScaler VPX instances
- Poll NetScaler instances and entities
- Unmanage an instance
- Trace the route to an instance
- Use events dashboard
- Set event age for events
- Schedule an event filter
- Set repeated email notifications for events
- Suppress events
- Create event rules
- Modify the reported severity of events that occur on NetScaler instances
- View events summary
- Display event severities and SNMP trap details
- Export syslog messages
- Suppress syslog messages
- Configure prune settings for instance events
- Use the SSL dashboard
- Set up notifications for SSL certificate expiry
- Update an installed certificate
- Install SSL certificates on a NetScaler instance
- Create a Certificate Signing Request (CSR)
- Link and unlink SSL certificates
- Configure an enterprise policy
- Poll SSL certificates from NetScaler instances
- Create a configuration job
- Use record-and-play to create configuration jobs
- Use configuration jobs to replicate configuration from one instance to multiple instances
- Use variables in configuration jobs
- Create configuration jobs from corrective commands
- Replicate running and saved configuration from one NetScaler instance to another
- Reuse executed configuration jobs
- Schedule jobs created by using built in templates
- Use maintenance jobs to upgrade NetScaler SDX instances
- Create configuration jobs for NetScaler SD-WAN WO instances
- Use the master configuration template
- Use jobs to upgrade NetScaler instances
- Use configuration templates to create audit templates
- Use SCP (put) command in configuration jobs
- Reschedule jobs configured by using built in templates
- Reuse configuration audit templates in configuration jobs
- Import and export configuration templates
- Maintenance jobs
- Configuration audit
- Network functions
- Network reporting
- Instance management
- License requirements
- Logstream overview
- Web Insight
- HDX Insight
- Gateway Insight
- Security Insight
- SSL Insight
- TCP Insight
- WAN Insight
- View network efficiency
- Compare the data volume used by optimized and unoptimized ABR videos
- View the type of videos streamed and data volume consumed from your network
- Compare optimized and unoptimized play time of ABR videos
- Compare bandwidth consumption of optimized and unoptimized ABR videos
- Compare optimized and unoptimized number of plays of ABR videos
- View peak data rate for a specific time frame
- Secure Web Gateway Analytics
OpenStack - integrating NetScaler instances
- Service package isolation policies
- Manual provisioning of NetScaler VPX instance on OpenStack
- Configure layer 7 content switching
- Configure LBaaS V1 using Horizon
- Configure LBaaS V2 using command line
- Shared VLAN support for admin partitions
- Pre-configuration tasks in NetScaler MAS and OpenStack
- Trial licensing workflow
- Integrate with OpenStack Heat services
- Flexible policy-based device allotment
- NSX Manager - manual provisioning of NetScaler instances
- NSX Manager - auto provisioning of NetScaler instances
- NetScaler automation using NetScaler MAS in Cisco ACI hybrid mode
- NetScaler device package in Cisco ACI's cloud orchestrator mode
- OpenStack - integrating NetScaler instances
NetScaler pooled capacity
- Configure NetScaler pooled capacity
- Upgrade a perpetual license in NetScaler VPX to NetScaler pooled capacity
- Upgrading a Perpetual License in NetScaler MPX to NetScaler Pooled Capacity
- Upgrade a perpetual license in NetScaler SDX to NetScaler pooled capacity
- NetScaler pooled capacity on NetScaler instances in cluster mode
- Health monitoring
- Expected behaviors when issues arise
- Configure expiry checks for pooled capacity licenses
- NetScaler VPX check-in and check-out licensing
- NetScaler virtual CPU licensing
- NetScaler pooled capacity
- Manage NetScaler SD-WAN instances
Manage HAProxy instances
- Add HAProxy instances to NetScaler MAS
- HAProxy app dashboard
- Third-party licensing
- Role-based access control for HAProxy instances
- Monitor HAProxy instances
- View the details of frontends configured on HAProxy instances
- View the details of backends configured on HAProxy instances
- View the details of servers configured on HAProxy instances
- View the HAProxy Instances with the highest number of frontends or servers
- Restart an HAProxy instance
- Back up and restore an HAProxy instance
- Edit the HAProxy configuration file
Manage system settings
- Configure system backup settings
- Configure a NTP Server
- Upgrade NetScaler MAS
- Configure syslog purging interval
- Configure system prune settings
- Enable shell access for non-default users
- Recover inaccessible NetScaler MAS servers
- Assign a host name to a NetScaler MAS server
- Back up and restore your NetScaler MAS server in a single-server deployment
- View auditing information
- Configure SSL settings
- Monitor CPU, memory, and disk usage
- Configure system notification settings
- Generate a tech support file
- Diagnose and troubleshoot NetScaler instances
- Back Up and restore a NetScaler MAS configuration in an HA pair
- Configure a cipher group
- Create SNMP traps, managers, and users
- Configure and view system alarms
- NetScaler MAS as an API proxy server
StyleBook to create a load balancing virtual server
In this example, you design a basic StyleBook that creates a load balancing virtual server of HTTP protocol type and listening on port 80. The virtual server name, IP address, and load balancing method parameters accept user-defined values, that is, they are the parameters of the StyleBook.
The first six lines of a StyleBook comprise the header section. In this example, the header section is written as follows:
name: lb-vserver description: This StyleBook defines a load balancing virtual server configuration. display-name: Load Balancing Virtual Server (HTTP) namespace: com.example.stylebooks schema-version: "1.0" version: "0.1"
The header section includes the following details:
- name: A name for this StyleBook.
- description: A description defining what this StyleBook does. This description appears on NetScaler MAS.
- display-name: A descriptive name for the StyleBook that appears on NetScaler MAS.
- namespace: A namespace forms part of a unique identifier for a StyleBook to avoid name collisions.
- schema-version: Always takes the value “1.0” in this release.
- version: The version number of the StyleBook. You can change the version number when you update the StyleBook.
The combination of name, namespace, and version uniquely identifies a StyleBook in the system. You cannot have two StyleBooks with the same combination of name, namespace, and version in NetScaler MAS. However, you can have two StyleBooks with the same name and version but different namespaces, or with the same namespace and version but different names.
Consider that you have updated your StyleBook and you have an updated version number. Now if you are referring to (that is, if you are importing) this StyleBook in other StyleBooks, ensure to update the version number in other StyleBooks too, so that they use the correct version of the imported StyleBook.
The section after header is called “import-stylebooks.” In this section, you must declare the namespace and version number of any other StyleBook that you want to refer to in your current StyleBook. This enables you to import and reuse other StyleBooks instead of rebuilding the same configuration in your own StyleBook.
In this example, the import-stylebooks section is written as follows:
import-stylebooks: - namespace: netscaler.nitro.config prefix: ns version: "10.5"
Every StyleBook must refer to the netscaler.nitro.config namespace if it uses any of the NITRO configuration objects directly. This namespace contains all the NetScaler NITRO types, such as lbvserver.As software versions 10.5 and later are supported, you can use your StyleBook to create and run configurations on any NetScaler instance running release 10.5 and later.
The prefix used in the import-stylebooks section is a shorthand to refer to the combination of namespace and version. In this case, ns refers to netscaler.nitro.config of version 10.5. In the later sections of your StyleBook, instead of using the namespace and version to refer to the imported StyleBook, you can use the prefix string chosen, for example, ns, in the example above.
The version used in the StyleBooks is the NetScaler NITRO version. A StyleBook that is based on Nitro version X can be used to configure any NetScaler that is version X or higher.
To ensure that your StyleBooks can be used to configure any NetScaler instance of version 10.5 or later, Citrix recommends that for maximum compatibility you should import the Nitro 10.5 namespace in your StyleBooks that directly use Nitro built-in StyleBooks (namespace: netscaler.nitro.config, version: 10.5).
It is important that a StyleBook that imports other StyleBooks need to be based on a Nitro version that is at the same or higher version than the StyleBooks it imports. For example, a StyleBook that is based on Nitro version 10.5 cannot depend on or use or import a StyleBook that is based on 11.1. But a StyleBook based on version 11.1 can import a StyleBook based on any version less than 11.1.
It is also possible that a StyleBook that doesn’t import the Nitro namespace at all. That means a StyleBook need not directly define Nitro components but can import (depend on) StyleBooks that defines Nitro components. The StyleBook that imports other StyleBooks always acquires the highest Nitro version in the hierarchy of its dependencies and could therefore be used to configure NetScalers that are of that version or higher.
The parameters section lets you declare all the parameters that you need in your StyleBook. You, as the StyleBook developer, have to decide what is the input that you want the users of your StyleBook to specify. In this example, you have built your StyleBook in a way that requires its users to provide the name of the virtual server, its IP address, and the load balancing method.
The parameters section would look as follows:
parameters: - name: name type: string label: Application Name description: Name of the application configuration. required: true - name: ip type: ipaddress label: Application Virtual IP (VIP) description: Application VIP that the clients access. required: true - name: lb-alg type: string label: LoadBalancing Algorithm description: Choose the load balancing algorithm (method) used for load balancing client request between the application servers. allowed-values: - ROUNDROBIN - LEASTCONNECTION default: ROUNDROBIN
If you do not provide the label of a parameter, then NetScaler MAS uses the name attribute when displaying this parameter. You must always define a label for your parameters so that you can control how they show up in NetScaler MAS.
When using the APIs however, the parameter is designated by its name.
In this section, you have declared three parameters indicated by their name attribute values - name for virtual server name, ip for IP address of the virtual server, and lb-alg for the load balancing method.
- type refers to the type of value these parameters can take. For example, name and lb-alg can take a string value and the ip value has to be of type ip address. Parameters in a StyleBook can be of any of the following built-in types:
- string: An array of characters. If a length is not specified, the string value can take any number of characters. However, you can limit the length of a string type by using the attributes min-length and max-length.
- number: An integer number. You can specify the minimum and maximum number that this type can take by using the attributes min-value and max-value.
- boolean: Can be either true or false. Also, note that all the literals are considered by YAML as booleans (for example, Yes or No).
- ipaddress: A string that represents a valid IPv4 or IPv6 address.
- tcp-port: A number between 0 and 65535 that represents a TCP or UDP port.
- password: An opaque/secret string value. When NetScaler MAS displays a value for this parameter, it is shown as asterisks (*****).
- certfile: A certificate file.
- keyfile: A certificate private key file.
- file: A parameter of this type requires the user to upload a file, for example, a certificate or key file.
- object: Consists of multiple elements and each of these elements is a parameter. This type can be used to group multiple related parameters under one parent parameter.
- required: States whether a parameter is mandatory or optional. If it is set to true, the parameter is mandatory and the user has to provide a value for this parameter when creating configurations using this StyleBook. By default, all parameters are optional. In this example, name and ip are mandatory parameters while lb-alg is an optional parameter, the default value of which is “ROUNDROBIN.”
Use the default attribute to assign a default value to an optional parameter. While creating a configuration, if a user does not specify a value, the default value is used. For example, for the lb-alg parameter, the default value is ROUNDROBIN.
Use the allowed-values attribute to define specific values that a user can choose from when creating a configuration. In this example, you have specified two values for the lb-alg parameter - ROUNDROBIN and LEASTCONNECTION.
When you import your StyleBook and use it, NetScaler MAS displays a form with these three parameters. The fields displayed for name and ip allow string and ipaddress type of value to be entered, and the lb-alg field is displayed as a drop-down list with ROUNDROBIN selected as the default value.
In addition to built-in types, a parameter can have another StyleBook as its type. This is a way of reusing parameters defined in other StyleBooks.
The last section in this StyleBook is called the components section and is considered as the most important section in the StyleBook. In this section, you define the configuration objects that have to be created by the SyleBook.
For this example, you have to write the components section as follows:
components: - name: lbvserver-comp type: ns::lbvserver properties: name: $parameters.name servicetype: HTTP ipv46: $parameters.ip port: 80 lbmethod: $parameters.lb-alg
This example contains only one component. The main attributes of a component are name, type, and properties. The type of a component determines what properties this component provides. Components are of two types:
- Built-in type: This type is provided by the system and you do not have to define it, for example, the NITRO entity types “lbvserver” or “servicegroup.” In this example, you are using a built-in component type.
- Composite type: This type is the StyleBook that you created and imported into NetScaler MAS, or the default StyleBook that is shipped with NetScaler MAS. You can learn more about composite StyleBooks in Create a Composite StyleBook.
In this example, you have defined a component called lbvserver-comp. This component is of type ns::lbvserver (a built-in Nitro type), where “ns” is the prefix that refers to the namespace netscaler.nitro.config and version 10.5 that you had specified in the import-stylebooks section, and “lbvserver” is a Nitro resource in this namespace.
The properties defined here are the attributes of the “lbvserver” resource. To learn more about all the available NetScaler Nitro resources and their attributes, see the NetScaler NITRO REST API documentation.
The properties in this section include the mandatory attributes of the “lbvserver” resource and allows you to specify values for these attributes. In this example, you are specifying static values for servicetype and port while the name, ipv46, and lbmethod properties get their values from the input parameters. In the rest of the StyleBook, you can refer to the parameter names defined in the parameters section by using $parameters.<parameter-name> expression, for example, $parameters.ip.
By convention, the prefix “ns” is always used to designate a NetScaler Nitro namespace in the “import-stylebooks” section. Though it is not mandatory, Citrix recommends to use the same convention in your own StyleBooks for consistency.
Now that you have defined all the required sections of this StyleBook, bring them all together to build your first StyleBook. Copy and paste the StyleBook content to a text editor, and then save the file as lb-vserver.yaml. Run the contents of your StyleBook through the online tool http://www.yamllint.com/ to validate the YAML syntax.
The full content of the file lb-vserver.yaml is reproduced below:
name: lb-vserver namespace: com.example.stylebook version: "1.0" display-name: Load Balancing Virtual Server (HTTP) description: "This stylebook defines a very simple load balancing HTTP virtual server configuration" schema-version: "1.0" import-stylebooks: - namespace: netscaler.nitro.config version: "10.5" prefix: ns - namespace: com.citrix.adc.stylebooks version: "1.0" prefix: stlb parameters: - name: name label: "Application Name" description: "Give a name to the application configuration." type: string required: true - name: vip-ipaddress label: "Load Balancer IP Address" description: "The Application VIP that clients access" type: ipaddress required: true - name: lb-alg label: LB Algorithm description: Load Balancing Algorithm type: string default: ROUNDROBIN allowed-values: - ROUNDROBIN - LEAST-CONNECTION components: - name: lbvserver-comp description: This StyleBook component (a Builtin Nitro StyleBook) builds a NetScaler lbvserver configuration object. type: ns::lbvserver properties: name: $parameters.name ipv46: $parameters.vip-ipaddress lbmethod: $parameters.lb-alg servicetype: HTTP port: 80
To start using your StyleBook to create configurations, you have to import it to NetScaler MAS and then use it. For more information, see How to Use User-Defined StyleBooks.
You can also import this StyleBook into other StyleBooks (using the import-stylebooks construct.) Or, you can modify this StyleBook to include more parameters and components as described in the next section.