Configure user monitor
-
Write a script that can monitor the services bound to it.
-
Upload the script to the
/nsconfig/monitorsdirectory on the NetScaler appliance. -
Provide executable permission to the script.
scriptargs configured for the monitor type USER is displayed in the running configuration and ns.conf files.
To configure a user monitor by using the CLI
add lb monitor <monitorName> USER -scriptname <NameOfScript> -scriptargs <Arguments> -secureargs <Arguments>
add monitor Monitor-User-1 USER -scriptname nsftp.pl -scriptargs "file=/home/user/
sample.txt;user=root;password=passwd"
add monitor Monitor-User-1 USER -scriptname nsftp.pl -scriptargs "file=/home/user/
sample.txt -secureargs "user=root;password=passwd"
secureargs parameter stores the script arguments in an encrypted format instead of the plain text format. Citrix recommends you use the secureargs parameter instead of the scriptargs parameter for any sensitive data that is related to the scripts, for example, user name and password. If you choose to use both the parameters together, the script specified in -scriptname must accept the arguments in the order: <scriptargs> <secureargs>. Specify the first few arguments in the <scriptargs> parameter; and the rest of the arguments in the <secureargs> parameter. That is, maintain the order defined for the arguments. Secure arguments are applicable only for the internal dispatcher. If you want to use an external dispatcher, Citrix recommends securing the vulnerable data in your scripts.
scriptargs parameter with the arguments: "a=b;c=d;e=f".
add monitor mon1 USER -scriptargs "a=b;c=d;e=f"
secureargs parameter instead of scriptargs parameter, do the following:
-
Nullify the
scriptargsparameter. -
Provide all the arguments under
secureargsparameter.
set monitor mon1 USER -scriptargs "" -secureargs "a=b;c=d;e=f"
To configure a user monitor by using the GUI
-
Navigate to Traffic Management> Load Balancing> Monitors, click Add.
-
In the Create monitor page, do the following:
-
Select the monitor type as USER.
-
Choose the script from the drop-down menu or upload your own script.
-
Enter appropriate values for the Script Arguments and Secure Arguments fields.
-
Click Create.
A user monitor is created. -