How to Apply a Set of Configurations on a NetScaler Appliance by Using the batch Command

How to Apply a Set of Configurations on a NetScaler Appliance by Using the batch Command

book

Article ID: CTX122352

calendar_today

Updated On:

Description

This article contains information about applying a set of configurations on a NetScaler appliance by using the batch command.

Background

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.


Instructions

To apply multiple configurations to a NetScaler appliance by using the batch command, complete the following procedure:

  1. Switch to the shell prompt of the NetScaler appliance.

  2. Run the following command to create a file similar to following:
    vi /tmp/config

  3. 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

  4. Save and close the file.

  5. Switch to the command line interface of the appliance.

  6. 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

Issue/Introduction

This article contains information about applying a set of configurations on a NetScaler appliance by using the batch command.