Citrix NetScaler Documentation script version 1

Citrix NetScaler documentation script version 1

The Citrix NetScaler platform offers a huge amount of features and a massive amount of configuration possibilities. The flexibility that this gives us also introduces complexity, especially since you configure a service on a Citrix NetScaler once and changes are made only every so often. The starting point for reducing complexity is having a complete and up to date configuration document.

In my experience with customers, especially in enterprise environments, is that documentation is never completely accurate. Even if it would be accurate, what is configured when no configuration is made? Is the default, non-configured setting Enabled or Disabled?

Announcement – Citrix NetScaler documentation script

Today, I’m proud to bring you the Citrix NetScaler documentation script. The script will be released in a joint venture with Carl Webster and is part of his already amazing collection of documentation scripts.

The Citrix NetScaler documentation script wouldn’t be as stable, readable and fast if it wasn’t for Iain Brighton. Iain has been of great help creating functions and performance enhancements in the last few weeks.

If you want to know more keep on reading and I’ll show what we’ve done and how to get the script.

Just a short side step before continuing on Citrix NetScaler. In the recent years I’ve grown to become a huge fan of  automatic documentation solutions like the RES Software instant reports and Carl Webster his amazing documentation script collection. Carl’s scripts automatically create Word documents for products like Microsoft Active Directory, Citrix XenApp and Citrix XenDesktop.

The reason why I’m such a big fan is that it’s automatic and computers make no mistakes;) and it’s always up to date. Whenever I start a new project I run these scripts and I’ve got complete and up to date documentation. This makes sure I’m not planning for disaster!

Almost a year ago I discussed the possibility of a Citrix NetScaler documentation script with Carl Webster and Neil Spellings. My intention at that time was for them to do it…… I was wrong there as I will show you later on.

The biggest struggle is how to get from Debian, the NetScaler base OS, based configuration to a Word document rendered by Microsoft Windows Powershell. I started with the official Citrix API’s but soon found out that was not my cup of tea. Looking for solutions I thought of the ns.conf, which is a text based file and holds all the CLI commands to build a NetScaler configuration every time the NetScaler boots.

The challenge is to get from this

NetScaler documentation script ns.conf

 

 

 

 

 

 

To something that looks like this:

NetScaler documentation Script screenshot 2

 

 

 

 

 

 

 

 

 

 

 

 

 

The answer is….. over 5.000 line of Microsoft PowerShell code. Just relax, I won’t be showing you the code in this article. When you download the script you can have a look for yourself.

One thing I do want to point out is that most of the time that has gone into this project is, what to do with non configured items? The thing is that when you leave a setting in it’s default state it’s not written to the ns.conf. What Iain created is a function that searches lines for –option1 –option2 and when found set it to value On and if not found set it to value Off, or the other way around dependent of the default value being On or Off.
I have literally gone through the NetScaler CLI documentation to find each and every possible setting and look for the default value. The default value could be On/Off, Enabled/Disabled but also a numeric value.

In the end this results in documentation that shows you the state of all options in regard to hand-made documentation which only shows what has actually been set.

Where to get it

I have donated the script to be part of the collection of Carl Webster and you will be able to download the NetScaler documentation script on his website. Be sure to check out his other scripts as well. The Carl Webster documentation script library can be found here.

because I used his Word documentation template it will generate the documentation in the same way as for the other products.

Version 1 supports the following:

  • NetScaler System Information
    • Version / NSIP / vLAN
  • NetScaler Global Settings
  • NetScaler Feature and mode state
  • NetScaler Networking
    • IP Address / vLAN / Routing Table / DNS
  • NetScaler Authentication
    • Local / LDAP
  • NetScaler Traffic Domain
    • Assigned Content Switch / Load Balancer / Service  / Server
  • NetScaler Monitoring
  • NetScaler Certificate
  • NetScaler Content Switches
    • Assigned Load Balancer / Service  / Server
  • NetScaler Load Balancer
    • Assigned Service  / Server
  • NetScaler Service
    • Assigned Server / monitor
  • NetScaler Service Group
    • Assigned Server / monitor
  • NetScaler Server
  • NetScaler Custom Monitor
  • NetScaler Policy
  • NetScaler Action
  • NetScaler Profile

 

Here are some examples of the final output

Please understand that the shown screenshots are based on a Citrix demo platform which is no longer running.

NetScaler documentation script Traffic Domain

 

 

 

 

 

 

 

 

NetScaler documentation script Monitoring

 

 

 

 

 

 

 

 

NetScaler documentation script Networking

 

 

 

 

 

 

 

NetScaler documentation script Authentication

 

 

 

 

 

 

 

 

NetScaler documentation script Features and Modes

 

 

 

 

 

 

 

 

NetScaler documentation script Load Balancing

 

 

 

 

 

 

 

 

NetScaler documentation script Profiles

 

 

 

 

 

 

 

 

Update May 22 2014: I’m very happy with the amount of response I’ve seen so far for the Citrix NetScaler documentation script. We already received a couple of bugs and released some minor updates with fixes. If you find a bug please let me know asap i’ll promise to fix it within a couple of days. Please check out Carl’s site for the updates, latest version is 1.0.2.
A lot of requests are coming in for NetScaler Gateway support and to be honest we were expecting this to be of high demand. As we really liked to get this first version out during Citrix Synergy there simply wasn’t enough time to create a stable and complete NetScaler Gateway release. We focussed on stabilizing and optimizing this first version which proved valuable as we only had to squash two bugs up till now.

As demand is high and response is great we are 100% dedicated to keep this project running and add more and more features in the coming months. I’ll start working on version 2 after E2EVC Brussels at the end of may. In version 2 I will focus on two things, add support for NetScaler Gateway and optimize the page and table layout.
The document already looks great but Carl implemented new functionality to the Word part of the script which helps me improve the layout and presentation of the document.
When I’m at it I might surprise you with some more documented features a long the way!

As this is a spare time project I will not make any promises about a delivery date, my expectation is to release V2 before august 1st. It might be sooner but don’t shoot me when it’s later;).

About Barry Schiffer

Barry is a senior technical consultant with 13 years of IT experience. He has gained both a broad and deep knowledge in the sphere of IT. Throughout the years, Barry has developed into a specialist in the field of Microsoft Windows, Server Based Computing, desktop and server virtualisation.Barry is co-founder and member of the Board of the Dutch Citrix User Group. He also writes several blogs on his website www.barryschiffer.com and he is a Computable Expert.
Tagged , , , , . Bookmark the permalink.

7 Responses to Citrix NetScaler Documentation script version 1

  1. Sam Jacobs says:

    Barry … Your script is great! Thank you for sharing it!
    You may wish to fix for the next version – blanks within a name will truncate.
    For example, if I have two LB vServers:
    “IPM Web Interface LB vServer” and
    “IPM DNS vServer”

    They will both show up as Load Balancer “IPM
    (I have approx. 10 such vServers, and they all show up as above).

    Thanks!
    Sam (sjacobs@ipm.com)

  2. Sam Jacobs says:

    I think you can simply replace the .split() functions with -split with a RegEx.
    So, for example, the LB vServer split would change to:

    $Y = ($_ -replace ‘add lb vserver ‘, ”) -split ‘ (?=(?:[^”]|”[^”]*”)*$)’

    • Hi Sam,

      I just received a new function from Iain Brighton to fix this and it seems you guys are on the same page. Are you willing to test a new version of the script somewhere next week? This will be a slimmed down test release with bits of the new CAG functionality so only for testing purposes.

      Thanks for thinking with us! Much appreciated!

  3. John R says:

    I have been testing your script and find it very useful. I have a few NS boxes which I use in my lab and I would be willing to assist with any testing if you need someone. Whatever I can help with to give back.

    Keep up the great work, look forward to your next version.

Leave a Reply