HowTo monitor the Netscaler using Python and Soap instead of SNMP

In this HowTo, I will show you how you can get statistics off of the Netscaler without using SNMP. You might be asking why would I want to do that?? Well like many other devices that support SNMP, the Netscaler makes use of dynamic OID creation. For those of you that do not understand what I mean. Dynamic OID creation, is the way that Networking devices give OID’s to variables that are not static in the device itself.

Here are some common static variables/OID’s, amongst most devices out there.

  • CPU Utilization
  • Disk Utilization
  • Memory Utilization
  • TCP Statistics

Here are some common, non-static variables/OID’s..

  • A Load Balanced Virtual Server
  • Statistics about LUNS
  • Statistics about Services

Now you can get these statistics off of the SNMP based device. But if and when this device is rebooted, more then likely the OID has changed. Now you are stuck with the task, of finding the new OID. Since the Netscalers have a SOAP Based API, we can get those same statistics with out ever needing to know the OID.

Here I have attached a script that I wrote, using Python and Suds to connect to the Netscaler. This script works perfectly with Zenoss and its DataPoint structure. Download

Before you proceeed any further, you will need to download SUDS from here https://fedorahosted.org/suds/.
You should also check this HowTo that I wrote, it contains some examples on how to connect to the Netscaler using the Python Virtual Shell.
http://www.linuxdynasty.org/how-to-get-information-from-the-netscaler-using-python-and-suds.html

Here are some examples on how you will run the script…

Both the Stats, above are actually static in The Netscaler. But I actually included them in the script, because I can. The stats I will show you below are not static..

 

This entry was posted in Netscaler, Python, Zenoss and tagged , , , , , , . Bookmark the permalink.

3 Responses to HowTo monitor the Netscaler using Python and Soap instead of SNMP

  1. bassbonerocks says:

    You mention a getns_stats.py script, but I see no download for this script. Is this a modified version of some FOSS script? Or is the download link just missing?

    • bassbonerocks says:

      I guess I should mention why I’m looking for the script, I’m in the process of writing a zenpack for this. If I can get a copy of this script I hope to create a nice zenpack for all of this instead of having to hack it together every time :)

Leave a Reply