This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Netscaler polling – Solarwinds API Edition

Netscaler polling – Solarwinds API Edition

Preface

So, the new API polling has opened up a lot of doors. Everything has a REST API! Likewise, so do Netscalers. By definition I was determined to figure out how to make this work.   It took a bit of effort and a bit of reference knowledge.

This was tested on SAM 2019.4 and Netscaler 14K’s and virtual appliance Netscalers.

Some information can be found at https://developer-docs.citrix.com/projects/netscaler-nitro-api/en/12.0/statistics/load-balancing/lbvserver/lbvserver/ - where they provide some examples of how to poll the data.

We have information available to us from solarwinds at https://support.solarwinds.com/SuccessCenter/s/article/SAM-2019-4-feature-API-Poller . https://documentation.solarwinds.com/en/Success_Center/sam/Content/SAM-API-Poller-Add.htm . This is the actual picture example similar to below, for reference. What I added is the special sauce for netscaler.

Requirements

A valid HTTPS certificate on your load balancer’s web interface (if not, you’re using HTTP and well…yeah – that’s not good)

A login to the netscaler, both for you and the credential you intend to use (as far as I know, someone who knows netscaler probably knows how to get your service account more granular).

Names for the netscalers you want to poll.

Determining Data to Gather from the Citrix Netscalers

Step 1:

Log into netscaler, go to Traffic Management -> Load Balancing -> Virtual Servers

pastedImage_0.png

Search and find the name of the load balancer you want. The name there is what you’re looking for. This is what you’re going to be pointing the API poller to.

Step 2:

Go to the Node in Orion and go to “create API”. You’ll notice that after this point looks like the solarwinds reference document a bit.

  pastedImage_1.png

Go to configure and add the appropriate credential you have for the Netscalers to pull this information. That’s under configure in the top right after you go to “create” for the API poller. Also, whatever you name it in the credentials area (UX!!!!! *shakes fist*) is what will show up under the image above – so if you call it in the credential/config area “random API poller test” then under this dropdown of “API Poller” you’ll see “random API poller test” as the name.

For the query, you’re looking for https://{NETSCALER-FQDN}/nitro/v1/stat/lbvserver . See reference at the start of this document. So, Citrix has a “Nitro” API for when we’re polling data and not changing anything.

Replace {NETSCALER-FQDN} with the name of your netscaler. So if your netscaler is booboo1, then the link is booboo1/.../lbvserver to test seeing ALL of the load balancer groups.

As referenced in the citrix api:

get (all)

URL:

http://<netscaler-ip-address>/nitro/v1/stat/lbvserver

This is how you make sure it works, at a basic level. When it works, you get this when you send a query.  Which should be loaded differently, but each number there starting from zero is incrementing and listing each of the load balancer groups you have.

pastedImage_4.png

Now, you need that netscaler name to make the rest work. You don’t have to get too granular. The API references a lot of options, but you can pick what you want out of the results anyway. In my case:

https://{NETSCALER-FQDN}/nitro/v1/stat/lbvserver?args=name:{VIRTUALSERVERNAME}

Citrix Reference document says: args

http://<netscaler-ip-address>/nitro/v1/stat/lbvserver?args=name:<String_value>,detail:<Boolean_value>,fullvalues:<Boolean_value>,ntimes:<Double_value>,logfile:<String_value>,clearstats:<String_value>,sortby:<String_value>,sortorder:<String_value>,sortorder:<String_value>

Use this query-parameter to get lbvserver resources based on additional properties.

However, we don’t need to say I need value a/b/c because solarwinds already does this for you.

So, here's the metric in question from one of my netscalers. I monitor the VSLB health, which tells you when something has dropped (percentage value).

pastedImage_0.png

When this is done, you can then poll the Netscaler and pick what metric you want when you click on the little monitor icon on the right side next to the metric you want to obtain! Happy monitoring!

   pastedImage_5.png

A few side-points here that are confusing:

Once you click the monitor icon, you have to name what you’re getting/displaying. So, I’d name one of mine VS_LB_CASMAPI.

As a result, you can put the load balancers in a group and the API pollers into a child like this:

pastedImage_6.png

Oh, and at a bonus: you get to put all these tasty metrics straight into perfstack. Just click on the results from the node itself. (This needs to be it's own page in the future, IMO).

  pastedImage_7.png

Have you read all this? Are you exhausted? Should this be a SAM template? Maybe. Do we need more #darktheme​ ? yes.

Let me know how this goes! Tell me what else you’ve found?  What doesn’t work and does work? Does this work for you?

edit: added photo of VSLB health