Package: netscaler-tool
System RequirementsPython >= 2.6 and Python < 3Python modules are in requirements.txtNetScaler RequirementsKnown to work with NS9.3 and NS10.1System user account that has appropriate accessDepending on your use case, you might only need a system user that
has read-only permissionsInstallationFrom PyPINotesDon’t forget tomodify/etc/netscalertool.confafter installationsudo pip install netscaler-tool
sudo mkdir -p /var/log/netscaler-tool
sudo touch /var/log/netscaler-tool/netscaler-tool.log
sudo chown <user>:<group> /var/log/netscaler-tool/netscaler-tool.log
sudo chmod <mode> /var/log/netscaler-tool/netscaler-tool.log
sudo wget -O /etc/netscalertool.conf  https://github.com/tagged/netscaler-tool/blob/master/netscalertool.conf.exampleFrom RPMNotesPlease replace<tag>with the version you wish to useThe rpm will create:A sample/etc/netscalertool.confthat needs to be modifiedDirectory/var/log/netscaler-tool. It is up to you to create/var/log/netscaler-tool/netscaler-tool.logwith the correct
permissionsDownload tar.gz specific version of the repohttps://github.com/tagged/netscaler-tool/releases/tag/v<tag>.tar.gzUse included rpm spec (python-netscalertool.spec) file and newly
downloaded tar.gz file to build a rpmtar xzvfnetscaler-tool-\<tag\>.tar.gznetscaler-tool-\<tag\>/python-netscalertool.spechttp://wiki.centos.org/HowTos/SetupRpmBuildEnvironmentFrom Sourcegit clonehttps://github.com/tagged/netscaler-tool.gitcd netscaler-toolsudo python setup.py installsudo mkdir -p /var/log/netscaler-toolsudo touch /var/log/netscaler-tool/netscaler-tool.logsudo chown <user>:<group> /var/log/netscaler-tool/netscaler-tool.logsudo chmod <mode> /var/log/netscaler-tool/netscaler-tool.logsudo cp netscalertool.conf.example /etc/netscalertool.confModify /etc/netscalertool.confConfigurationUpdateuserto a NetScaler system userUpdatepasswdfor the NetScaler system user(Optional)Updatemanage_vserverswith a list of vserver you want to
manageUpdateexternal_nodeswith a script that returns a newline
separated list of nodes that are allowed to be managed. If not
set, all nodes are manageableUsageThe netscaler-tool is really just a wrapper around netscalerapi.py. If
you would like to write your own tool, but not have to worry about
interacting with the NetScaler Nitro API, you can use netscalerapi.py.The netscaler-tool can take -h or –help optional argument at anytime:./netscalertool.py --help
usage: netscalertool.py [-h] [--user USER] [--passwd PASSWD] [--nodns]
                        [--debug] [--dryrun]
                        NETSCALER {show,stat,compare,enable,disable,bounce}
                        ...

positional arguments:
  NETSCALER             IP or name of NetScaler.
  {show,stat,compare,enable,disable,bounce}
    show                sub-command for showing objects
    stat                sub-command for showing object stats
    compare             sub-command for comparing objects
    enable              sub-command for enable objects
    disable             sub-command for disabling objects
    bounce              sub-command for bouncing objects

optional arguments:
  -h, --help            show this help message and exit
  --user USER           NetScaler user account.
  --passwd PASSWD       Password for user. Default is to fetch from
                        /etc/netscalertool.conf
  --nodns               Won't try to resolve any NetScaler objects
  --debug               Shows what's going on
  --dryrun              Dryrun

./netscalertool.py 192.168.1.10 show --help
usage: netscalertool.py NETSCALER show [-h]

                                       {lb-vservers,lb-vserver,cs-vservers,server,servers,services,primary-node,ssl-certs,saved-config,running-config,system}
                                   ...

positional arguments:
  {lb-vservers,lb-vserver,cs-vservers,server,servers,services,primary-node,ssl-certs,saved-config,running-config,system}
    lb-vservers         Shows all lb vservers
    lb-vserver          Shows stat(s) of a specified lb vserver
    cs-vservers         Shows all cs vservers
    server              Shows server info
    servers             Shows all servers
    services            Shows all services
    primary-node        Shows which of the two nodes is primary
    ssl-certs           Shows ssl certs and days until expiring
    saved-config        Shows saved ns config
    running-config      Shows running ns config
    system              Shows system counters

optional arguments:
  -h, --help            show this help message and exit