NS Admin Guide
NS Admin Guide
CITRIX SYSTEMS, INC., 2012. ALL RIGHTS RESERVED. NO PART OF THIS DOCUMENT MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS OR USED TO MAKE DERIVATIVE WORK (SUCH AS TRANSLATION, TRANSFORMATION, OR ADAPTATION) WITHOUT THE EXPRESS WRITTEN PERMISSION OF CITRIX SYSTEMS, INC. ALTHOUGH THE MATERIAL PRESENTED IN THIS DOCUMENT IS BELIEVED TO BE ACCURATE, IT IS PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE ALL RESPONSIBILITY FOR THE USE OR APPLICATION OF THE PRODUCT(S) DESCRIBED IN THIS MANUAL. CITRIX SYSTEMS, INC. OR ITS SUPPLIERS DO NOT ASSUME ANY LIABILITY THAT MAY OCCUR DUE TO THE USE OR APPLICATION OF THE PRODUCT(S) DESCRIBED IN THIS DOCUMENT. INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE. COMPANIES, NAMES, AND DATA USED IN EXAMPLES ARE FICTITIOUS UNLESS OTHERWISE NOTED. The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio-frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense. Modifying the equipment without Citrix' written authorization may result in the equipment no longer complying with FCC requirements for Class A digital devices. In that event, your right to use the equipment may be limited by FCC regulations, and you may be required to correct any interference to radio or television communications at your own expense. You can determine whether your equipment is causing interference by turning it off. If the interference stops, it was probably caused by the NetScaler appliance. If the NetScaler equipment causes interference, try to correct the interference by using one or more of the following measures: Move the NetScaler equipment to one side or the other of your equipment. Move the NetScaler equipment farther away from your equipment. Plug the NetScaler equipment into an outlet on a different circuit from your equipment. (Make sure the NetScaler equipment and your equipment are on circuits controlled by different circuit breakers or fuses.) Modifications to this product not authorized by Citrix Systems, Inc., could void the FCC approval and negate your authority to operate the product. BroadCom is a registered trademark of BroadCom Corporation. Fast Ramp, NetScaler, and NetScaler Request Switch are trademarks of Citrix Systems, Inc. Linux is a registered trademark of Linus Torvalds. Internet Explorer, Microsoft, PowerPoint, Windows and Windows product names such as Windows NT are trademarks or registered trademarks of the Microsoft Corporation. NetScape is a registered trademark of Netscape Communications Corporation. Red Hat is a trademark of Red Hat, Inc. Sun and Sun Microsystems are registered trademarks of Sun Microsystems, Inc. Other brand and product names may be registered trademarks or trademarks of their respective holders. Software covered by the following third party copyrights may be included with this product and will also be subject to the software license agreement: Copyright 1998 Carnegie Mellon University. All rights reserved. Copyright David L. Mills 1993, 1994. Copyright 1992, 1993, 1994, 1997 Henry Spencer. Copyright Jean-loup Gailly and Mark Adler. Copyright 1999, 2000 by Jef Poskanzer. All rights reserved. Copyright Markus Friedl, Theo de Raadt, Niels Provos, Dug Song, Aaron Campbell, Damien Miller, Kevin Steves. All rights reserved. Copyright 1982, 1985, 1986, 1988-1991, 1993 Regents of the University of California. All rights reserved. Copyright 1995 Tatu Ylonen, Espoo, Finland. All rights reserved. Copyright UNIX System Laboratories, Inc. Copyright 2001 Mark R V Murray. Copyright 1995-1998 Eric Young. Copyright 1995,1996,1997,1998. Lars Fenneberg. Copyright 1992. Livingston Enterprises, Inc. Copyright 1992, 1993, 1994, 1995. The Regents of the University of Michigan and Merit Network, Inc. Copyright 1991-2, RSA Data Security, Inc. Created 1991. Copyright 1998 Juniper Networks, Inc. All rights reserved. Copyright 2001, 2002 Networks Associates Technology, Inc. All rights reserved. Copyright (c) 2002 Networks Associates Technology, Inc. Copyright 1999-2001 The Open LDAP Foundation. All Rights Reserved. Copyright 1999 Andrzej Bialecki. All rights reserved. Copyright 2000 The Apache Software Foundation. All rights reserved. Copyright (C) 2001-2003 Robert A. van Engelen, Genivia inc. All Rights Reserved. Copyright (c) 1997-2004 University of Cambridge. All rights reserved. Copyright (c) 1995. David Greenman. Copyright (c) 2001 Jonathan Lemon. All rights reserved. Copyright (c) 1997, 1998, 1999. Bill Paul. All rights reserved. Copyright (c) 1994-1997 Matt Thomas.
All rights reserved. Copyright 2000 Jason L. Wright. Copyright 2000 Theo de Raadt. Copyright 2001 Patrik Lindergren. All rights reserved. Last Updated: March 2012 Document code: May 21 2012 05:40:33
Contents
Preface..................................................................................................17
Formatting Conventions for NetScaler Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 Documentation Available on the NetScaler Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Getting Service and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 NetScaler Documentation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Contents
Parameters for binding a command policy to a user. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 To bind command policies to a user by using the configuration utility. . . . . . . . . . . .32 To bind command policies to a group by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 To unbind command policies from a group by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 Parameters for binding a command policy to a group . . . . . . . . . . . . . . . . . . . . . . . . . . .33 To bind command policies to a group by using the configuration utility. . . . . . . . . .34 Resetting the Default Administrator (nsroot) Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 To reset the nsroot password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 Example of a User Scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 Configuration steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Configuring External User Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Configuring LDAP Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 To configure LDAP authentication by using the configuration utility. . . . . . . . . . . . . .40 Determining attributes in the LDAP directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 Configuring RADIUS Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 To configure RADIUS authentication by using the configuration utility. . . . . . . . . . .42 Choosing RADIUS authentication protocols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 Configuring IP address extraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 Configuring TACACS+ Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 To configure TACACS+ authentication by using the configuration utility. . . . . . . . .44 Configuring NT4 Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 To configure NT4 authentication by using the configuration utility. . . . . . . . . . . . . . .45 Binding the Authentication Policies to the System Global Entity. . . . . . . . . . . . . . . . . . . . . .45 To bind an authentication policy globally by using the configuration utility. . . . . . .45 To unbind a global authentication policy by using the configuration utility. . . . . . .45
SNMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
Importing MIB Files to the SNMP Manager and Trap Listener. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 To import the MIB files to the SNMP manager and trap listener. . . . . . . . . . . . . . . . . . . . . . .48 Configuring the NetScaler to Generate SNMPv1 and SNMPv2 Traps. . . . . . . . . . . . . . . . . . . . .48 Enabling or Disabling an SNMP Alarm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 To enable or disable an SNMP alarm by using the command line. . . . . . . . . . . . . . .49 To enable or disable an SNMP alarm by using the configuration utility. . . . . . . . . .49 Configuring Alarms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 To configure an SNMP alarm by using the command line. . . . . . . . . . . . . . . . . . . . . . . .50 Parameters for configuring SNMP alarms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 To configure SNMP alarms by using the configuration utility. . . . . . . . . . . . . . . . . . . . .51
vi
Configuring Traps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 To add an SNMP trap by using the NetScaler command line. . . . . . . . . . . . . . . . . . . .51 Parameters for configuring SNMP traps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 To configure SNMP Traps by using the configuration utility . . . . . . . . . . . . . . . . . . . . .52 Enabling Unconditional SNMP Trap Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 To enable or disable unconditional SNMP trap logging by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 Parameters for unconditional SNMP trap logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 To enable or disable unconditional SNMP trap logging by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 Configuring the NetScaler for SNMP v1 and v2 Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 Specifying an SNMP Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 To add an SNMP manager by using the NetScaler command line. . . . . . . . . . . . . . .55 To add an SNMP manager by specifying its IP address, using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 To add an SNMP manager by specifying its host name, using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Parameters for configuring an SNMP manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 To add an SNMP manager by using the configuration utility . . . . . . . . . . . . . . . . . . . .57 Specifying an SNMP Community. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 To specify an SNMP community by using the NetScaler command line . . . . . . . .58 Parameters for configuring an SNMP community string . . . . . . . . . . . . . . . . . . . . . . . . .58 To configure an SNMP community string by using the configuration utility . . . . .58 To remove an SNMP community string by using the configuration utility. . . . . . . .59 Configuring SNMP Alarms for Rate Limiting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Configuring an SNMP Alarm for Throughput or PPS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 To configure an SNMP alarm for the throughput rate by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 To modify or remove the threshold values by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 To modify or remove the threshold values by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 Parameters for configuring an SNMP alarm for throughput or PPS . . . . . . . . . . . . .61 To configure an SNMP alarm for throughput or PPS by using the configuration utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Configuring SNMP Alarm for Dropped Packets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 To configure an SNMP alarm for packets dropped because of excessive throughput, by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
vii
Contents
To configure an SNMP alarm for packets dropped because of excessive PPS, by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Parameters for configuring an SNMP alarm for dropped packets. . . . . . . . . . . . . . . .63 To configure an SNMP alarm for dropped packets by using the configuration utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Configuring the NetScaler for SNMPv3 Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Setting the Engine ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 To set the engine ID by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . .65 Parameters for setting the engine ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 To set the engine ID by using configuration utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Configuring a View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 To add an SNMP view by using the NetScaler command line. . . . . . . . . . . . . . . . . . . .65 Parameters for configuring an SNMP view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 To configure an SNMP view by using the configuration utility . . . . . . . . . . . . . . . . . . .66 Configuring a Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 To add an SNMP group by using the NetScaler command line. . . . . . . . . . . . . . . . . .66 Parameters for configuring an SNMP group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 To configure an SNMP group by using the configuration utility . . . . . . . . . . . . . . . . . .67 Configuring a User. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 To configure a user by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . .67 Parameters for configuring an SNMP user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 To configure an SNMP user by using the configuration utility . . . . . . . . . . . . . . . . . . .68
viii
To globally bind the audit policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Configuring Policy-Based Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Pre Requisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Configuring an Audit Message Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Binding Audit Message Action to a Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 Installing and Configuring the NSLOG Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 Installing NSLOG Server on the Linux Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 To install the NSLOG server package on a Linux operating system. . . . . . . . . . . . .82 To uninstall the NSLOG server package on a Linux operating system. . . . . . . . . .83 Installing NSLOG Server on the FreeBSD Operating System. . . . . . . . . . . . . . . . . . . . . . . . .83 To download NSLOG package from www.Citrix.com. . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 To install the NSLOG server package on a FreeBSD operating system. . . . . . . . .84 To uninstall the NSLOG server package on a FreeBSD operating system. . . . . .84 Installing NSLOG Server Files on the Windows Operating System. . . . . . . . . . . . . . . . . . .84 To download NSLOG package from www.Citrix.com. . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 To install NSLOG server on a Windows operating system. . . . . . . . . . . . . . . . . . . . . . .85 To uninstall the NSLOG server on a Windows operating system. . . . . . . . . . . . . . . .86 NSLOG Server Command Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86 Adding the NetScaler Appliance IP Addresses on the NSLOG Server. . . . . . . . . . . . . . . .87 To add the IP addresses of the NetScaler appliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 Verifying the NSLOG Server Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Running the NSLOG Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 To start audit server logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 To stop audit server logging that starts as a background process in FreeBSD or Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 To stop audit server logging that starts as a service in Windows. . . . . . . . . . . . . . . . . . . . . .88 Customizing Logging on the NSLOG Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 Creating Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 To create a filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 Specifying Log Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 Default Settings for the Log Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 Sample Configuration File (audit.conf). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Contents
Modifying the Default Buffer Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 To modify the buffer size by using the NetScaler command line . . . . . . . . . . . . . . . . 95 Parameter for modifying the buffer size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 To modify the buffer size by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . .96 Installing and Configuring the Client System for Web Server Logging. . . . . . . . . . . . . . . . . . . . . 96 Installing NSWL Client on a Solaris Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 To install the NSWL client package on a Solaris operating system. . . . . . . . . . . . . . 97 To uninstall the NSWL client package on a Solaris operating system. . . . . . . . . . . 98 Installing NSWL Client on a Linux Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 To install the NSWL client package on a Linux operating system. . . . . . . . . . . . . . . .98 To uninstall the NSWL client package on a Linux operating system . . . . . . . . . . . . 99 To get more information about the NSweblog RPM file . . . . . . . . . . . . . . . . . . . . . . . . . .99 To view the installed Web server logging files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 Installing NSWL Client on a FreeBSD Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 To install the NSWL client package on a FreeBSD operating system. . . . . . . . . . . .99 To uninstall the NSWL client package on a FreeBSD operating system. . . . . . .100 Installing NSWL Client on a Mac OS Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 To install the NSWL client package on a Mac OS operating system. . . . . . . . . . .100 To uninstall the NSWL client package on a Mac OS operating system. . . . . . . . 1 . 01 Installing NSWL Client on a Windows Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . .101 To download NSWL client package from www.Citrix.com. . . . . . . . . . . . . . . . . . . . . . .101 To install the NSWL client on a Windows system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101 To uninstall the NSWL client on a Windows system. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . 02 Installing NSWL Client on an AIX Operating System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102 To install the NSWL client package on an AIX operating system. . . . . . . . . . . . . . .102 To uninstall the NSWL client package on an AIX operating system. . . . . . . . . . . .102 To get more information about the NSweblog RPM file. . . . . . . . . . . . . . . . . . . . . . . . .103 To view the installed Web server logging files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 NSWL Client Command Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Adding the IP Addresses of the NetScaler Appliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104 To add the NSIP address of the NetScaler appliance. . . . . . . . . . . . . . . . . . . . . . . . . . .104 Verifying the NSWL Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 To verify the configuration in the NSWL configuration file. . . . . . . . . . . . . . . . . . . . . . .105 Running the NSWL Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 To start Web server logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 To stop Web server logging started as a background process on the Solaris or Linux operating systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 To stop Web server logging started as a service on the Windows operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 x
Customizing Logging on the NSWL Client System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 Creating Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 To create a filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 To create a filter for a virtual server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 Specifying Log Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 Understanding the NCSA and W3C Log Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 NCSA Common Log Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 W3C Extended Log Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 Entries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Identifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Creating a Custom Log Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 Creating a Custom Log Format by Using the NSWL Library. . . . . . . . . . . . . . . . . . . .114 Creating a Custom Log Format Manually. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115 Creating Apache Log Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116 Sample Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116 Arguments for Defining a Custom Log Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118 Time Format Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
Contents
To configure window scaling by using the NetScaler command line. . . . . . . . . . . . . . . . .131 Parameters for configuring window scaling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 To configure window scaling by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . 132 Configuring Selective Acknowledgment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 To enable Selective Acknowledgment (SACK) by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 To enable SACK by using the Configuration Utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Clearing the Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133 To clear a configuration by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . 133 Parameters for clearing a configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 To clear a configuration by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 Viewing the HTTP Band Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 To view HTTP request and response size statistics by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 To view HTTP request and response size statistics by using the configuration utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135 To modify the band range by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . 135 Parameters for modifying the band range for HTTP request or response size statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135 To modify the band range by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . 136 Configuring HTTP Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136 To add an HTTP profile by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . 136 Parameters for adding an HTTP profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 To add an HTTP profile by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Configuring TCP Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 To add a TCP profile by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . 139 Parameters for creating a TCP profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 To add a TCP profile by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Specifying a TCP Buffer Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 To set the TCP buffer size in an entity-level TCP profile by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 To set the TCP buffer size in the global TCP profile by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Parameters for setting the TCP buffer size in a TCP profile. . . . . . . . . . . . . . . . . . . . . . . . . .144 To set the TCP buffer size in a TCP profile by using the NetScaler configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Optimizing the TCP Maximum Segment Size for a Virtual Server Configuration. . . . . . . . . 144 xii
Specifying the MSS Value in a TCP Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 To specify the MSS value in a TCP profile by using the NetScaler commandline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Parameters for specifying the MSS value in a TCP profile. . . . . . . . . . . . . . . . . . . . . .145 To specify the MSS value in a TCP profile by using the NetScaler configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Configuring the NetScaler to Learn the MSS Value from Bound Services. . . . . . . . . . .146 To configure the NetScaler to learn the MSS for a virtual server by using the NetScaler command-line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Parameters for configuring the NetScaler to learn the MSS for a virtual server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 To configure the NetScaler to learn the MSS for a virtual server by using the NetScaler configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
Contents
AppFlow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
How AppFlow Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168 Flow Records. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169 Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169 Configuring the AppFlow Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 Enabling or Disabling the AppFlow Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171 To enable or disable the AppFlow feature by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171 To enable the AppFlow feature by using the configuration utility. . . . . . . . . . . . . . .171 Specifying a Collector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 To specify a collector by using the NetScaler command line. . . . . . . . . . . . . . . . . . . .171 To remove a collector by using the NetScaler command line . . . . . . . . . . . . . . . . . .172 Parameters for specifying a collector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 To specify a collector by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . .172 Configuring an AppFlow Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 To configure an AppFlow action by using the NetScaler command line. . . . . . . .172 To modify or remove an AppFlow action by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 Parameters for configuring an AppFlow action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 To configure an AppFlow action by using the configuration utility. . . . . . . . . . . . . .174 Configuring an AppFlow Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174 To configure an AppFlow policy by using the NetScaler command line. . . . . . . .174 To modify or remove an AppFlow policy by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175 Parameters for configuring an AppFlow policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175 To configure an AppFlow policy by using the configuration utility. . . . . . . . . . . . . . .176 To add an expression by using the Add Expression dialog box. . . . . . . . . . . . . . . . .176 Binding an AppFlow Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 To globally bind an AppFlow policy by using the NetScaler command line. . . . .177 To bind an AppFlow policy to a specific virtual server by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178 Parameters for binding an AppFlow policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178 To globally bind an AppFlow policy by using the configuration utility. . . . . . . . . . .178 To bind an AppFlow policy to a specific virtual server by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Enabling AppFlow for Virtual Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 To enable AppFlow for a virtual server by using the NetScaler command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
xiv
To enable AppFlow for a virtual server by using the configuration utility. . . . . . .179 Enabling AppFlow for a Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 To enable AppFlow for a service by using the NetScaler command line. . . . . . . 180 To enable AppFlow for a service by using the configuration utility. . . . . . . . . . . . . .180 Setting the AppFlow Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 To set the AppFlow Parameters by using the NetScaler Command Line. . . . . . .180 To return AppFlow parameters to their default values by using the NetScaler command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181 AppFlow Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 To set the AppFlow parameters by using the configuration utility. . . . . . . . . . . . . . .182
xv
Contents
xvi
Preface
Learn about the Citrix NetScaler collection of documentation, including information about support options and ways to send us feedback. In This Preface: w Formatting Conventions for NetScaler Documentation w Documentation Available on the NetScaler Appliance w Getting Service and Support w NetScaler Documentation Feedback For information about new features and enhancements for this release, see the Citrix NetScaler 9.3 Release Notes at http://support.citrix.com/article/CTX128669.
Monospace
<angle brackets>
[ brackets ]
17
Preface
Convention
Meaning you have the option of entering a range, but it is not required: add lb vserver <name> <serviceType> <IPAddress> <port> [ -range <positiveInteger>] Do not type the brackets themselves.
| (vertical bar)
A separator between options in braces or brackets in command statements. For example, the following indicates that you choose one of the following load balancing methods: <lbMethod> = ( ROUNDROBIN | LEASTCONNECTION | LEASTRESPONSETIME | URLHASH | DOMAINHASH | DESTINATIONIPHASH | SOURCEIPHASH | SRCIPDESTIPHASH | LEASTBANDWIDTH | LEASTPACKETS | TOKEN | SRCIPSRCPORTHASH | LRTM | CALLIDHASH | CUSTOMLOAD )
(ellipsis)
You can repeat the previous item or items in command statements. For example, /route:<DeviceName>[ ,] means you can type additional <DeviceNames> separated by commas.
18
19
Preface
20
Chapter 1
21
Chapter 1
> show system user 1) User name: nsroot 2) User name: user1 3) User name: johnd Prompt String: user-%u-at%T Prompt Inherited From: User Done
23
Chapter 1
24
> show system user user1 User name: user1 Prompt String: Group-Managers-at%h Prompt Inherited From: Group Done Group name: Managers
> show system user johnd User name: johnd Prompt String: user-%u-at-%T Prompt Inherited From: User Done Group name: Managers
25
Chapter 1
Authentication and Authorization w unbind system group <groupName> -userName <userName> w show system group <groupName>
26
Citrix NetScaler Administration Guide Group Name* (Required for a new group. Cannot be changed for an existing group.) CLI Prompt CLI Idle Session Timeout (Secs) * A required parameter 4. Under Members, select users from the Available Users list and click Add to move them to the Configured Users list. 5. Click Create or OK, and then click Close. A message appears in the status bar, stating that the group has been configured successfully.
27
Chapter 1
Authentication and Authorization Table 1-1. Built-in Command Policies Policy name read-only Allows Read-only access to all show commands except show runningconfig, show ns.conf, and the show commands for the NetScaler command group. Read-only access and access to commands to enable and disable services and servers or place them in ACCESSDOWN mode. Full access, except to the set and unset SSL commands, sh ns.conf, sh runningconfig, and sh gslb runningconfig commands. Full access. Same privileges as the nsroot user.
operator
network
superuser
28
Citrix NetScaler Administration Guide Table 1-2. Examples of Regular Expressions for Command Policies Command specification "^rm\s+.*$" Matches these commands All remove actions, because all remove actions begin with the rm string, followed by a space and additional parameters and flags. All show commands, because all show actions begin with the show string, followed by a space and additional parameters and flags. The shell command alone, but not combined with any other parameters or flags. All create vserver actions, which consist of the add vserver command followed by a space and additional parameters and flags. All create lb vserver actions, which consist of the add lb vserver command followed by a space and additional parameters and flags.
"^show\s+.*$"
"^shell$"
"^add\s+vserver\s+.*$"
"^add\s+(lb\s+vserver)\s+.*"
The following table shows the command specifications for each of the built-in command policies. Table 1-3. Expressions Used in the Built-in Command Policies Policy name read-only Command specification regular expression (^man.*)|(^show\s+(?!system)(?!ns ns.conf)(?!ns runningConfig).*)|(^stat.*) (^man.*)|(^show\s+(?!system)(?!ns ns.conf)(?!ns runningConfig).*)|(^stat.*)| (^set.*-accessdown.*)|(^(enable|disable) (server|service).*) ^(?!shell)\S+\s+(?!system)(?!ns ns.conf)(?! ns runningConfig).* .*
operator
network
superuser
29
Chapter 1
30
31
Chapter 1
To unbind command policies from a user by using the NetScaler command line
At the NetScaler command prompt, type the following commands to unbind a command policy from a user and verify the configuration: w unbind system user <userName> -policyName <policyName> w sh system user <userName>
Citrix NetScaler Administration Guide 4. In the Priority column to the left, modify the default priority as needed to ensure that the policy is evaluated in the proper order. 5. Click OK. A message appears in the status bar, stating that the user has been configured successfully.
To unbind command policies from a group by using the NetScaler command line
At the NetScaler command prompt, type the following commands to unbind a command policy from a user group and verify the configuration: w unbind system group <groupName> -policyName <policyName> w sh system group <groupName>
33
Chapter 1
Citrix NetScaler Administration Guide Type '?' for a list of commands, 'help' for more detailed help. ok 3. Type boot -s and press the ENTER key to start the NetScaler in single user mode. After the NetScaler boots, it displays the following message: Enter full path name of shell or RETURN for /bin/sh: 4. Press the ENTER key to display the # prompt, and type the following commands to mount the file systems: fsck /dev/ad0s1a mount /dev/ad0s1a /flash 5. Using a text editor of your choice, edit the /flash/nsconfig/ns.conf file and remove the set system user nsroot entry. 6. Save the file and exit the text editor. 7. Type reboot and press the ENTER key to reboot the NetScaler. When the NetScaler completes rebooting, it prompts for the user name and password. 8. Log on with the nsroot user credentials. Once logged on to the NetScaler, you will be required to enter a new nsroot user password. 9. Follow the prompts to change the password. 10. Exit the config ns menu.
35
Chapter 1
Authentication and Authorization Table 1-4. Sample Values for Creating Entities Field NetScaler host name User accounts Value ns01.example.net johnd, mariar, and michaelb Note N/A John Doe, IT manager, Maria Ramirez, IT administrator and Michael Baldrock, IT administrator. All managers and all IT administrators. Allow complete read-only access, Allow modify access to load balancing, and Allow complete modify access.
The following description walks you through the process of creating a complete set of user accounts, groups, and command policies on the NetScaler appliance named ns01.example.net. The description includes procedures for binding the appropriate user accounts and groups to one another, and binding appropriate command policies to the user accounts and groups. This example illustrates how you can use prioritization to grant precise access and privileges to each user in the IT department. The example assumes that initial installation and configuration have already been performed on the NetScaler.
Configuration steps
1. Use the procedure described in Configuring User Accounts on page 22 to create user accounts johnd, mariar, and michaelb. 2. Use the procedure described in Configuring User Groups on page 24 to create user groups Managers and SysOps, and then bind the users mariar and michaelb to the SysOps group and the user johnd to the Managers group. 3. Use the procedure described in Creating Custom Command Policies on page 28 to create the following command policies: read_all with action Allow and command spec "(^show\s+(?!system)(?!ns ns.conf) (?!ns runningConfig).*)|(^stat.*)" modify_lb with action as Allow and the command spec "^set\s+lb\s+.*$" modify_all with action as Allow and the command spec "^\S+\s+(?!system).*"
36
Citrix NetScaler Administration Guide 4. Use the procedure described in Binding Command Policies to Users and Groups on page 31 to bind the read_all command policy to the SysOps group, with priority value 1. 5. Use the procedure described in Binding Command Policies to Users and Groups on page 31 to bind the modify_lb command policy to user michaelb, with priority value 5. The configuration you just created results in the following: w John Doe, the IT manager, has read-only access to the entire NetScaler configuration, but he cannot make modifications. w Maria Ramirez, the IT lead, has near-complete access to all areas of the NetScaler configuration, having to log on only to perform NetScaler-level commands. w Michael Baldrock, the IT administrator responsible for load balancing, has read-only access to the NetScaler configuration, and can modify the configuration options for load balancing. The set of command policies that applies to a specific user is a combination of command policies applied directly to the user's account and command policies applied to the group(s) of which the user is a member. Each time a user enters a command, the operating system searches the command policies for that user until it finds a policy with an ALLOW or DENY action that matches the command. When it finds a match, the operating system stops its command policy search and allows or denies access to the command. If the operating system finds no matching command policy, it denies the user access to the command, in accordance with the NetScaler appliance's default deny policy. Note: When placing a user into multiple groups, take care not to cause unintended user command restrictions or privileges. To avoid these conflicts, when organizing your users in groups, bear in mind the NetScaler command policy search procedure and policy ordering rules.
Chapter 1
Authentication and Authorization authentication policies are bound to the system, users are authenticated by the onboard system. Note: User accounts must be configured on the NetScaler appliance before users can be externally authenticated. You must first create an onboard system user for all users who will access the appliance, so that you can bind command policies to the user accounts. Regardless of the authentication source, users cannot log on if they are not granted sufficient command authorization through command policies bound to their user accounts or to a group of which they are a member.
38
Citrix NetScaler Administration Guide Table 1-5. User Attribute Fields for LDAP Servers LDAP server Microsoft Active Directory Novell eDirectory IBM Directory Server Lotus Domino Sun ONE directory (formerly iPlanet) User attribute Server sAMAccountName cn uid CN uid or cn Case sensitive? No Yes Yes Yes Yes
The following table lists examples of the base distinguished name (DN). Table 1-6. Examples of Base Distinguished Name LDAP server Microsoft Active Directory Novell eDirectory IBM Directory Server Lotus Domino Sun ONE directory (formerly iPlanet) Base DN DC=citrix, DC=local dc=citrix, dc=net cn=users OU=City, O=Citrix, C=US ou=People, dc=citrix, dc=com
The following table lists examples of the bind distinguished name (DN). Table 1-7. Examples of Bind Distinguished Name LDAP server Microsoft Active Directory Bind DN CN=Administrator, CN=Users, DC=citrix, DC=local cn=admin, dc=citrix, dc=net LDAP_dn
39
Chapter 1
Citrix NetScaler Administration Guide 8. To retrieve additional LDAP settings automatically, click Retrieve Attributes. The fields under Other Settings then populate automatically. If you do not want to do this, skip to Step 12. 9. Under Other Settings, in Server Logon Name Attribute, type the attribute under which the NetScaler should look for user logon names for the LDAP server that you are configuring. The default is samAccountName. 10. In Group Attribute, leave the default memberOf for Active Directory or change it to that of the LDAP server type you are using. This attribute enables the NetScaler to obtain the groups associated with a user during authorization. 11. In Security Type, select the security type. If you select PLAINTEXT or TLS for security, use port number 389. If you select SSL, use port number 636. 12. To allow users to change their LDAP password, select Allow Password Change. If you select PLAINTEXT as the security type, allowing users to change their passwords is not supported. 13. Click Create. 14. In the Create Authentication Policy dialog box, next to Named Expressions, select the expression, click Add Expression, click Create, and click Close. After the LDAP server settings are configured on the NetScaler, bind the policy to the system global entity. For more information about binding authentication policies globally, see Binding the Authentication Policies to the System Global Entity on page 45.
41
Chapter 1
Citrix NetScaler Administration Guide w Password Authentication Protocol w Challenge-Handshake Authentication Protocol (CHAP) w Microsoft Challenge-Handshake Authentication Protocol (MS-CHAP Version 1 and Version 2) If your deployment of the NetScaler is configured to use RADIUS authentication and your RADIUS server is configured to use Password Authentication Protocol, you can strengthen user authentication by assigning a strong shared secret to the RADIUS server. Strong RADIUS shared secrets consist of random sequences of uppercase and lowercase letters, numbers, and punctuation, and are at least 22 characters long. If possible, use a random character generation program to determine RADIUS shared secrets. To further protect RADIUS traffic, assign a different shared secret to each NetScaler appliance or virtual server. When you define clients on the RADIUS server, you can also assign a separate shared secret to each client. If you do this, you must configure separately each NetScaler policy that uses RADIUS authentication. Shared secrets are configured on the NetScaler when a RADIUS policy is created.
Chapter 1
Authentication and Authorization 5. In Group Attribute Type, type the value, and click OK twice.
Citrix NetScaler Administration Guide name and password of the person who is authorized to administer the domain. These parameters are necessary because the NetScaler joins the domain to communicate authentication data. NT4 authentication supports NTLMv1 and NTLMv2 authentication protocols only.
45
Chapter 1
Authentication and Authorization 2. On the Policies tab, click Global Bindings. 3. In the Bind/Unbind Authentication Policies dialog box, in Policy Name, select the policy, click Unbind Policy and then click OK.
46
Chapter 2
SNMP
Topics:
Importing MIB Files to the SNMP Manager and Trap Listener Configuring the NetScaler to Generate SNMPv1 and SNMPv2 Traps Configuring the NetScaler for SNMP v1 and v2 Queries Configuring SNMP Alarms for Rate Limiting Configuring the NetScaler for SNMPv3 Queries You can use Simple Network Management Protocol (SNMP) to configure the SNMP agent on the Citrix NetScaler appliance to generate asynchronous events, which are called traps. The traps are generated whenever there are abnormal conditions on the NetScaler. The traps are then sent to a remote device called a trap listener, which signals the abnormal condition on the NetScaler appliance. Or, you can query the SNMP agent for System-specific information from a remote device called an SNMP manager. The agent then searches the management information base (MIB) for the data requested and sends the data to the SNMP manager. The SNMP agent on the NetScaler can generate traps compliant with SNMPv1 and SNMPv2 only. For querying, the SNMP agent supports SNMP version 1 (SNMPv1), SNMP version 2 (SNMPv2), and SNMP version 3 (SNMPv3). The following figure illustrates a network with a NetScaler that has SNMP enabled and configured. In the figure, each SNMP network management application uses SNMP to communicate with the SNMP agent on the NetScaler. The SNMP agent searches its management information base (MIB) to collect the data requested by the SNMP Manager and provides the information to the application. Figure 2-1. NetScaler Supporting SNMP
47
Chapter 2
SNMP
To import the MIB files to the SNMP manager and trap listener
w Logon to the Downloads page of NetScaler appliance GUI. w Under SNMP Files, do one of the following: a. If your SNMP management application is other than WhatsUpGold, download the following files to your SNMP management application: w NS-MIB-smiv2.mib w NS-MIB-smiv1.mib b. If you are using the WhatsUpGold SNMP management application, download only the following files to the SNMP management application: w mib.txt w traps.txt
Citrix NetScaler Administration Guide are sent to the configured trap listeners. For example, when the LOGIN-FAILURE alarm is enabled, a trap message is generated and sent to the trap listener whenever there is a login failure on the NetScaler appliance. To configure the NetScaler to generate traps, you need to enable and configure alarms. Then, you specify trap listeners to which the NetScaler will send the generated trap messages.
49
Chapter 2
SNMP
Configuring Alarms
The NetScaler provides a set of condition entities called SNMP alarms. When the condition set for an SNMP alarm is met, the NetScaler generates SNMP traps messages that are sent to the configured trap listeners. For example, when the LOGIN-FAILURE alarm is enabled, a trap message is generated and sent to the trap listener whenever there is a login failure on the NetScaler appliance. You can assign an SNMP alarm with a severity level. When you do this, the corresponding trap messages are assigned that severity level. The following are the severity levels, defined in the NetScaler, in decreasing order of severity. w Critical w Major w Minor w Warning w Informational For example, if you set a Warning severity level for the SNMP alarm named LOGINFAILURE, the trap messages generated when there is a login failure will be assigned with the Warning severity level. You can also configure an SNMP alarm to log the corresponding trap messages generated whenever the condition on that alarm is met.
50
Configuring Traps
After configuring the alarms, you need to specify the trap listener to which the NetScaler appliance sends the trap messages. Apart from specifying parameters such as IP address and the destination port of the trap listener, you can specify the type of trap (either generic or specific) and the SNMP version. You can configure a maximum of 20 trap listeners for receiving either generic or specific traps. You can also configure the NetScaler to send SNMP trap messages with a source IP, other than the NetScaler IP address (NSIP), to a particular trap listener. You can set the source IP to either a mapped IP address (MIP) or a subnet IP address (SNIP) configured on the NetScaler appliance. You can also configure the NetScaler to send trap messages to a trap listener on the basis of a severity level. For example, if you set the severity level as Minor for a trap listener, all trap messages of the severity level equal to or greater than Minor (Minor, Major, and Critical) are sent to the trap listener. If you have defined a community string for the trap listener, you must also specify a community string for each trap that is to be sent to the listener. A trap listener for which a community string has been defined accepts only trap messages that include a community string matching the community string defined in the trap listener. Other trap messages are dropped.
51
Chapter 2
SNMP w show snmp trap Example add snmp trap specific 10.102.29.3 -version V2 destPort 80 -communityName com1 -severity Major Done > show snmp trap Type DestinationIP DestinationPort Version SourceIP Min-Severity Community -------------------------------------------------------------generic 10.102.29.9 162 V2 NetScaler IP N/A public specific 10.102.29.9 162 V2 NetScaler IP public specific 10.102.29.3 80 V2 NetScaler IP Major com1 Done
52
Citrix NetScaler Administration Guide 2. In the details pane, do one of the following: To create a new trap, click Add. To modify an existing trap, select the trap, and then click Open. 3. In the Create SNMP Trap Destination or Configure SNMP Trap dialog box, set the following parameters: Type*trapClass Versionversion Destination IP Address*trapDestination Destination PortdestPort Source IP AddresssrcIP Minimum Severityseverity Community NamecommunityName *A required parameter 4. Click Create or OK, and then click Close. A message appears in the status bar, stating that the trap has been configured successfully.
To enable or disable unconditional SNMP trap logging by using the NetScaler command line
At a NetScaler command prompt, type: w set snmp option -snmpTrapLogging ( ENABLED | DISABLED ) w show snmp option Example > set snmp option -snmpset ENABLED Done > show snmp option Snmpset: DISABLED SnmpTrapLogging: ENABLED Done >
53
Chapter 2
SNMP
To enable or disable unconditional SNMP trap logging by using the configuration utility
1. In the navigation pane, expand System, and then click SNMP. 2. In the details pane, under Settings, click Configure SNMP Options. 3. In the Configure SNMP Options dialog box, select the SNMP Trap Logging check box. 4. Click OK.
Citrix NetScaler Administration Guide the SNMP manager to its IP address. You can add up to a maximum of five host-name based SNMP managers. If you do not configure at least one SNMP manager, the NetScaler appliance accepts and responds to SNMP queries from all IP addresses on the network. If you configure one or more SNMP managers, the appliance accepts and responds only to SNMP queries from those specific IP addresses. If you remove an SNMP manager from the NetScaler configuration, that manager can no longer query the NetScaler.
To add an SNMP manager by specifying its IP address, using the NetScaler command line
At the NetScaler command prompt, type the following commands to set the parameters and verify the configuration: w add snmp manager <IPAddress> ... [-netmask <netmask>] w show snmp manager Example > add snmp manager 10.102.29.10 Done > show snmp manager 1) 10.102.29.5 255.255.255.0 Done > add snmp manager 10.102.29.15 10.102.29.30 Done > show snmp manager 1) IP Address: 10.102.29.10 Netmask: 255.255.255.255 2) IP Address: 10.102.29.15 Netmask: 255.255.255.255 3) IP Address: 10.102.29.30 55
Chapter 2
Done
To add an SNMP manager by specifying its host name, using the NetScaler command line
Important: If you specify the SNMP managers host name instead of its IP address, you must configure a DNS name server to resolve the host name to the SNMP managers IP address. For more information, see the instructions for adding a name server in the Citrix NetScaler Traffic Management Guide. For a link to the guide, see the Documentation Library. At the NetScaler command prompt, type the following commands to set the parameters and verify the configuration: w add snmp manager <IPAddress> [-domainResolveRetry <integer>] w show snmp manager Example > add nameserver 10.103.128.15 Done > show nameserver 1) 10.103.128.15 - State: UP Done > add snmp manager engwiki.eng.example.net domainResolveRetry 10 Done > show snmp manager 1) Hostname: abc.com (Unresolved IP) Resolve Retry: 7 2) Hostname: engwiki.eng.example.net (10.217.3.249) Resolve Retry: 10 Done
56
Note: The NetScaler appliance does not support host names for SNMP managers that have IPv6 addresses. netmask Subnet of management stations. Used to grant access from entire subnets to the NetScaler appliance. domainResolveRetry The duration, in seconds, for which the NetScaler appliance waits to send the next DNS query to resolve the host name of the SNMP manager if the last query failed. If last query succeeds, the NetScaler waits for the TTL time. Minimum value: 5. Maximum value: 20940. Default value: 5.
Chapter 2
SNMP
58
Citrix NetScaler Administration Guide 2. In the details pane, click Add. 3. In the Create SNMP Community dialog box, specify values for the following parameters, which correspond to parameters described in "Parameters for configuring an SNMP community string" as shown: Community String*communityName Permission*permissions *A required parameter 4. Click Create, and then click Close. A message appears in the status bar, stating that the SNMP community string has been configured successfully.
59
Chapter 2
SNMP
To configure an SNMP alarm for the throughput rate by using the NetScaler command line
At the NetScaler command prompt, type the following commands to configure the SNMP alarm and verify the configuration: w set snmp alarm PF-RL-RATE-THRESHOLD [-thresholdValue <positive_integer> [normalValue <positive_integer>]] [-state ( ENABLED | DISABLED )] [-severity <severity>] [-logging ( ENABLED | DISABLED )] w show snmp alarm PF-RL-RATE-THRESHOLD Example > set snmp alarm PF-RL-RATE-THRESHOLD thresholdValue 70 -normalValue 50 Done > show snmp alarm PF-RL-RATE-THRESHOLD Alarm Alarm Threshold Normal Threshold Time State Severity Logging ---------------------------------- ---- --------------------------1) PF-RL-RATE-THRESHOLD 70 50 N/A DISABLED ENABLED Done
To modify or remove the threshold values by using the NetScaler command line
w To modify the threshold values, type the set snmp alarm PF-RL-RATE-THRESHOLD command and the parameters to be changed, with their new values. w To remove the threshold values, type the unset snmp alarm PF-RL-RATETHRESHOLD command, followed by the thresholdValue parameter, but do not specify any value for the parameter. Note: The normal-threshold value is automatically unset when you unset the highthreshold value.
To configure an SNMP alarm for PPS by using the NetScaler command line
At the NetScaler command prompt, type the following commands to configure the SNMP alarm for PPS and verify the configuration: w set snmp alarm PF-RL-PPS-THRESHOLD [-thresholdValue <positive_integer> [normalValue <positive_integer>]] [-state ( ENABLED | DISABLED )] [-severity <severity>] [-logging ( ENABLED | DISABLED )] 60
Citrix NetScaler Administration Guide w show snmp alarm PF-RL-PPS-THRESHOLD Example > set snmp alarm PF-RL-PPS-THRESHOLD thresholdValue 70 -normalValue 50 Done > show snmp alarm PF-RL-PPS-THRESHOLD Alarm Threshold Severity ----Alarm Threshold Time State Logging Normal
To modify or remove the threshold values by using the NetScaler command line
w To modify the threshold values, type the set snmp alarm PF-RL-PPS-THRESHOLD command and the parameters to be changed, with their new values. w To remove the threshold values, type the unset snmp alarm PF-RL-PPS-THRESHOLD command, followed by the thresholdValue parameter, but do not specify any value for the parameter. Note: The normal-threshold value is automatically unset when you unset the highthreshold value.
Chapter 2
SNMP logging Log the alarm. Possible values: ENABLED, DISABLED. Default value: ENABLED.
To configure an SNMP alarm for throughput or PPS by using the configuration utility
1. In the navigation pane, expand System, expand SNMP, and then click Alarms. 2. In the details pane, do one of the following: Select PF-RL-RATE-THRESHOLD to configure the SNMP alarm for throughput rate. Select PF-RL-PPS-THRESHOLD to configure the SNMP alarm for packets per second. 3. Click Open. 4. In the Configure SNMP Alarm dialog box, specify values for the following parameters, which correspond to parameters described in Parameters for configuring an SNMP alarm for throughput or PPS as shown: Alarm ThresholdthresholdValue Alarm ThresholdthresholdValue Normal ThresholdnormalValue Severityseverity Logginglogging 5. Select the Enable check box to enable the alarm. 6. Click OK, and then click Close.
To configure an SNMP alarm for packets dropped because of excessive throughput, by using the NetScaler command line
At the NetScaler command prompt, type: set snmp alarm PF-RL-RATE-PKTS-DROPPED [-state (ENABLED | DISABLED)] [-severity <severity>] [-logging ( ENABLED | DISABLED )]
To configure an SNMP alarm for packets dropped because of excessive PPS, by using the NetScaler command line
At the NetScaler command prompt, type: set snmp alarm PF-RL-PPS-PKTS-DROPPED [-state (ENABLED | DISABLED)] [-severity <severity>] [-logging ( ENABLED | DISABLED )] 62
To configure an SNMP alarm for dropped packets by using the configuration utility
1. In the navigation pane, expand System, expand SNMP, and then click Alarms. 2. In the details pane, do one of the following: Select PF-RL-RATE-PKTS-DROPPED to configure an SNMP alarm for packets dropped because of excessive throughput. Select PF-RL-PPS-PKTS-DROPPED to configure an SNMP alarm for packets dropped because of excessive PPS. 3. Click Open. 4. In the Configure SNMP Alarm dialog box, specify values for the following parameters, which correspond to parameters described in Parameters for configuring an SNMP alarm for dropped packets as shown: Severityseverity Logginglogging 5. Select the Enable check box to enable the alarm. 6. Click OK, and then click Close.
Chapter 2
SNMP Data integrity: To protect messages from being modified during transmission through the network. Data origin verification: To authenticate the user who sent the message request. Message timeliness: To protect against message delays or replays. Data confidentiality: To protect the content of messages from being disclosed to unauthorized entities or individuals. w View-Based Access Control Model. The view-based access control model (VACM) enables you to configure access rights to a specific subtree of the MIB based on various parameters, such as security level, security model, user name, and view type. It enables you to configure agents to provide different levels of access to the MIB to different managers. The Citrix NetScaler supports the following entities that enable you to implement the security features of SNMPv3: w SNMP Engines w SNMP Views w SNMP Groups w SNMP Users These entities function together to implement the SNMPv3 security features. Views are created to allow access to subtrees of the MIB. Then, groups are created with the required security level and access to the defined views. Finally, users are created and assigned to the groups. Note: The view, group, and user configuration are synchronized and propagated to the secondary node in a high availability (HA) pair. However, the engine ID is neither propagated nor synchronized as it is unique to each NetScaler appliance. To implement message authentication and access control, you need to: w Set the Engine ID w Configure Views w Configure Groups w Configure Users
Configuring a View
SNMP views restrict user access to specific portions of the MIB. SNMP views are used to implement access control.
65
Chapter 2
SNMP
Configuring a Group
SNMP groups are logical aggregations of SNMP users. They are used to implement access control and to define the security levels. You can configure an SNMP group to set access rights for users assigned to that group, thereby restricting the users to specific views. You need to configure an SNMP group to set access rights for users assigned to that group.
Citrix NetScaler Administration Guide 1) Name: edocs_group2 SecurityLevel: authPriv ReadViewName: edocs_read_view StorageType: volatile Status: active Done
Configuring a User
SNMP users are the SNMP managers that the agents allow to access the MIBs. Each SNMP user is assigned to an SNMP group. You need to configure users at the agent and assign each user to a group.
Chapter 2
SNMP w show snmp user <name> Example > add snmp user edocs_user -group edocs_group Done > show snmp user edocs_user 1) Name: edocs_user Group: edocs_group EngineID: 123abc456abc788 StorageType: volatile Status: active Done >
Citrix NetScaler Administration Guide *A required parameter 4. Click Create or OK, and then click Close. A message appears in the status bar, stating that the SNMP user has been configured successfully.
69
Chapter 2
SNMP
70
Chapter 3
Audit Logging
Topics:
Configuring the NetScaler Appliance for Audit Logging Installing and Configuring the NSLOG Server Running the NSLOG Server Customizing Logging on the NSLOG Server Default Settings for the Log Properties Sample Configuration File (audit.conf) Auditing is a methodical examination or review of a condition or situation. The Audit Logging feature enables you to log the Citrix NetScaler states and status information collected by various modules in the kernel and in the user-level daemons. For audit logging, you have the options to configure SYSLOG, the native NSLOG protocol, or both. SYSLOG is a standard protocol for logging. It has two components the SYSLOG auditing module, which runs on the NetScaler appliance, and the SYSLOG server, which can run on the underlying FreeBSD operating system (OS) of the NetScaler appliance or on a remote system. SYSLOG uses user data protocol (UDP) for the transfer of data. Similarly, the native NSLOG protocol has two components the NSLOG auditing module, which runs on the NetScaler appliance, and the NSLOG server, which can run on the underlying FreeBSD OS of the NetScaler appliance or on a remote system. NSLOG uses transmission control protocol (TCP) for transfer of data. When you run NSLOG or a SYSLOG server, it connects to the NetScaler appliance. The NetScaler appliance then starts sending all the log information to the SYSLOG or NSLOG server, and the server can filter the log entries before storing them in a log file. An NSLOG or SYSLOG server can receive log information from more than one NetScaler appliance and a NetScaler appliance can send log information to more than one SYSLOG server or NSLOG server. The log information that a SYSLOG or NSLOG server collects from a NetScaler appliance is stored in a log file in the form of messages. These messages typically contain the following information: w The IP address of a NetScaler appliance that generated the log message w A time stamp w The message type w The predefined log levels (Critical, Error, Notice, Warning, Informational, Debug, Alert, and Emergency) w The message information 71
Chapter 3
Audit Logging To configure audit logging, you first configure the audit modules on the NetScaler that involves creating audit policies and specifying the NSLOG server or SYSLOG server information. You then install and configure the SYSLOG or the NSLOG server on the underlying FreeBSD OS of the NetScaler appliance or on a remote system. Note: Because SYSLOG is an industry standard for logging program messages and because various vendors provide support, this documentation does not include SYSLOG server configuration information. The NSLOG server has its own configuration file (auditlog.conf). You can customize logging on the NSLOG server system by making additional modifications to the configuration file (auditlog.conf).
72
Chapter 3
Done
Citrix NetScaler Administration Guide w ERROR w WARNING w NOTICE w INFORMATION w DEBUG dateFormat Format of the date stamp. Possible values: MMDDYYYY, DDMMYYYY. logFacility The Facility value (RFC 3164) assigned to the log message. Uses numerical codes 0 to 7 to indicate the type of message originating from the NetScaler (for example, NS and VPN). Possible values: LOCAL0 to LOCAL7. Default: LOCAL0. timeZone Time zone for the time stamp. Possible values: GMT and Local. Default: Local. tcp Log TCP events. Possible values: NONE, ALL. acl Log ACL events. Possible values: ENABLED, DISABLED. userDefinedAuditlog Enable user-configurable log messages. Possible values: YES, NO. appflowExport Export log messages to the AppFlow collectors. Possible values: ENABLED, DISABLED. Default: DISABLED.
Chapter 3
Audit Logging INFORMATION Log actions taken by the NetScaler. This level is useful for troubleshooting problems. DEBUG Log extensive, detailed information to help developers troubleshoot problems.
76
Citrix NetScaler Administration Guide w add audit syslogPolicy <name> <rule> <action> w show audit syslogPolicy [<name>] Example > add audit syslogpolicy syslog-pol1 ns_true auditaction1 Done > show audit syslogpolicy syslog-pol1 1) Name: syslog-pol1 Rule: ns_true Action: audit-action1 Done
77
Chapter 3
Audit Logging
78
Citrix NetScaler Administration Guide priority A numeric value that indicates when this policy is evaluated relative to others. A lower priority is evaluated before a higher one.
Pre Requisites
w User Configurable Log Messages (userDefinedAuditlog) option is enabled for when configuring the audit action server to which you want to send the logs in a defined format. For more information about enabling policy-based logging on a audit action server, see Binding the Audit Policies Globally on page 78. w The related audit policy is bound to system global. For more information about binding audit policies to system global, see Binding the Audit Policies Globally on page 78.
79
Chapter 3
Audit Logging
To modify or remove an audit message action by using the NetScaler command line
w To modify an audit message action, type the set audit messageaction command, the name of the action, and the parameters to be changed, with their new values. w To remove an audit message action, type the rm audit messageaction command and the name of the action. Example > add audit messageaction log-act1 CRITICAL '"Client:"+CLIENT.IP.SRC+" accessed "+H TTP.REQ.URL' -bypassSafetyCheck YES Done > show audit messageaction log-act1 1) Name: log-act1 LogMsgStr: "Client:"+CLIENT.IP.SRC+" accessed "+HTTP.REQ.URL Loglevel:CRITICAL Log2Newnslog:NO BypassSafetyCheck : YES Hits: 0 Undef Hits: 0 Action Reference Count: 0 Done
Chapter 3
Audit Logging Table 3-1. Supported Platforms for the NSLOG Server Operating system Windows Software requirements w Windows XP Professional w Windows Server 2003 w Windows 2000/NT Linux w Red Hat Enterprise Linux AS release 4 (Nahant) - Linux version 2.6.9-5.EL w Red Hat 3.4.3-9.EL4 - Linux version 2.6.9-5.ELsmp w Red Hat Linux 3.2.2-5 - Linux version 2.4.20-8 FreeBSD FreeBSD 4.9
The minimum hardware specifications for the platform running the NSLOG server are as follows: w Processor- Intel x86 ~501 megahertz (MHz) w RAM - 512 megabytes (MB) w Controller - SCSI
Chapter 3
Audit Logging
Citrix NetScaler Administration Guide (for example, AuditServer_9.3-51.5.zip). This package contains NSLOG installation packages for all supported platforms.
85
Chapter 3
Audit Logging
Specifies Start the audit server logging service, when you enter this command at a command prompt. You can also start audit server logging from Start > Control Panel > Services. Note: Audit server logging starts by using the configuration settings in the configuration file, for example, auditlog.conf file specified in the audit server install option.
Run the audserver command from the directory in which the audit server executable is present: w On Windows: \ns\bin w On Solaris and Linux: \usr\local\netscaler\bin The audit server configuration files are present in the following directories: w On Windows: \ns\etc w On Linux: \usr\local\netscaler\etc The audit server executable is started as ./auditserver in Linux and FreeBSD.
Chapter 3
Audit Logging You are prompted to enter the information for the following parameters: NSIP: Specifies the IP address of the NetScaler appliance, for example, 10.102.29.1. Userid: Specifies the user name, for example, nsroot. Password: Specifies the password, for example, nsroot. If you add multiple NetScaler IP addresses (NSIP), and later you do not want to log all of the NetScaler appliance event details, you can delete the NSIPs manually by removing the NSIP statement at the end of the auditlog.conf file. For a high availability (HA) setup, you must add both primary and secondary NetScaler IP addresses to auditlog.conf by using the audserver command. Before adding the IP address, make sure the user name and password exist on the system.
To stop audit server logging that starts as a background process in FreeBSD or Linux
Type the following command: audserver -stop
Creating Filters
You can use the default filter definition located in the configuration file (audit log.conf ), or you can modify the filter or create a new filter. You can create more than one log filter. Note: For consolidated logging, if a log transaction occurs for which there is no filter definition, the default filter is used (if it is enabled.) The only way you can configure consolidated logging of all the Citrix NetScaler appliances is by defining the default filter.
To create a filter
At the command prompt, type the following command in the configuration file ( auditlog.conf) : filter <filterName> [IP <ip>] [NETMASK <mask>] [ON | OFF] <filterName>: Specify the name of the filter (maximum of 64 alphanumeric characters). <ip>: Specify the IP addresses. <mask>: Specify the subnet mask to be used on a subnet. Specify ON to enable the filter to log transactions, or specify OFF to disable the filter. If no argument is specified, the filter is ON Examples filter F1 IP 192.168.100.151 ON To apply the filter F2 to IP addresses 192.250.100.1 to 192.250.100.254: filter F2 IP 192.250.100.0 NETMASK 255.255.255.0 ON
89
Chapter 3
Audit Logging filterName is a required parameter if you are defining a filter with other optional parameters, such as IP address, or the combination of IP address and Netmask.
Citrix NetScaler Administration Guide w Date (%{format}t) w % creates directory with NSIP The directory separator depends on the operating system. In Windows, use the directory separator \. Example: LogDirectory dir1\dir2\dir3 In the other operating systems (Linux, FreeBsd, Mac, etc.), use the directory separator /. w LogInterval specifies the interval at which new log files are created. Use one of the following values: Hourly: A file is created every hour. Default value. Daily: A file is created very day at midnight. Weekly: A file is created every Sunday at midnight. Monthly : A file is created on the first day of the month at midnight. None: A file is created only once, when audit server logging starts. Size: A file is created only when the log file size limit is reached. Example LogInterval Hourly w LogFileSizeLimit specifies the maximum size (in MB) of the log file. A new file is created when the limit is reached. Note that you can override the loginterval property by assigning size as its value. The default LogFileSizeLimit is 10 MB. Example LogFileSizeLimit 35
auditlog%{%y%m%d}t.log
91
Chapter 3
Audit Logging Example 1 Filter f1 IP 192.168.10.1 This creates a log file for NSI 192.168.10.1 with the default values of the log in effect. Example 2 Filter f1 IP 192.168.10.1 begin f1 logFilenameFormat logfiles.log end f1 This creates a log file for NSIP 192.168.10.1. Since the log file name format is specified, the default values of the other log properties are in effect.
92
Chapter 4
93
Chapter 4
To enable or disable Web server logging by using the NetScaler command line
At the NetScaler command prompt, type the following relevant commands to add or remove Web server logging and verify the configuration: w enable ns feature WL w disable ns feature WL w sh ns feature Example > enable ns feature WL Done sh ns feature Feature ------Web Logging Surge Protection Acronym ------WL SP Status -----ON ON
> > disable ns feature WL Done sh ns feature Feature ------Web Logging Surge Protection Acronym ------WL SP Status -----OFF ON
1) 2) . . . 24) Done
NetScaler Push
push
OFF
1) 2) . . . 24) 94
NetScaler Push
push
OFF
95
Chapter 4
Installing and Configuring the Client System for Web Server Logging
During installation, the NSWL client executable file (nswl) is installed along with other files. The nswl executable file includes options for performing several actions on the NSWL client, including running and stopping the NSWL client. In addition, you use the nswl executable to configure the NSWL client with the IP addresses of the NetScaler appliances from which the NSWL client will start collecting logs. Configuration settings are applied in the NSWL client configuration file (log.conf). Then, you start the NSWL client by executing the nswl executable. The NSWL client configuration is based on the settings in the configuration file. You can further customize logging on the NSWL client system by making additional modifications to the NSLOG server configuration file (auditlog.conf). The following table lists the operating systems on which the NSWL client is supported. Table 4-1. Supported Platforms for the NSWL Client Operating system Windows Version w Windows XP Professional w Windows Server 2003 w Windows 2000/NT w Windows Server 2008 w Windows Server 2008 R2 Mac OS Linux Mac OS 8.6 or later w RedHat Linux 4 or later w SUSE Linux Enterprise 9.3 or later Solaris 96 Solaris Sun OS 5.6 or later
The following table describes the minimum hardware specifications for the platform running the NSWL client. Table 4-2. Minimum Hardware Specification for Platforms Running the NSWL Client Operating system For Windows / Linux / FreeBSD Hardware requirements Processor- Intel x86 ~501 megahertz (MHz) RAM - 512 megabytes (MB) Controller - SCSI For Solaris 2.6 Processor - UltraSPARC-IIi 400 MHz RAM - 512 MB Controller - SCSI If the NSWL client system cannot process the log transaction because of a CPU limitation, the Web log buffer overruns and the logging process reinitiates. Caution: Reinitiation of logging can result in loss of log transactions. To temporarily solve a NSWL client system bottleneck caused by a CPU limitation, you can tune the Web server logging buffer size on the NetScaler appliance. To solve the problem, you need a client system that can handle the site's throughput.
Chapter 4
Web Server Logging cd /tmp 3. Extract the files from the *.tar file with the following command: tar xvf NSweblog.tar A directory NSweblog is created in the temporary directory, and the files are extracted to the NSweblog directory. 4. Install the package with the following command: pkgadd -d The list of available packages appears. In the following example, one NSweblog package is shown: 1 NSweblog NetScaler Weblogging (SunOS,sparc) 7.0 5. You are prompted to select the packages. Select the package number of the NSweblog to be installed. After you select the package number and press Enter, the files are extracted and installed in the following directories: /usr/local/netscaler/etc /usr/local/netscaler/bin /usr/local/netscaler/samples 6. At a command prompt, type the following command to check whether the package is installed: pkginfo | grep NSweblog
98
Citrix NetScaler Administration Guide cp <path_to_cd>/Utilities/weblog/Linux/NSweblog.rpm /tmp 2. To install the NSWL executable, use the following command: rpm -i NSweblog.rpm This command extracts the files and installs them in the following directories. /usr/local/netscaler/etc /usr/local/netscaler/bin /usr/local/netscaler/samples
Chapter 4
Web Server Logging This command extracts the files and installs them in the following directories. /usr/local/netscaler/etc /usr/local/netscaler/bin /usr/local/netscaler/samples 4. To verify that the package is installed, use the following command: pkg_info | grep NSweblog
100
101
Chapter 4
Web Server Logging b. <root directory extracted from the Windows NSWL client package zip file>\etc (for example, C:\nswl_win-9.3-51.5\ etc ) c. < root directory extracted from the Windows NSWL client package zip file >\samples (for example, C:\nswl_win-9.3-51.5\ samples ) 4. At a command prompt, run the following command from the <root directory extracted from the Windows NSWL client package zip file>\bin path: nswl -install -f <directorypath> \log.conf <directorypath>: Specifies the path to the configuration file ( log.conf ). By default, log.conf is in the < root directory extracted from the Windows NSWL client package zip file >\samples directory. But you can copy log.conf to your desired directory.
nswl -install -f <path to configuration file> (Windows only) nswl -startservice (Windows only)
Chapter 4
NSWL command
Specifies install option. You can also start NSWL client from Start > Control Panel > Services.
Stops the NSWL client. Remove the NSWL client service from the registry.
Run the following commands from the directory in which the NSWL executable is located: w Windows: \ns\bin w Solaris and Linux: \usr\local\netscaler\bin The Web server logging configuration files are located in the following directory path: w Windows: \ns\etc w Solaris and Linux: \usr\local\netscaler\etc The NSWL executable is started as .\nswl in Linux and Solaris.
104
To stop Web server logging started as a background process on the Solaris or Linux operating systems
At the command prompt, type: nswl -stop
To stop Web server logging started as a service on the Windows operating system
At the command prompt, type: nswl -stopservice
Chapter 4
Web Server Logging To customize logging, use the configuration file to define filters and log properties. w Log filters. Filter log information based on the host IP address, domain name, and host name of the Web servers. w Log properties. Each filter has an associated set of log properties. Log properties define how to store the filtered log information.
Creating Filters
You can use the default filter definition located in the configuration file ( log.conf), or you can modify the filter or create a new filter. You can create more than one log filter. Note: Consolidated logging, which logs transactions for which no filter is defined, uses the default filter if it is enabled. Consolidated logging of all servers can be done by defining only the default filter. If the server hosts multiple Web sites and each Web site has its own domain name, and each domain is associated with a virtual server, you can configure Web server logging to create a separate log directory for each Web site. The following table displays the parameters for creating a filter.
Table 4-4. Parameters for Creating a Filter Parameter filterName HOST name IP ip Specifies Name of the filter (maximum 64 alphanumeric characters). Host name of the server for which the transactions are being logged. IP address of the server for which transactions are to be logged (for example, if the server has multiple domains that have one IP address). Multiple IP addresses (for example, if the server domain has multiple IP addresses). IPv6 address of the server for which transactions are to be logged. IP addresses and netmask combination to be used on a subnet. Enable or disable the filter to log transactions. If no argument is selected, the filter is enabled (ON).
106
To create a filter
To create a filter, enter the following command in the log.conf file: w filter <filterName> <HOST name> | [IP <ip>] | [IP <ip 2...ip n>] | <IP ip NETMASK mask> [ON | OFF] w filter <filterName> <HOST name> | [IP6 ip/<prefix length>] [ON | OFF]
Chapter 4
Web Server Logging Entries in the definition can include the following: w LogFormat specifies the Web server logging feature that supports NCSA, W3C Extended, and custom log file formats. By default, the logformat property is w3c. To override, enter custom or NCSA in the configuration file, for example: LogFormat NCSA Note: For the NCSA and custom log formats, local time is used to time stamp transactions and for file rotation. w LogInterval specifies the intervals at which new log files are created. Use one of the following values: Hourly: A file is created every hour. Daily: A file is created every day at midnight. Default value. Weekly: A file is created every Sunday at midnight. Monthly: A file is created on the first day of the month at midnight. None: A file is created only once, when Web server logging starts. Example LogInterval Daily w LogFileSizeLimit specifies the maximum size of the log file in MB. It can be used with any log interval (weekly, monthly, and so on.) A file is created when the maximum file size limit is reached or when the defined log interval time elapses. To override this behavior, specify the size as the loginterval property so that a file is created only when the log file size limit is reached. The default LogFileSizeLimit is 10 MB. Example LogFileSizeLimit 35 w LogFilenameFormat specifies the file name format of the log file. The name of the file can be of the following types: Static: Specifies a constant string that contains the absolute path and file name. Dynamic: Specifies an expression containing the following format: w Server IP address (%A) w Date (%{format}t) w URL suffix (%x) w Host name (%v)
108
Citrix NetScaler Administration Guide Example LogFileNameFormat Ex%{%m%d%y}t.log This command creates the first file name as Exmmddyy.log, then every hour creates a file with file name: Exmmddyy.log.0, Exmmddyy.log.1,..., Exmmddyy.log.n. Example LogInterval size LogFileSize 100 LogFileNameFormat Ex%{%m%d%y}t Caution: The date format %t specified in the LogFilenameFormat command overrides the log interval property for that filter. To prevent a new file being created every day instead of when the specified log file size is reached, do not use %t in the LogFilenameFormat. w LogExclude prevents logging of transactions with the specified file extensions. Example LogExclude .html This command creates a log file that excludes log transactions for *.html files. w LogTime specifies log time as either GMT or LOCAL. The defaults are: NCSA log file format: LOCAL W3C log file format: GMT.
109
Chapter 4
Web Server Logging Table 4-5. NCSA Common Log Format Argument Client _IP_address User Name Date Time Time Zone Method Object HTTP_version HTTP_StatusCode Bytes Sent Specifies The IP address of the client computer. The user name. The date of the transaction. The time when the transaction was completed. The time zone (Greenwich Mean Time or local time). The request method (for example; GET, POST). The URL. The version of HTTP used by the client. The status code in the response. The number of bytes sent from the server.
Citrix NetScaler Administration Guide 2001-06-12 12:34:23 GET /sports/football.html 2001-06-12 12:34:30 GET /sports/football.html
Entries
Entries consist of a sequence of fields relating to a single HTTP transaction. Fields are separated by white space; Citrix recommends the use of tab characters. If a field in a particular entry is not used, a dash (-) marks the omitted field.
Directives
Directives record information about the logging process. Lines beginning with the pound sign (#) contain directives. The following table describes the directives. Table 4-6. Directive Descriptions Directive Version: <integer>.<integer> Description Displays the version of the extended log file format used. This document defines version 1.0. Identifies the fields recorded in the log. Identifies the software that generated the log. Displays the date and time at which the log was started. Displays the date and time at which logging finished. Displays the date and time when the entry was added. Displays comments. Analysis tools ignore data recorded in this field.
Fields: [<specifier>...] Software: <string> Start-Date: <date> <time> End-Date: <date> <time> Date: <date> <time> Remark: <text>
Note: The Version and Fields directives are required. They precede all other entries in the log file. Example The following sample log file shows the log entries in W3C Extended log format: #Version: 1.0 #Fields: time cs-method cs-uri #Date: 12-Jan-1996 00:00:00 00:34:23 GET /sports/football.html 12:21:16 GET /sports/football.html 111
Chapter 4
Fields
The Fields directive lists a sequence of field identifiers that specify the information recorded in each entry. Field identifiers may have one of the following forms: w identifier: Relates to the transaction as a whole. w prefix-identifier: Relates to information transfer between parties defined by the value prefix. w prefix (header): Specifies the value of the HTTP header field header for transfer between parties defined by the value prefix. Fields specified in this manner always have the type <string>. The following table describes defined prefixes. Table 4-7. Prefix Descriptions Prefix c s r cs sc sr rs x Examples The following examples are defined identifiers that use prefixes: cs-method: The method in the request sent by the client to the server. sc(Referer): The Referer field in the reply. c-ip: The IP address of the client. Specifies Client Server Remote Client to server Server to client Server to remote server (prefix used by proxies) Remote server to server (prefix used by proxies) Application-specific identifier
Identifiers
The following table describes the W3C Extended log format identifiers that do not require a prefix.
112
Citrix NetScaler Administration Guide Table 4-8. W3C Extended Log Format Identifiers (No Prefix Required) Identifier date time time-taken bytes cached Description The date on which the transaction was done. The time when the transaction is done. The time taken (in seconds) for the transaction to complete. The number of bytes transferred. Records whether a cache hit has occurred. A zero indicates a cache miss.
The following table describes the W3C Extended log format identifiers that require a prefix. Table 4-9. W3C Extended Log Format Identifiers (Requires a Prefix) Identifier IP dns status comment method url url-stem url-query Description The IP address and the port number. The DNS name. The status code. The comment returned with status code. The method. The URL. The stem portion of the URL. The query portion of the URL.
The W3C Extended Log file format allows you to choose log fields. These fields are shown in the following table. Table 4-10. W3C Extended Log File Format (Allows Log Fields) Field Date Time Client IP Description The date on which the transaction is done. The time when the transaction is done. The IP address of the client.
113
Chapter 4
Field User Name Service Name Server IP Server Port Method Url Stem Url Query Http Status Bytes Sent Bytes Received
Description The user name. The service name, which is always HTTP. The server IP address. The server port number The request method (for example; GET, POST). The URL stem. The query portion of the URL. The status code in the response. The number of bytes sent to the server (request size, including HTTP headers). The number of bytes received from the server (response size, including HTTP headers). The time taken for transaction to complete, in seconds. The version number of HTTP being used by the client. The User-Agent field in the HTTP protocol. The Cookie field of the HTTP protocol. The Referer field of the HTTP protocol.
Citrix NetScaler Administration Guide w Solaris: The libnswl.a library located in /usr/local/netscaler/bin.
Chapter 4
Web Server Logging If the %v (Host name) or %x (URL suffix) format specifier is present in a log file name format string, the following characters in the file name are replaced by an underscore symbol in the log configuration file name: "*./:<>?\| Characters whose ASCII values lie in the range of 0-31 are replaced by the following: %<ASCII value of character in hexadecimal>. For example, the character with ASCII value 22 is replaced by %16. Caution: If the %v format specifier is present in a log file name format string, a separate file is opened for each virtual host. To ensure continuous logging, the maximum number of files that a process can have open should be sufficiently large. See your operating system documentation for a procedure to change the number of files that can be opened.
Citrix NetScaler Administration Guide logFilenameFormat Ex%{%y%m%d}t.log end default ########## # netscaler caches example # CACHE_F filter covers all the transaction with HOST name www.netscaler.com and the listed server ip's ########## #Filter CACHE_F HOST www.netscaler.com IP 192.168.100.89 192.168.100.95 192.168.100.52 192.168.100.53 ON ########## # netscaler origin server example # Not interested in Origin server to Cache traffic transaction logging ########## #Filter ORIGIN_SERVERS IP 192.168.100.64 192.168.100.65 192.168.100.66 192.168.100.67 192.168.100.225 192.168.100.226 192.168. 100.227 192.168.100.228 OFF ########## # netscaler image server example # all the image server logging. ########## #Filter IMAGE_SERVER HOST www.netscaler.images.com IP 192.168.100.71 192.168.100.72 192.168.100.169 192.168.100.170 192.168.10 0.171 ON ########## # NCSA Format logging, new file is created every day midnight or on reaching 20MB file size, # and the file name is /datadisk5/netscaler/log/NS<hostname>/ Nsmmddyy.log. # Exclude objects that ends with .gif .jpg .jar. ########## #begin ORIGIN_SERVERS # logFormat NCSA # logInterval Daily # logFileSizeLimit 40 # logFilenameFormat /datadisk5/ORGIN/log/%v/NS%{%m%d %y}t.log # logExclude .gif .jpg .jar #end ORIGIN_SERVERS ########## # NCSA Format logging, new file is created every day midnight or on reaching 20MB file size, # and the file name is /datadisk5/netscaler/log/NS<hostname>/ Nsmmddyy.log with log record timestamp as GMT. ########## #begin CACHE_F # logFormat NCSA # logInterval Daily # logFileSizeLimit 20 # logFilenameFormat /datadisk5/netscaler/log/%v/NS%{%m%d %y}t.log # logtime GMT #end CACHE_F
117
Chapter 4
Web Server Logging ########## # W3C Format logging, new file on reaching 20MB and the log file path name is # atadisk6/netscaler/log/server's ip/Exmmyydd.log with log record timestamp as LOCAL. ########## #begin IMAGE_SERVER # logFormat W3C # logInterval Size # logFileSizeLimit 20 # logFilenameFormat /datadisk6/netscaler/log/%AEx%{%m%d%y}t # logtime LOCAL #end IMAGE_SERVER ########## # Virtual Host by Name firm, can filter out the logging based on the host name by, ########## #Filter VHOST_F IP 10.101.2.151 NETMASK 255.255.255.0 #begin VHOST_F # logFormat W3C # logInterval Daily # logFileSizeLimit 10 logFilenameFormat /ns/prod/vhost/%v/Ex%{%m%d%y}t #end VHOST_F ########## END FILTER CONFIGURATION ##########
118
Argument %b
Specifies The bytes received, excluding the HTTP headers (request size). A user-defined field. The Greenwich Mean Time offset (for example, -0800 for Pacific Standard Time). The remote host. The request protocol. The contents of the Foobar: header line(s) in the request sent to the server. The system supports the User-Agent, Referer and cookie headers. The + after the % in this format informs the logging client to use the + as a word separator. The bytes received, including headers (request size) The bytes sent, including headers (response size) The remote log name (from identd, if supplied). The request method. The time taken to serve the request (i n microseconds ) The contents of Foobar: header line(s) in the reply. USER-AGENT, Referer, and cookie headers are supported. The canonical port of the server serving the request. The query string (prefixed with a question mark (?) if a query string exists).
%d %g
%h %H %{Foobar}i
%j
%J
%l
%m %M
%{Foobar}o
%p
%q
119
Chapter 4
Argument %r %s
Specifies The first line of the request. For requests that were redirected internally, this is the status of the original request. The time, in common log format (standard English time format). The time, in the form given by format, must be in the strftime(3) format. For format descriptions, see Time Format Definition on page 121. The time taken to serve the request, in seconds. The remote user (from auth; may be bogus if return status (%s) is 401). The URL path requested. The canonical name of the server serving the request. This is the virtual server IPv4 address in the system, if load balancing, content switching, and/or cache redirection is used. This is the virtual server IPv6 address in the system, if load balancing, content switching, and/or cache redirection is used.
%t
%{format}t
%T
%u
%U %v
%V
%V6
For example, if you define the log format as %+{user-agent}i, and if the user agent value is Citrix NetScaler system Web Client, then the information is logged as Citrix NetScaler system +Web+Client. An alternative is to use double quotation marks. For example, %{user-agent}i logs it as Citrix NetScaler system Web Client. Do not use the <Esc> key on strings from %.. .r, %. . .i and, %. . .o. This complies with the requirements of the Common Log Format. Note that clients can insert control characters into the log. Therefore, you should take care when working with raw log files.
120
%d %e %h %H %I %j %k
121
Chapter 4
Argument %l %m %M %n %p %r %S
Specifies The hour (12-hour clock) [1,12]; single digits are preceded by a blank. The number of the month in the year [1,12]; single digits are preceded by a 0. The minute [00,59]; leading 0 is permitted but not required. Inserts a new line. The equivalent of either a.m. or p.m. for the locale. The appropriate time representation in 12-hour clock format with %p. The seconds [00,61]; the range of values is [00,61] rather than [00,59] to allow for the occasional leap second and for the double leap second. Inserts a tab. The day of the week as a decimal number [1,7]. 1 represents Sunday, 2 represents Tuesday and so on. The number of the week in the year as a decimal number [00,53], with Sunday as the first day of week 1. The day of the week as a decimal number [0,6]. 0 represents Sunday. Specifies the number of the week in the year as a decimal number [00,53]. Monday is the first day of week 1. The number of the year within the century [00,99]. For example, 5 would be the fifth year of that century. The year, including the century (for example, 1993).
%t %u
%U
%w %W
%y
%Y
Note: If you specify a conversion that does not correspond to any of the ones described in the preceding table, or to any of the modified conversion specifications listed in the next paragraph, the behavior is undefined and returns 0.
122
Citrix NetScaler Administration Guide The difference between %U and %W (and also between modified conversions %OU and %OW) is the day considered to be the first day of the week. Week number 1 is the first week in January (starting with a Sunday for %U, or a Monday for %W). Week number 0 contains the days before the first Sunday or Monday in January for %U and %W.
123
Chapter 4
124
Chapter 5
Advanced Configurations
Topics:
Configuring Clock Synchronization Viewing the System Date and Time Configuring TCP Window Scaling Configuring Selective Acknowledgment Clearing the Configuration Viewing the HTTP Band Statistics Configuring HTTP Profiles Configuring TCP Profiles Specifying a TCP Buffer Size Optimizing the TCP Maximum Segment Size for a Virtual Server Configuration You can configure network time protocol to synchronize a Citrix NetScaler appliance's local clock with the other servers on the network. If you enable path maximum transmission unit (PMTU) discovery, the NetScaler can use it to determine the maximum transmission unit of any Internet channel. For more efficient data transfer, you can configure TCP window scaling and selective acknowledgment. You can clear any basic or extended configuration on your NetScaler. You can view statistics associated with HTTP request and response sizes. For applying a specific HTTP and TCP settings to vservers and services, you can configure HTTP and TCP profiles.
125
Chapter 5
Advanced Configurations
Done
126
127
Chapter 5
Advanced Configurations
128
Citrix NetScaler Administration Guide 6. If the /nsconfig directory does not contain a file named rc.netscaler, create the file. 7. Add the following entry to /nsconfig/rc.netscaler: /usr/sbin/ntpd -c /nsconfig/ntp.conf -l /var/log/ntpd.log & This entry starts the ntpd service, checks the ntp.conf file, and logs messages in the /var/log directory. This process runs every time the NetScaler is restarted. 8. Reboot the NetScaler to enable clock synchronization. Note: If you want to start the time synchronization process without restarting the NetScaler, run the following command from the shell prompt: /usr/sbin/ntpd -c /nsconfig/ntp.conf -l /var/log/ntpd.log &
To view the system date and time by using the NetScaler command line
At the NetScaler command prompt, type: show ns config Example > show ns config NetScaler IP: 10.102.29.170 255.255.255.0) Number of MappedIP(s): 6 Node: Standalone (mask:
Global configuration settings: HTTP port(s): Max connections: Max requests per connection: Client IP insertion: Cookie version: Persistence Cookie Secure Flag: Min Path MTU: Path MTU entry timeout: FTP Port Range: CR Port Range: Timezone:
Chapter 5
Advanced Configurations IST-Asia/Colombo 16:50:44 2011 16:48:02 2011 16:48:19 2011 Done
Last Config Changed Time: Tue Feb 22 Last Config Saved Time: Tue Feb 22
To view the system date and time by using the configuration utility
1. In the navigation pane, click System. 2. In the details pane, select the System Information tab. 3. Under System Information, view the system date and time.
130
Citrix NetScaler Administration Guide w You do not configure window scaling unless you clearly know why you want to change the window size. w Both hosts in the TCP connection send a window scale option during connection establishment. If only one side of a connection sets this option, windows scaling is not used for the connection. w Each connection for same session is an independent Window Scaling session. For example, when a client's request and the server's response flow through the NetScaler appliance, it is possible to have window scaling between the client and the appliance without window scaling between the appliance and the server. By default, window scaling is not enabled.
: ENABLED : 6
ENABLED
Done
131
Chapter 5
Advanced Configurations
Citrix NetScaler Administration Guide Down Service Reset status : DISABLED Nagle's Algorithm : DISABLED Limited Persist Probes : ENABLED Maximum out-of-order packets to queue: 64
Done
Chapter 5
Advanced Configurations clear ns config < ( basic | advanced | full )> Example > clear ns config basic Are you sure you want to clear the configuration(Y/ N)? [N]:Y Done
To view HTTP request and response size statistics by using the NetScaler command line
At the NetScaler command prompt, type: show protocol httpBand type (REQUEST|RESPONSE)
134
Example show protocol httpBand -type REQUEST show protocol httpBand -type RESPONSE
To view HTTP request and response size statistics by using the configuration utility
1. In the navigation pane, expand System, and then click Settings. 2. In the details pane, under Settings, click HTTP data band statistics. 3. In the HTTP Data Band Statistics dialog box, view the HTTP request and HTTP response size statistics on the Request and Response tabs, respectively. You can also modify the band range for HTTP request or response size statistics.
Parameters for modifying the band range for HTTP request or response size statistics
reqBandSize Band size for HTTP request band statistics, in bytes. Minimum value: 50. Maximum value: 2147483647. Default: 100. respBandSize Band size for HTTP response band statistics, in bytes. Minimum value: 50. Maximum value: 2147483647. Default: 1024.
135
Chapter 5
Advanced Configurations
nshttp_default_profile
136
Citrix NetScaler Administration Guide w add ns httpProfile name -maxReusePool <value> -dropInvalReqs ( ENABLED | DISABLED ) -markHttp09Inval ( ENABLED | DISABLED ) -markConnReqInval ( ENABLED | DISABLED ) -cmpOnPush ( ENABLED | DISABLED ) -conMultiplex ( ENABLED | DISABLED ) w sh ns httpProfile Example add ns httpProfile http_profile1 -maxReusePool 30 dropInvalReqs ENABLED -markHttp09Inval ENABLED -markConnReqInval ENABLED -cmpOnPush ENABLED conMultiplex DISABLED
137
Chapter 5
Advanced Configurations
nstcp_default_tcp_lnp
138
Description This profile is useful for back-end server connections, where these servers reside on the same LAN as the NetScaler appliance. This profile is similar to the nstcp_default_tcp_lfp profile; however, the settings are tuned for small size packet flows. This profile is similar to the nstcp_default_tcp_lnp profile; however, the settings are tuned for small size packet flows. This profile is similar to the nstcp_default_tcp_lan profile; however, the settings are tuned to small size packet flows. This profile is similar to the nstcp_default_tcp_lan profile; however, it has a reduced delayed ACK timer and ACK on PUSH packet settings. This profile is useful for internal applications on the NetScaler appliance (for example, GSLB sitesyncing). This contains tuned window scaling and SACK options for the desired applications. This profile should not be bound to applications other than internal applications. This profile represents the default global TCP settings on the NetScaler appliance.
nstcp_default_tcp_lfp_thin_stream
nstcp_default_tcp_lnp_thin_stream
nstcp_default_tcp_lan_thin_stream
nstcp_default_tcp_interactive_stream
nstcp_internal_apps
nstcp_defualt_profile
139
Chapter 5
Advanced Configurations w add ns tcpProfile name -WS (ENABLED | DISABLED ) -SACK (ENABLED | DISABLED ) WSVal <value> -nagle (ENABLED | DISABLED ) -ackOnPush (ENABLED | DISABLED ) maxBurst value -initialCwnd <value> -delayedAck <value> -oooQSize <value> maxPktPerMss <value> -pktPerRetx <value> -minRTO <value> -slowStartIncr <value> w sh ns tcpProfile Example add ns tcpProfile tcp_profile1 -WS ENABLED -SACK ENABLED -WSVal 4 -nagle DISABLED -ackOnPush ENABLED -maxBurst 10 -initialCwnd 6 delayedAck 200 -oooQSize 100 -maxPktPerMss 0 -pktPerRetx 3 -minRTO 200 slowStartIncr 3
140
Citrix NetScaler Administration Guide pktPerRetx (Maximum Packets per Retransmission) The maximum limit on the number of packets that should be retransmitted on receiving a partial ACK. Minimum value: 1. Maximum value: 100. Default: 1. minRTO (Minimum RTO (in millisec)) The minimum round trip to origin (RTO) time, in milliseconds. Minimum value: 10. Maximum value: 64,000. Default: 1,000. slowStartIncr (Slow Start Increment) The multiplier that determines the rate at which slow start increases the size of the TCP transmission window after each acknowledgement of successful transmission. Minimum value: 1. Maximum value: 100. Default: 2. SACK (Selective Acknowledgement) Enable or disable selective acknowledgement (SACK). Possible values: ENABLED, DISABLED. Default: DISABLED. nagle (Use Nagle's Algorithm) Enable or disable the Nagle algorithm on TCP connections. Possible values: ENABLED, DISABLED. Default: DISABLED. ackOnPush (Immediate ACK on Receiving Packet with PUSH) Send immediate positive acknowledgement (ACK) on receipt of TCP packets when doing Web 2.0 PUSH. Possible values: ENABLED, DISABLED. Default: ENABLED.
141
Chapter 5
Advanced Configurations Use Nagle's Algorithm Immediate ACK on Receiving Packet with PUSH * A required parameter. 4. Click Create. A message appears in the status bar, stating that the TCP profile has been configured successfully.
To set the TCP buffer size in an entity-level TCP profile by using the NetScaler command line
At the NetScaler command prompt, type the following commands to set the TCP buffer size in a TCP profile and verify the configuration: w set ns tcpProfile <name> -bufferSize <positive_integer> w show ns tcpProfile <name> 142
Example
> set ns tcpProfile profile1 -bufferSize 12000 Done > show ns tcpProfile profile1 Name : profile1 Window Scaling status : DISABLED Window Scaling factor : 4 . . . TCP Buffer Size : 12000 bytes Reference count: 0 > Done
To set the TCP buffer size in the global TCP profile by using the NetScaler command line
At the NetScaler command prompt, type the following commands to set the TCP buffer size in the global TCP profile and verify the configuration: w set ns tcpProfile nstcp_default_profile bufferSize <positive_integer> w show ns tcpProfile nstcp_default_profile
Example
> set ns tcpProfile nstcp_default_profile bufferSize 12000 Done > show ns tcpProfile nstcp_default_profile Name : nstcp_default_profile Window Scaling status : DISABLED Window Scaling factor : 4 . . . TCP Buffer Size : 12000 bytes Reference count: 200 > Done
143
Chapter 5
Advanced Configurations
To set the TCP buffer size in a TCP profile by using the NetScaler configuration utility
1. In the navigation pane, expand System, and then click Profiles. 2. In the details pane, click the TCP Profiles tab, and then do one of the following: To create a custom, entity-level TCP profile, click Add and, in the Create TCP Profile dialog box, type a name for the new profile. To set the TCP buffer size for an existing TCP profile, click the name of the TCP profile, and then click Open. If you want to set the TCP buffer size in the global TCP profile, click nstcp_default_profile. 3. In the Create TCP Profile or Configure TCP Profile dialog box, in the TCP Buffer Size (Bytes) box, type the number of bytes to specify as the minimum TCP buffer size. 4. Click Create or OK.
Optimizing the TCP Maximum Segment Size for a Virtual Server Configuration
You can specify the Maximum Segment Size (MSS) that the Citrix NetScaler appliance advertises to a client when the client initiates a connection to a virtual server on the appliance. You can configure the MSS for the virtual servers configured on the appliance in two ways: w You can set the MSS for each virtual server to a value of your choice in a TCP profile. w You can set the learnVsvrMSS global TCP parameter to ENABLED to enable MSS learning for all the virtual servers configured on the appliance. If you know the optimal MSS value for a given virtual server, you can specify the MSS in a TCP profile and bind the profile to the virtual server. When a client initiates a connection with the virtual server, the NetScaler appliance advertises the specified MSS value to the client. However, if the appliance is also configured to learn the optimum MSS value from bound services (as described in the following section), the learned MSS value takes precedence, and the value specified in the TCP profile is used only until 144
Citrix NetScaler Administration Guide the appliance learns the optimum MSS value. The appliance uses the learned MSS value until the appliance is restarted. If the appliance is restarted, the appliance defaults to the MSS value specified in the virtual server's TCP profile until it learns the MSS value again.
To specify the MSS value in a TCP profile by using the NetScaler command-line
At the NetScaler command prompt, type the following commands to specify the MSS value in a TCP profile and verify the configuration: w add ns tcpProfile <name> -mss <positive_integer> w show ns tcpProfile > add ns tcpProfile tcp_prof1 -mss 1000 Done > show ns tcpProfile tcp_prof1 Name : tcp_prof1 Window Scaling status : DISABLED Window Scaling factor : 4 SACK status : DISABLED MSS : 1000 MaxBurst setting : 6 MSS Initial cwnd setting : 4 MSS . . . > Done
To specify the MSS value in a TCP profile by using the NetScaler configuration utility
1. In the navigation pane, expand System, and then click Profiles. 2. In the details pane, do one of the following:
145
Chapter 5
Advanced Configurations To create a TCP profile, click Add. To specify the MSS in an existing TCP profile, click the name of the profile, and then click Open. 3. In the Create TCP Profile or Configure TCP Profile dialog box, specify values for the following parameters, which correspond to the parameters described in "Parameters for specifying the MSS value in a TCP profile" as shown: Name*name (cannot be changed for an existing TCP profile) MSS*mss * A required parameter 4. Click Create or OK.
Configuring the NetScaler to Learn the MSS Value from Bound Services
If you set the global TCP parameter learnVsvrMSS to ENABLED, the NetScaler appliance learns the most frequently used MSS value for each configured virtual server. When a client connects to a virtual server, the appliance advertises to the client the MSS value that is optimum for that virtual server. The optimum value is the MSS of the service or subset of bound services that are most frequently selected during load balancing. Consequently, each virtual server configuration uses its own MSS value. This enhancement enables the appliance to optimize the consumption of system resources. The default value of the learnVsvrMSS parameter is DISABLED. When enabled, MSS learning is applicable only to virtual servers of type TCP, HTTP, and FTP.
To configure the NetScaler to learn the MSS for a virtual server by using the NetScaler command-line
At the NetScaler command prompt, type the following commands to configure the NetScaler to learn the MSS for a virtual server and verify the configuration: w set ns tcpParam -learnVsvrMSS (ENABLED|DISABLED) w show ns tcpParam Example > set ns tcpParam -learnVsvrMSS ENABLED Done > show ns tcpParam TCP Parameters Window Scaling status Window Scaling factor SACK status Learn MSS for VServer . . . 146 : : : : DISABLED 4 DISABLED ENABLED
>
Parameters for configuring the NetScaler to learn the MSS for a virtual server
learnVsvrMSS Enable or disable MSS learning for virtual servers. Possible values: ENABLED, DISABLED. Default: DISABLED.
To configure the NetScaler to learn the MSS for a virtual server by using the NetScaler configuration utility
1. In the navigation pane, expand System, and then click Settings. 2. In the details pane, click Change TCP parameters. 3. In the Configure TCP Parameters dialog box, select the Learn MSS check box.
147
Chapter 5
Advanced Configurations
148
Chapter 6
Web Interface
Topics:
How Web Interface Works Prerequisites Installing the Web Interface Configuring the Web Interface The Web Interface on Citrix NetScaler appliances is based on Java Server Pages (JSP) technology and provides access to Citrix XenApp and Citrix XenDesktop applications. Users access resources through a standard Web browser or by using the Citrix XenApp plug-in. The Web Interface runs as a service on port 8080 on the NetScaler appliance. To create Web Interface sites, Java is executed on Apache Tomcat Web server version 6.0.26 on the NetScaler appliance. The Web Interface sites provide user access to the XenApp and XenDesktop resources, which include applications, content, and desktops. Note: This feature is supported only on NetScaler nCore builds. The Web Interface installation includes installing the Web Interface tar file and JRE tar file on the NetScaler appliance. To configure the Web Interface, you create a Web Interface site and bind one or more XenApp or XenDesktop farms to it.
149
Chapter 6
Web Interface
Following is a typical set of interactions among a user device, a NetScaler running the Web interface, and a server farm. 1. A user authenticates to the Web interface through a Web browser or by using the XenApp plug-in. 2. The Web interface reads the user's credentials and forwards the information to the Citrix XML Service running on servers in the server farm. 3. The Citrix XML Service on the designated server retrieves from the servers a list of resources that the user can access. These resources constitute the user's resource set and are retrieved from the Independent Management Architecture (IMA) system. 4. The Citrix XML Service then returns the user's resource set to the Web interface running on the NetScaler. 5. The user clicks an icon that represents a resource on the HTML page. 6. The Web interface queries the Citrix XML Service for the least busy server. 7. The Citrix XML Service returns the address of this server to the Web interface. 8. The Web interface sends the connection information to the Web browser. 9. The Web browser initiates a session with the server.
Prerequisites
The following prerequisites are required before you begin installing and configuring the Web interface. w XenApp or XenDesktop farms are set up and running in your environment. For more information about XenApp, see the XenApp documentation at http:// 150
Citrix NetScaler Administration Guide edocs.citrix.com/. For more information about XenDesktop, see the XenDesktop farms documentation at http://edocs.citrix.com/. w Conceptual knowledge of the Web interface. For more information about Web interface running on a server, see the Web interface documentation at http:// edocs.citrix.com/.
To install the Web interface and JRE tar files by using the NetScaler command line
At the NetScaler command prompt, type: install wi package -wi <URL> -jre <URL> Example install wi package -wi sftp:// username:[email protected]/var/nswi-1.1.tgz jre ftp://username:[email protected]/tmp/ diablojre- freebsd6.amd64.1.6.0.07.02.tbz install wi package -wi ftp:// username:[email protected]/var/nswi-1.1.tgz jre file:///var/diablojrefreebsd6.amd64.1.6.0.07.02.tbz
151
Chapter 6
Web Interface
Parameters for installing the Web interface and JRE tar files
Web Interface tar file path Complete path to the Web interface tar file. JRE tar file path Complete path to the JRE tar file.
To install the Web interface and JRE tar files by using the configuration utility
1. In the navigation pane, click Web Interface. 2. In the details pane, under Getting Started, click Install Web Interface. 3. In the Install Web Interface dialog box, in the Web Interface tar file path text box, type the complete path to the Web interface tar file. You can also use the browse button to locate the file on your local system or the NetScaler hard drive. 4. In the JRE tar file path text box, type the complete path to the JRE tar file. You can also use the browse button to locate the file on your local system or the NetScaler hard drive. 5. Click Install.
152
Citrix NetScaler Administration Guide HTTPS://<Access Gateway URL>/<Web Interface site path>
153
Chapter 6
Web Interface Port Port on which the virtual server listens for client connections. Possible values: from 0 through 65535. Gateway Direct Mode The Web interface is accessed through a configured Access Gateway. Authentication Point Authentication point to be used for the site. Possible values: Web interface, AccessGateway. Default: AccessGateway. Access Gateway URL URL of the Access Gateway. Add DNS Entry Specifies whether to add DNS address record to resolve the specified Access Gateway URL. Possible values: ON, OFF. Default: ON. Trust SSL Certificate Specifies whether the Web interface site trusts certificates signed by a non-trusted CA. Possible values: ON, OFF. Default: ON. STA Server URL URL of the Secure Ticket Authority (STA) server. STA Server URL (2) URL of the second STA server. Session Reliability Specifies whether to use session reliability through the Access Gateway. Possible values: ON, OFF. Default: OFF. Use Two STA Servers Specifies whether the Web interface requests tickets from two separate gateway Secure Ticket Authorities when a resource is accessed. Possible values: ON, OFF. Default: OFF. Name Name of a XenApp or XenDesktop farm. Any name can be used as a logical representation of a XenApp or XenDesktop farm. The name must not exceed 127 characters.
154
Citrix NetScaler Administration Guide XML Service Addresses Comma-separated IP addresses or host names of either XenApp or XenDesktop servers providing XML services. XML Service Port Port number to use for contacting the XML service. Default: 80. Transport Transport protocol to use for the XML service. Possible values: HTTP, HTTPS. Default: HTTP. Load balance Specifies whether to use all the XML servers (load balance mode) or only one (failover mode). Possible values: ON (load balance mode), OFF (failover mode). Default: ON.
155
Chapter 6
Web Interface Figure 6-2. A Web Interface Site Configured for LAN Users Using HTTP
To configure a Web interface site for LAN users using HTTP by using the configuration utility
1. In the navigation pane, click Web Interface. 2. In the details pane, click Web Interface Wizard. 3. On the wizard Introduction page, click Next. 4. On the wizard Configure Web Interface Site page, specify the values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Site Path* (You cannot change the name of an existing Web interface site.) Site Type Published Resource Type Kiosk Mode * A required parameter.
156
Citrix NetScaler Administration Guide 5. Select Direct Mode and specify values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Virtual Server Protocol (select HTTPS) IP Address Port Note: When you create the HTTPS vserver by using the configuration utility, the configuration utility automatically creates a service, which logically represents the Web interface service running on the NetScaler appliance, and binds the service to the HTTPS virtual server. For more information about services and virtual servers, see the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 6. Click Next. 7. On the wizard's Configure XenApp/XenDesktop Farm page, do one of the following: To add a XenApp or XenDesktop farm, click Add. To modify an existing XenApp or XenDesktop farm, select the farm, and then click Open. 8. In the Create XenApp/XenDesktop Farm or Configure XenApp/XenDesktop Farm dialog box, specify values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Name* (You cannot change the name of an existing XenApp or XenDesktop farm.) XML Service Addresses* XML Service Port Transport Load Balance * A required parameter. 9. Click Next, and then click Finish. 10. Verify that the Web interface site you configured is correct by selecting the site and viewing the Details section at the bottom of the pane. To view the Web interface site, in the navigation pane, expand System, expand Web Interface, and then click Sites.
157
Chapter 6
Web Interface
To configure a Web interface site for LAN users using HTTP by using the command line
1. Add a Web interface site. Set Direct or Alternate or Translated for the defaultAccessMethod parameter. At the NetScaler command prompt, type: add wi site <sitePath> -siteType ( XenAppWeb | XenAppServices ) publishedResourceType ( Online | Offline | DualMode ) -kioskMode ( ON | OFF) Example add wi site WINS1 -siteType XenAppWeb -publishedResourceType Online -kioskMode ON 2. Bind XenApp or XenDesktop farms to the Web interface site. At the NetScaler command prompt, type: bind wi site <sitePath> <farmName> <xmlServerAddresses> -xmlPort <value> transport ( HTTP | HTTPS) -loadBalance ( ON | OFF ) Example bind wi site WINS1 XA1 10.102.46.6 -xmlPort 80 -transport HTTP -LoadBalance OFF bind wi site WINS1 XD1 10.102.46.50 -xmlPort 80 -transport HTTP -LoadBalance OFF 3. Create a service that is a logical representation of the Web interface service running on the NetScaler appliance. At the NetScaler command prompt, type: add service <name> <IP address> <serviceType> <port> Example add service WI_Loopback_Service 127.0.0.1 HTTP 8080 For more information, see the Load Balancing chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 4. Add an HTTP vserver. At the NetScaler command prompt, type: add lb vserver <virtualServerName> <protocol> <IPAddress> <port> Example add lb vserver HTTP_WI HTTP 10.102.29.5 80 For more information, see the Load Balancing chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 5. Bind the Web interface service to the HTTP vserver. At the NetScaler command prompt, type: bind lb vserver <virtualServerName> <serviceName> Example bind lb vserver HTTP_WI WI_Loopback_Service For more information, see the Load Balancing chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670.
158
To configure a Web interface site for LAN users using HTTPS by using the configuration utility
1. In the navigation pane, click Web Interface. 2. In the details pane, click Web Interface Wizard. 3. On the wizard Introduction page, click Next. 4. On the wizard Configure Web Interface Site page, specify the values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: 159
Chapter 6
Web Interface Site Path* (You cannot change the name of an existing Web interface site.) Site Type Published Resource Type Kiosk Mode * A required parameter. 5. Select Direct Mode and specify values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Virtual Server Protocol (select HTTPS) IP Address Port Note: When you create the HTTPS vserver by using the configuration utility, the configuration utility automatically creates a service, which logically represents the Web interface service running on the NetScaler appliance, and binds the service to the HTTPS virtual server. For more information about services and virtual servers, see the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 6. Click Next. 7. On the wizard's Specify a server Certificate page, you create or specify an existing SSL certificatekey pair. The SSL certificatekey pair is automatically bound to the HTTPS vserver. For more information, see Binding an SSL Certificate Key Pair to the Virtual Server in the Secure Sockets Layer (SSL) Acceleration chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/ CTX128670. 8. Click Next. 9. On the wizard's Configure XenApp/XenDesktop Farm page, do one of the following: To add a XenApp or XenDesktop farm, click Add. To modify an existing XenApp or XenDesktop farm, select the farm, and then click Open.
160
Citrix NetScaler Administration Guide 10. In the Create XenApp/XenDesktop Farm or Configure XenApp/XenDesktop Farm dialog box, specify values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Name* (You cannot change the name of an existing XenApp or XenDesktop farm.) XML Service Addresses* XML Service Port Transport Load Balance * A required parameter. 11. Click Next, and then click Finish. 12. Verify that the Web interface site you configured is correct by selecting the site and viewing the Details section at the bottom of the pane. To view the Web interface site, in the navigation pane, expand System, expand Web Interface, and then click Sites.
To configure a Web interface site for LAN users using HTTPS by using the command line
1. Add a Web interface site. Set Direct or Alternate or Translated for the defaultAccessMethod parameter. At the NetScaler command prompt, type: add wi site <sitePath> -siteType ( XenAppWeb | XenAppServices ) publishedResourceType ( Online | Offline | DualMode ) -kioskMode ( ON | OFF) Example add wi site WINS1 -siteType XenAppWeb -publishedResourceType Online -kioskMode ON 2. Bind XenApp or XenDesktop farms to the Web interface site. At the NetScaler command prompt, type: bind wi site <sitePath> <farmName> <xmlServerAddresses> -xmlPort <value> transport ( HTTP | HTTPS) -loadBalance ( ON | OFF ) Example bind wi site WINS1 XA1 10.102.46.6 -xmlPort 80 -transport HTTP -LoadBalance OFF bind wi site WINS1 XD1 10.102.46.50 -xmlPort 80 -transport HTTP -LoadBalance OFF 3. Create a service that is a logical representation of the Web interface service running on the NetScaler appliance. At the NetScaler command prompt, type: add service <name> <IPAddress> <serviceType> <port> Example add service WI_Loopback_Service 127.0.0.1 HTTP 8080 For more information, see the Load Balancing chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 161
Chapter 6
Web Interface 4. Add an HTTPS vserver. At the NetScaler command prompt, type: add lb vserver <virtualServerName> <protocol> <IPAddress> <port> Example add lb vserver HTTPS_WI SSL 10.102.29.3 443 For more information, see Adding an SSL-Based Virtual Server in the Secure Sockets Layer (SSL) Acceleration chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 5. Bind the Web interface service to the HTTPS vserver. At the NetScaler command prompt, type: bind lb vserver <virtualServerName> <serviceName> Example bind lb vserver HTTPS_WI WI_Loopback_Service For more information, see Binding Services to the Virtual Server in the Secure Sockets Layer (SSL) Acceleration chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 6. Create an SSL certificate key pair. At the NetScaler command prompt, type: add ssl certkey <certificate-KeyPairName> -cert <certificateFileName> -key <privateKeyFileName> Example add ssl certkey SSL-Certkey-1 -cert /nsconfig/ssl/test1.cer key /nsconfig/ssl/test1 For more information, see Adding a Certificate Key Pair in the Secure Sockets Layer (SSL) Acceleration chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/CTX128670. 7. Bind the SSL certificate key pair to the HTTPS vserver. At the NetScaler command prompt, type: bind ssl vserver <vserverName> -certkeyName <certificate- KeyPairName> Example bind ssl vserver HTTPS_WI -certkeyName SSL-Certkey-1 For more information, see Binding an SSL Certificate Key Pair to the Virtual Server in the Secure Sockets Layer (SSL) Acceleration chapter of the Citrix NetScaler Traffic Management Guide at http://support.citrix.com/article/ CTX128670. 8. Add a rewrite action. At the NetScaler command prompt, type: add rewrite action <name> <type> <target> [<stringBuilderExpr>] [(-pattern <expression>] Example add rewrite action Replace_HTTP_to_HTTPS INSERT_AFTER "HTTP.RES.HEADER(\"Location\").Value(0).Prefix(4)" "\"s\""
162
Citrix NetScaler Administration Guide For more information, see Configuring a Rewrite Action in the Rewrite chapter of the Citrix NetScaler AppExpert Guide at http://support.citrix.com/article/ CTX128682. 9. Create a rewrite policy and bind the rewrite action to it. At the NetScaler command prompt, type: add rewrite policy <name> <expression> <rewriteAction> Example add rewrite policy rewrite_location "HTTP.RES.STATUS == 302 && HTTP.RES.HEADER(\"Location\").Value(0).startswith(\"http:\")" Replace_HTTP_to_HTTPS For more information, see Configuring a Rewrite Policy in the Rewrite chapter of the Citrix NetScaler AppExpert Guide at http://support.citrix.com/article/ CTX128682. 10. Bind the rewrite policy to the HTTPS vserver. At the NetScaler command prompt, type: bind lb vserver <VserverName> -policyname <rewritePolicyName> -priority <value> -type response Example bind lb vserver HTTPS_WI -policyname rewrite_location priority 10 -type response For more information, see Binding a Rewrite Policy in the Rewrite chapter of the Citrix NetScaler AppExpert Guide at http://support.citrix.com/article/ CTX128682.
163
Chapter 6
Web Interface Figure 6-4. A Web Interface Site Configured for Remote Users Using AGEE
To configure a Web interface site for remote users using AGEE by using the configuration utility
1. In the navigation pane, click Web Interface. 2. In the details pane, click Web Interface Wizard. 3. On the wizard Introduction page, click Next. 4. On the wizard Configure Web Interface Site page, specify the values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Site Path* (You cannot change the name of an existing Web interface site.) Site Type Published Resource Type Kiosk Mode * A required parameter. 5. Select Gateway Direct Mode and specify values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: 164
Citrix NetScaler Administration Guide Authentication Point Access Gateway URL Add DNS Entry Trust SSL Certificate STA Server URL STA Server URL (2) Session Reliability Use two STA Servers 6. Click Next. 7. On the wizard's Configure XenApp/XenDesktop Farm page, do one of the following: To add a XenApp or XenDesktop farm, click Add. To modify an existing XenApp or XenDesktop farm, select the farm, and then click Open. 8. In the Create XenApp/XenDesktop Farm or Configure XenApp/XenDesktop Farm dialog box, specify values for the following parameters, which correspond to parameters described in Parameters for configuring Web interface sites on page 153 as shown: Name* (You cannot change the name of an existing XenApp or XenDesktop farm.) XML Service Addresses* XML Service Port Transport Load Balance * A required parameter. 9. Click Next, and then click Finish. 10. Verify that the Web interface site you configured is correct by selecting the site and viewing the Details section at the bottom of the pane. To view the Web interface site, in the navigation pane, expand System, expand Web Interface, and then click Sites.
To configure a Web interface site for remote users using AGEE by using the command line
1. Add a Web interface site. Set GatewayDirect or GatewayAlternate or GatewayTranslated for the defaultAccessMethod parameter. At the NetScaler command prompt, type: add wi site <sitePath> <agURL> <staURL> -sessionReliability ( ON | OFF ) useTwoTickets ( ON | OFF ) -secondSTAURL <string> -authenticationPoint ( WebInterface | AccessGateway ) -siteType ( XenAppWeb | XenAppServices ) publishedResourceType ( Online | Offline | DualMode ) -kioskMode ( ON | OFF ) 165
Chapter 6
Web Interface Example add wi site WINS1 https://ag.mycompany.com http:// ag.staserver.com -sessionReliability OFF -authenticationPoint AccessGateway -siteType XenAppWeb -publishedResourceType Online -kioskMode ON 2. Bind XenApp or XenDesktop farms to the Web interface site. At the NetScaler command prompt, type: bind wi site <sitePath> <farmName> <xmlServerAddresses> -xmlPort <value> transport ( HTTP | HTTPS) -loadBalance ( ON | OFF ) Example bind wi site WINS1 XA1 10.102.46.6 -xmlPort 80 -transport HTTP -LoadBalance OFF bind wi site WINS1 XD1 10.102.46.50 -xmlPort 80 -transport HTTP -LoadBalance OFF
166
Chapter 7
AppFlow
Topics:
How AppFlow Works Configuring the AppFlow Feature The Citrix NetScaler appliance is a central point of control for all application traffic in the data center. It collects flow and user-session level information valuable for application performance monitoring, analytics, and business intelligence applications. AppFlow transmits the information by using the Internet Protocol Flow Information eXport (IPFIX) format, which is an open Internet Engineering Task Force (IETF) standard defined in RFC 5101. IPFIX (the standardized version of Cisco's NetFlow) is widely used to monitor network flow information. AppFlow defines new Information Elements to represent application-level information. Using UDP as the transport protocol, AppFlow transmits the collected data, called flow records, to one or more IPv4 collectors. The collectors aggregate the flow records and generate real-time or historical reports. AppFlow provides visibility at the transaction level for HTTP, SSL, TCP, and SSL_TCP flows. You can sample and filter the flow types that you want to monitor. AppFlow use actions and policies to send records for a selected flow to specific set of collectors. An AppFlow action specifies which set of collectors will receive the AppFlow records. Policies, which are based on Advanced expressions can be configured to select flows for which flow records will be sent to the collectors specified by the associated AppFlow action. To limit the types of flows, you can enable AppFlow for a virtual server. AppFlow can also provide statistics for the virtual server. You can also enable AppFlow for a specific service, representing an application server, and monitor the traffic to that application server. Note: This feature is supported only on NetScaler nCore builds.
167
Chapter 7
AppFlow
As shown in the figure, the network flow identifiers for each leg of a transaction depend on the direction of the traffic. The different flows that form a flow record are: Flow1: <Client-IP, Client-Port, VIP-IP, VIP-port, Protocol> Flow2: <NS-MIP/SNIP, NS-port, Server-IP, Server-Port, Protocol> Flow3: <Server-IP, Server-Port, NS-MIP/SNIP, NS-Port, Protocol> Flow4: <VIP-IP, VIP-port, Client-IP, Client-Port, Protocol> 168
Citrix NetScaler Administration Guide To help the collector link all four flows in a transaction, AppFlow adds a custom transactionID element to each flow. For application-level content switching, such as HTTP, it is possible for a single client TCP connection to be load balanced to different backend TCP connections for each request. AppFlow provides a set of records for each transaction.
Flow Records
AppFlow records contain standard NetFlow or IPFIX information, such as time stamps for the beginning and end of a flow, packet count, and byte count. AppFlow records also contain application-level information (such as HTTP URLs, HTTP request methods and response status codes, server response time, and latency) IPFIX flow records are based on templates that need to be sent before sending flow records.
Templates
AppFlow defines a set of templates, one for each type of flow. Each template contains a set of standard Information Elements (IEs) and Enterprise-specific Information Elements (EIEs). IPFIX templates define the order and sizes of the Information Elements (IE) in the flow record. The templates are sent to the collectors at regular intervals, as described in RFC 5101. A template can include the following EIEs: transactionID An unsigned 32-bit number identifying an application-level transaction. For HTTP, this corresponds to a request and response pair. All flow records that correspond to this request and response pair have the same transaction ID. In the most common case, there are four uniflow records that correspond to this transaction. If the NetScaler generates the response by itself (served from the integrated cache or by a security policy), there may be only two flow records for this transaction. connectionID An unsigned 32-bit number identifying a layer-4 connection (TCP or UDP). The NetScaler flows are usually bidirectional, with two separate flow records for each direction of the flow. This information element can be used to link the two flows. For the NetScaler, connectionID is an identifier for the connection data structure to track the progress of a connection. In an HTTP transaction, for instance, a given connectionID may have multiple transactionID elements corresponding to multiple requests that were made on that connection. tcpRTT The round trip time, in milliseconds, as measured on the TCP connection. This can be used as a metric to determine the client or server latency on the network. httpRequestMethod An 8-bit number indicating the HTTP method used in the transaction. An options template with the number-to-method mapping is sent along with the template.
169
Chapter 7
AppFlow httpRequestSize An unsigned 32-bit number indicating the request payload size. httpRequestURL The HTTP URL requested by the client. httpUserAgent The source of incoming requests to the Web server. httpResponseStatus An unsigned 32-bit number indicating the response status code. httpResponseSize An unsigned 32-bit number indicating the response size. httpResponseTimeToFirstByte An unsigned 32-bit number indicating the time taken to receive the first byte of the response. httpResponseTimeToLastByte An unsigned 32-bit number indicating the time taken to receive the last byte of the response. flowFlags An unsigned 64-bit flag used to indicate different flow conditions.
170
To enable or disable the AppFlow feature by using the NetScaler command line
At the NetScaler command prompt, type one of the following commands: w enable ns feature appflow w disable ns feature appflow
Specifying a Collector
A collector receives flow records generated by the NetScaler appliance. To be able to send flow records, you must specify at least one collector. You can specify up to four. However, you cannot export the same data to multiple collectors. You can remove unused collectors.
171
Chapter 7
AppFlow
Example > add appflow action apfl-act-collector-1-and-3 collectors collector-1 collecter-3 Done > show appflow action 1) Name: apfl-act-collector-1 Collectors: collecter-1 Hits: 0 Action Reference Count: 2 Name: apfl-act-collector-2-and-3 Collectors: collector-2, collecter-3 Hits: 0 Action Reference Count: 1 Name: apfl-act-collector-1-and-3 Collectors: collector-1, collecter-3 Hits: 0 Action Reference Count: 1
2)
3)
Done
173
Chapter 7
AppFlow
Citrix NetScaler Administration Guide 1) Name: apfl-pol-myPolicy5 Hits: 0 Undef Hits: 0 Active: Yes Name: apfl-pol-myPolicy10 Hits: 0 Undef Hits: 0 Active: Yes Name: apfl-pol-myPOL30 Hits: 0 Undef Hits: 0 Active: Yes Name: apfl-pol-myPolicy50 Hits: 0 Undef Hits: 0 Active: No Name: apfl-pol-tcp-dsprt Hits: 0 Undef Hits: 0 Active: No
2)
3)
4)
5)
Done
Chapter 7
AppFlow comment Any comments that you may want to associate with the policy. Maximum length: 255 characters. To include spaces in a comment that you type on the NetScaler command line, enclose the entire comment inside quotation marks. The quotation marks do not become part of the comment. They are not required if you use the configuration utility.
Citrix NetScaler Administration Guide CLIENT The computer that sent the request. Choose this if you want to examine some aspect of the sender of the request. When you make your choice, the rightmost list box lists appropriate terms for the next part of your expression. 2. In the second list box, choose the second term for your expression. The choices depend upon which choice you made in the previous step, and are appropriate to the context. After you make your second choice, the Help window below the Construct Expression window (which was blank) displays help describing the purpose and use of the term you just chose. 3. Continue choosing terms from the list boxes that appear to the right of the previous list box, or typing strings or numbers in the text boxes that appear to prompt you to enter a value, until your expression is finished. For more information about the PI expressions language and creating expressions for AppFlow policies, see the Citrix NetScaler Policy Configuration and Reference Guide. For a link to the guide, see the Documentation Library.
Chapter 7
AppFlow
To bind an AppFlow policy to a specific virtual server by using the NetScaler command line
At the NetScaler command prompt, type the following command to bind an appflow policy to a specific virtual server and verify the configuration: bind lb vserver <name> -policyname <policy_name> -priority <priority>
Citrix NetScaler Administration Guide 5. Click one of the policies on the list. That policy is inserted into the list of globally bound AppFlow policies. 6. Click Apply Changes. 7. Click Close. A message appears in the status bar, stating that the configuration has been successfully implemented.
To bind an AppFlow policy to a specific virtual server by using the configuration utility
1. In the navigation pane, expand Load Balancing, and then click Virtual Servers. 2. On the Load Balancing Virtual Servers page, select the virtual server to which you want to bind the AppFlow policy, and then click Open. 3. In the Configure Virtual Server (Load Balancing) dialog box, select the Policies tab to display the policies bound to that particular virtual server.. 4. Click Insert Policy to insert a new row and display a drop-down list of all unbound AppFlow policies. 5. From the drop-down list that appears under Policy Name, select the policy that you want to bind to this virtual server. 6. Click OK, and then click Close. A message appears in the status bar, stating that the configuration has been successfully implemented
To enable AppFlow for a virtual server by using the NetScaler command line
At the NetScaler command prompt, type: set <feature_name> vserver <vServerName> <protocol> <IPAddress> <port> appflowLog ENABLED Example set cs vserver Vserver-CS-1 HTTP 10.102.29.161 80 appflowLog ENABLED
179
Chapter 7
AppFlow For example, expand Content Switching to enable AppFlow for a content switching virtual server, and then click Virtual Servers. 2. In the details pane, do one of the following: To enable AppFlow for a new virtual server, click Add. To enable AppFlow for an existing virtual server, select the virtual server, and then click Open. 3. In the Create Virtual Server (feature_name) dialog box or the Configure Virtual Server (feature_name) dialog box, select the AppFlow Logging check box. 4. Click Create or OK, and then click Close.
180
Citrix NetScaler Administration Guide w set appflowParam [-templateRefresh <secs>] [-appnameRefresh <secs>] [flowRecordInterval <secs>] [-udpPmtu <positive_integer>] [-httpUrl ( ENABLED | DISABLED )] [-httpCookie ( ENABLED | DISABLED )] [-httpReferer ( ENABLED | DISABLED )] [-httpMethod ( ENABLED | DISABLED )] [-httpHost ( ENABLED | DISABLED )] [-httpUserAgent ( ENABLED | DISABLED )] [-clientTrafficOnly ( YES | NO)] w show appflowParam Example > set appflowParam -templateRefresh 240 -udpPmtu 128 -httpUrl enabled Done > show appflowparam AppFlow parameters IPFIX template refresh interval: 600 seconds IPFIX UDP Path MTU: 1472 bytes HTTP URL logging: DISABLED HTTP cookie logging: DISABLED HTTP referer logging: DISABLED HTTP method logging: ENABLED HTTP host logging: ENABLED HTTP user-agent logging: ENABLED Log only client-side traffic: NO Done
To return AppFlow parameters to their default values by using the NetScaler command line
Type the unset appflowParam command and the names of the parameters to be returned to the default values.
AppFlow Parameters
templateRefresh The refresh interval, in seconds, at which to export the template data. Because data transport is in the UDP protocol, the templates must be resent at regular intervals. Minimum value: 60. Maximum value: 3600. Default: 600. appnameRefresh Interval at which Appnames are sent to the configured collectors, in seconds. Minimum value: 60. Maximum value: 3600. Default: 600. flowRecordInterval Interval at which flow records are sent to the configured collectors, in seconds. Minimum value: 60. Maximum value: 3600. Default: 600. udpPmtu The maximum length of the UDP datagram. Default: 1472. httpUrl The http URL received by the NetScaler appliance from the client. Possible values: ENABLED, DISABLED. Default: DISABLED. 181
Chapter 7
AppFlow httpCookie Include the cookie that was in the HTTP request received by the NetScaler appliance from the client. Possible values: ENABLED, DISABLED. Default: DISABLED. httpReferer Include the Web page that was last visited by the client. Possible values: ENABLED, DISABLED. Default: DISABLED. httpMethod Include the method that was specified in the HTTP request received by the NetScaler appliance from the client. Possible values: ENABLED, DISABLED. Default: DISABLED. httpHost Include the host identified in the HTTP request received by the NetScaler appliance from the client. Possible values: ENABLED, DISABLED. Default: DISABLED. httpUserAgent Include the client application through which the HTTP request was received by the NetScaler appliance. Possible values: ENABLED, DISABLED. Default: DISABLED. clientTrafficOnly Generate AppFlow records only for the traffic from the client. Possible values: YES, NO. Default: NO.
Chapter 8
Reporting Tool
Topics:
Using the Reporting Tool Stopping and Starting the Data Collection Utility Use the Citrix NetScaler Reporting tool to view NetScaler performance statistics data as reports. Statistics data are collected by the nscollect utility and are stored in a database. When you want to view certain performance data over a period of time, the Reporting tool pulls out specified data from the database and displays them in charts. Reports are a collection of charts. The Reporting tool provides built-in reports as well as the option to create custom reports. In a report, you can modify the charts and add new charts. You can also modify the operation of the data collection utility, nscollect, and stop or start its operation.
183
Chapter 8
Reporting Tool
Citrix NetScaler Administration Guide w Toggle between a tabular view of data and a graphical view of data. w Change the graphical display type, such as bar chart or line chart. w Customize charts in a report. w Export the chart as an Excel comma-separated value (CSV) file. w View the charts in detail by zooming in, zooming out, or using a drag-and-drop operation (scrolling). w Set a report as the default report for viewing whenever you log on. w Add or remove counters. w Print reports. w Refresh reports to view the latest performance data.
185
Chapter 8
Reporting Tool 1. In the Reporting tool, on the report toolbar, click Create, or if you want to create a new custom report based on an existing report, open the existing report, and then click Save As. 2. In Report Name box, type a name for the custom report. 3. Do one of the following: To add the report to an existing folder, in Create in or Save in, click the down arrow to choose an existing folder, and then click OK. To create a new folder to store the report, click the Click to add folder icon, in Folder Name, type the name of the folder, and in Create in, specify where you want the new folder to reside in the hierarchy, and then click OK. Note: You can create up to 128 folders.
Last Day
Last Week
186
Time interval
Displays Statistics data collected for the last month (31 days). Statistics data collected for the last year (365 days). Statistics data collected for a time period that you are prompted to specify.
Last Month
Last Year
Custom
Chapter 8
Reporting Tool
Note: When you export the file, it is exported in a .gz file format.
Adding a Chart
When you add a chart to a report, the System Overview chart appears with the CPU Usage counter plotted for the last one day. To plot a different group of statistics or select a different counter, see Modifying a Chart on page 188. Note: If you add charts to a built-in report, and you want to retain the report, you must save the report as a custom report. Use the following procedure to add a chart to a report.
Modifying a Chart
You can modify a chart by changing the functional group for which the statistics are displayed and by selecting different counters.
To modify a chart
1. In the left pane of the Reporting tool, click a report. 2. Under the chart that you want to modify, click Counters. 3. In the dialog box that appears, in the Title box, type a name for the chart. 4. Next to Plot chart for, do one of the following: To plot counters for global counters, such as Integrated Cache and Compression, click System global statistics. To plot entity counters for entity types, such as Load Balancing and GSLB, click System entities statistics. 5. In Select group, click the desired entity.
188
Citrix NetScaler Administration Guide 6. Under Counters, in Available, click the counter name(s) that you want to plot, and then click the > button. 7. If you selected System entities statistics in step 4, on the Entities tab, under Available, click the entity instance name(s) you want to plot, and then click the > button. 8. Click OK.
Viewing a Chart
You can specify the graphical formats of the plotted counters in a chart. Charts can be viewed as line charts, spline charts, step-line charts, scatter charts, area charts, bar charts, stacked area charts, and stacked bar charts. You can also zoom in, zoom out, or scroll inside the plot area of a chart. You can zoom in or out for all data sources for 1 hour, 1 day, 1 week, 1 month, 1 year, and 3 years. Other options for customizing the view of a chart include customizing the axes of the charts, changing the background and edge color of the plot area, customizing the color and size of the grids, and customizing the display of each data set (counter) in a chart. Data set numbers, such as Data Set 1, correspond to the order in which the counters in your graph are displayed at the bottom of the chart. For example, if CPU usage and Memory usage are displayed in first and second order at the bottom of the chart, CPU usage is equal to Data Set 1 and Memory usage is equal to Data Set 2. Whenever you modify a built-in report, you need to save the report as a custom report to retain your changes.
189
Chapter 8
Reporting Tool 3. Once you have the desired range of time for which you want to view detailed data, on the report toolbar, click Tabular View. Tabular view displays the data in numeric form in rows and columns.
Citrix NetScaler Administration Guide example, if CPU usage and Memory usage are displayed in first and second order at the bottom of the chart, CPU usage is equal to Data Set 1 and Memory usage is equal to Data Set 2. To plot each data set in its own hidden y-axis, click Multiple Axes, and then click Enable.
To change the background color, edge color, and gridlines for a plot area of a chart
1. In the left pane of the Reporting tool, select a report. 2. In the right pane, under the chart for which you want to customize the plot area, click Customize. 3. On the Plot Area tab, under Category, click one or more of the following: To change the background color and edge color of the chart, click Background Color and Edge Color, and then select the options for color, transparency, and effects. To change the horizontal or vertical grids of the chart, click Horizontal Grids or Vertical Grids, and then select the options for displaying the grids, grid width, grid color, transparency, and effects.
Chapter 8
Reporting Tool To export chart data to Excel 1. In the left pane of the Reporting tool, select a report. 2. In the right pane, under the chart with the data you want to export to Excel, click Export.
Deleting a Chart
If you do not want to use a chart, you can remove it from the report. You can permanently remove charts from custom reports only. If you delete a chart from a builtin report and want to retain the changes, you need to save the report as a custom report.
To delete a chart
1. In the left pane of the Reporting tool, select a report. 2. In the right pane, under the chart that you want to delete, click the Delete icon.
Examples
To display the trend report for CPU usage and memory usage for the last week
1. In the left pane of the Reporting tool, under Built-in Reports, expand System. 2. Click the report CPU vs. Memory Usage and HTTP Requests Rate. 3. In the right pane, on the report toolbar, click Duration, and then click Last Week.
To compare the bytes received rate and the bytes transmitted rate between two interfaces for the last week
1. In the right pane, on the report toolbar, click Create. 2. In the Report Name box, type a name for the custom report (for example, Custom_Interfaces), and then click OK. The report is created with the default System Overview chart, which displays the CPU Usage counter plotted for the last hour. 3. Under System Overview, on the chart toolbar, click Counters. 4. In the counter selection pane, in Title, type a name for the chart (for example, Interfaces bytes data). 5. In Plot chart for, click System entities statistics, and then in Select Group, select Interface. 6. On the Entities tab, click the interface name(s) you want to plot (for example, 1/1 and 1/2), and then click the > button. 7. On the Counters tab, click Bytes received (Rate) and Bytes transmitted (Rate) and then click the > button.
192
Citrix NetScaler Administration Guide 8. Click OK. 9. On the report toolbar, click Duration, and then click Last Week.
193
Chapter 8
Reporting Tool
Entity name ACL6 Priority Queuing Policies RNAT IP Addresses SureConnect Policies Services Service Groups System CPU VLAN VPN Virtual Servers
The nscollect utility retrieves n number of entity counters and creates the entity database. If the first n counters change in the subsequent fetch, the database stores more than n entries for that entity type. However, you need to delete the unused entity counters manually. Note: The Reporting tool supports only numerical counters. By default, nscollect retrieves data at every 5-minute interval. Data is maintained in 5-minute granularity for one day, hourly for the last 30 days, and daily for three years. When you start the NetScaler, the nscollect utility automatically starts. However, if data is not updated accurately, or there is corrupted data displayed in the reports, you can stop and then restart the utility. You may also want to stop nscollect to back up the databases or to create a new data source.
To stop nscollect
At a NetScaler command prompt, type the following: /netscaler/nscollect stop You can start nscollect on either the local system or a remote system.
Example
/netscaler/nscollect start -U 10.102.29.170:nsroot:nsroot -ds default
195