API – Citrix NetScaler SD-WAN NITRO API with Java

NITRO API

The NetScaler SD-WAN NITRO API allows you to configure and monitor the appliance programmatically. NITRO provides its functionality through Representational State Transfer (REST) interfaces.

To use the NITRO API, the client application needs only the following:

  • Access to a NetScaler SD-WAN system, version 9.3 or later.
  • Have a system to generate HTTPS requests (payload in JSON format) to the NetScaler SD-WAN system.

How NITRO Works

The NITRO infrastructure consists of a client application and the NITRO Web service running on a NetScaler SD-WAN system. The communication between the client application and the NITRO web service is based on REST architecture using HTTPS.

 

As shown in the above figure, a NITRO request is executed as follows:

  1. The client application sends REST request message to the NITRO web service.
  2. The web service processes the REST request message.
  3. The NITRO web service returns the corresponding REST response message to the client application.

NITRO APIs are synchronous in nature. This means that the client application waits for a response from the NITRO web service before executing another NITRO API.

 

Network Advisor – Listing Interfaces

For some vendors and models (especially Cisco switches) , Network Advisor can also list the network interfaces of each device.

Interface Overview

Example: Finding Half Duplex Interfaces with connected status

Example: Finding EtherChannel Interfaces

Interface Input Errors

Example: Finding connected interfaces with high percentage of input errors (Input Errors/Input Packets %)

Example: Finding connected interfaces with high percentage of Input CRC.

Example: Finding connected interfaces with high percentage of Runt

Interface Output Errors

Example: Finding connected interfaces with high number of Collisions

Example: Finding connected interfaces with high percentage of Drops

 

 

Network Advisor – End-of-life

End-of-sale Chassis

You can see all End-of-sale chassis using the menu Devices -> End of Sale Chassis.

You can filter the End of Sale chassis by Date.

End-of-sale Modules

You can see all End-of-sale modules using Devices -> End of Sale Modules

You can filter the End-of-sale modules by Date.

End-of-life Chassis

You can see all End-of-life chassis using Devices -> End of Life Chassis

You can filter the End of Life chassis by Date.

End-of-life Modules

You can see all End-of-life modules using Devices -> End of Life Modules

You can filter the End-of-life modules by Date.

Network Advisor – Listing Devices

Devices

You can see all devices imported using the menu Devices -> List Devices

You can filter the devices using the TextBox name.
In the Action column you can see all fields associated with the device and delete the device.
In the Fields column you can see the number of commands that were imported with success.

You can see all devices ports utilization using the menu Devices -> List Devices Utilization

Modules

You can see all modules imported using the menu Devices -> List Modules

You can filter the modules by name.
You can see the number ports available in each module.
The Device column shows where the module is installed.

Chassis

You can see all chassis imported using the menu Devices -> List Chassis

You can filter the chassis by Name or by Model.

Chassis versus Device

Chassis is the hardware and the device is the logical.

For example, if you have two 3850 switches in a stack, you have two chassis and one device

Network Advisor – Importing

Is important to import all the devices to be analyzed together.

To do that, first include all the text files into a .zip file.
Obs. If you are using Mac please remove __MACOSX from zip archives

In Network Advisor, use the menu Tools -> Import Devices to upload the .zip file.

You can see if the devices were imported or not in the File Upload Result

In this example above the file ROUTERS.zip contain 02 devices (ROUTER1.txt and ROUTER2.txt).
The result 18/29 fields means that were expected 29 commands but only 18 were found.

In this example above the file ROUTER3.zip (with ROUTER3.txt) was not imported

Here an example which consists of two devices collected in a zip file Public

 

Network Advisor – Collecting

For each device you wanna import is necessary to execute some commands to permit analyze those outputs.

After you got those commands, you need to save all in a single text file.

You need to enter the command as requested.

For example, for Cisco Devices:

You cannot use the command abbreviation show ver instead show version

 

Each command needs to be separated by the following separator

------------------ show
------------------ show

Here an example of two commands and the separator from a Cisco switch


NEXUS7000-01# show version

Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php

Software
BIOS: version 2.12.0
kickstart: version 6.2(8)
system: version 6.2(8)
BIOS compile time: 05/29/2013
kickstart image file is: bootflash:///n7000-s2-kickstart.6.2.8.bin
kickstart compile time: 3/15/2014 18:00:00 [04/25/2014 01:49:10]
system image file is: bootflash:///n7000-s2-dk9.6.2.8.bin
system compile time: 3/15/2014 18:00:00 [04/25/2014 03:40:25]

Hardware
cisco Nexus7000 C7010 (10 Slot) Chassis (“Supervisor Module-2”)
Intel(R) Xeon(R) CPU with 32745060 kB of memory.
Processor Board ID XXXXXXXXXX

Device name: NEXUS7000-01
bootflash: 1966080 kB
slot0: 0 kB (expansion flash)

Kernel uptime is 12 day(s), 16 hour(s), 50 minute(s), 33 second(s)

Last reset at 726625 usecs after Tue Nov 25 21:08:50 2014

Reason: Reset triggered due to Switchover Request by User
System version: 6.2(8)
Service:

plugin
Core Plugin, Ethernet Plugin

------------------ show
------------------ show

show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Gi1/1/2, Gi1/1/4
2 VLAN0002 active
3 VLAN0003 active Gi1/0/7, Gi1/0/8, Gi1/0/9
Gi1/0/10, Gi1/0/11, Gi1/0/12
Gi1/0/13, Gi1/0/14, Gi1/0/15
Gi1/0/16, Gi1/0/17, Gi1/0/18
Gi1/0/19, Gi1/0/20, Gi1/0/21
Gi1/0/22, Gi1/0/23, Gi1/0/24
Gi1/0/25, Gi1/0/26, Gi1/0/27
Gi1/0/28, Gi1/0/29, Gi1/0/30
Gi1/0/31, Gi1/0/32, Gi1/0/33
Gi1/0/34, Gi1/0/35, Gi1/0/36
Gi1/0/37, Gi1/0/38, Gi1/0/39
Gi1/0/40, Gi1/0/41, Gi1/0/42
Gi1/0/43, Gi1/0/44, Gi1/0/45
Gi1/0/46, Gi1/0/47
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

------------------ show
------------------ show