This article contains information about applying a set of configurations on a NetScaler appliance by using the batch command.
On a replaced NetScaler appliance, you might need to reapply multiple configurations of the faulty appliance or you might need to replicate the same configurations across multiple NetScaler appliances. You can run the batch command to apply multiple configurations to a NetScaler appliance. This not only saves time but also avoids the error that might creep in when performing the same task manually.
To apply multiple configurations to a NetScaler appliance by using the batch command, complete the following procedure:
Switch to the shell prompt of the NetScaler appliance.
Run the following command to create a file similar to following:
vi /tmp/config
Add the following entries to the file:
add snmp community public ALL
add snmp trap generic <Server_IP_Address>
add snmp trap specific <Server_IP_Address>
show run | grep snmp
Save and close the file.
Switch to the command line interface of the appliance.
Run the following command:
>batch -f /tmp/config
exec: add snmp community public ALL Done exec: add snmp trap generic <Server_IP_Address> Done exec: add snmp trap specific <Server_IP_Address> Done exec: show run | grep snmp add snmp community public ALL add snmp trap generic <Server_IP_Address> add snmp trap specific <Server_IP_Address> set snmp alarm HA-VERSION-MISMATCH -time 86400 set snmp alarm HA-SYNC-FAILURE -time 86400 set snmp alarm HA-NO-HEARTBEATS -time 86400 set snmp alarm HA-BAD-SECONDARY-STATE -time 86400 Done
Note:
Similarly, if you want to remove some configuration, you can create a file that include the rm command for the required configuration. You can run the file with the batch command to remove the set of configurations.
If you want to save the output of the batch command to a file name then please use "-outfile" option.
Example: batch -fileName /tmp/config -outfile /var/batch_output