slauger/check_netscaler

Different nitro versions

MarcoSchmitz opened this issue · 2 comments

Hi,

first thank you for the great work.

In Line 227 (check_netscaler.pl) you set the URL staticly to "/nitro/v1/". However I noticed, that we can request some information of our SDX instance through the "/nitro/v1/" but also some exclusive through "/nitro/v2/". Because of that I implemented an iterative check for the correct nitro version by myself.
Do you also have this problem and have you some advices to solve this "problem"?

Kind regards
Marco

Hi Marco,

to be honest, I never noticed that there exists a v2 version of the NITRO API. That's new to me. On a VPX with the latest 12.0 firmware it throws me the following error when I try to logon with v2.

NetScaler UNKNOWN - {"errorcode":-1,"message":"Version not supported","severity":"ERROR"}

Could It be that the v2 API is only available on SDX? Adding another switch for selecting the version of the API shouldn't be that problem. This was planed for a future release anyways, when a new API version becomes available.

It seems that the content type between an SDX and API v2 and other appliances differ (see https://docs.citrix.com/en-us/sdx/12/nitro-api-doc/nitro-rest-api.html). Do you see any other differences? What exactly did you changed to get it running?

# SDX
Content-Type:application/vnd.com.citrix.sdx.login+json

# VPX (and the current implementation of t he API)
Content-Type:application/vnd.com.citrix.netscaler.login+json

I've added a new switch --api which allows you to select a specific version of the API, e.g. --api='v2'. I don't know if that works. Maybe you could test this with your SDX appliance.