Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Virtual Netscalar Citrix Load Balancer Discovery

SalilD
Tera Contributor

Hello ServiceNow Community,

 

I am seeking advice on how to best configure ServiceNow Discovery for virtual Citrix NetScaler load balancers. According to the documentation, virtual NetScaler load balancers are not fully supported, and I'm looking for any best practices or workarounds that could help improve the discovery process in our environment.

Here are my questions:

  • Has anyone in the community successfully configured ServiceNow Discovery to accurately discover and represent virtual Citrix NetScaler load balancers?
  • Are there any recommended custom patterns or scripts that can be used to supplement the out-of-the-box ServiceNow Discovery capabilities for virtual NetScalers?
  • Can anyone provide insights on managing the limitations mentioned in the ServiceNow documentation regarding virtual NetScaler load balancers?
  • Are there any recent updates or plugins that enhance the discovery of virtual load balancers that we should be aware of?
    #CMDB #DISCOVERY 
1 REPLY 1

Ian Roper
Tera Contributor

Hello,

I saw your post while I was trying to sort this out myself, so I thought I’d circle back and provide you what I’ve learned so far.

  • The Netscalers need a combination of an SNMP account and an SSH account(s).  So you’ll have to setup a credential alias that houses one of each with sufficient privileges, and add that to your discovery schedule.
  • To discover the SDX’s properly, you’ll need an admin account.  Not sure if it is an nsroot account, but with enough privileges to run these commands:

o   Citrix Netscaler SDX

o   "shell"

o   Citrix Netscaler SDX

o   "sysctl -a"

o   Citrix Netscaler SDX

o   "show vmdevice"

  • I’ve learned that the VPX’s inherit their names from the SDXs, otherwise we saw all the VPX’s come in with a name of “netscaler” and that caused consolidate of CIs.  This is because the OOB identification rule is on name and serial number.
  • For the VPX’s my network team was able to white list a bunch of commands for a non-admin account

-            Netscaler Load Balancer

-            "show ns hostName"

-            Netscaler Load Balancer

-            "show ns hardware"

-            Netscaler Load Balancer

-            "show ha node"

-            Netscaler Load Balancer

-            "show ns ip"

-            Netscaler Load Balancer

-            "show ns config"

-            Netscaler Load Balancer

-            "show int"

-            Netscaler Load Balancer

-            "show server"

-            Netscaler Load Balancer

-            "show service"

-            Netscaler Load Balancer

-            "show lb vserver"

-            Netscaler Load Balancer

-            "show lb vserver -summary"

-            Netscaler Load Balancer

-            "show vlan"

-            Netscaler Load Balancer

-            "show serviceGroup"

-            Netscaler Load Balancer

-            "show serviceGroup -includeMembers"

-            Netscaler Load Balancer

-            "show dns cnameRec"

 

  • This is what I haven’t done yet, but plan to, is discover the SDXs, then run discovery for the VPXs.  In theory, this should provide the names to the VPXs and allow the OOB identification rule to work as expected.
  • If that isn’t the case, I had created this pre pattern script (see below), created a custom u_uniqueipsn attribute on the cmdb_ci_lb table, deleted the OOB identification rule on the Load Balancer class, and created the below identification entry and related entry.
    • Customization of the identification rules
    •  IanRoper_1-1772036989187.png
    • Custom pre/post script

IanRoper_0-1772036989185.png

 

var rtrn = {};

// parsing the json string to a json object
var payloadObj = JSON.parse(payload);

// Clearing payload string to save memory
payload = null;

var handleuniqueIPSN = function() {
	var ipAddress = '';
	var serialNumber = '';
	var uniqueIPSN = '';

	var payloadItems = payloadObj.items;
	
	for (var i = 0; i < payloadItems.length; i++) {
		if ((payloadItems[i].className === 'cmdb_ci_lb_netscaler') || (payloadItems[i].className === 'cmdb_ci_citrix_netscaler_sdx')) {
			var currentItem = payloadItems[i];

			ipAddress = currentItem.values.ip_address;
			serialNumber = currentItem.values.serial_number;
			uniqueIPSN = ipAddress + serialNumber;
			currentItem.values.u_uniqueipsn = "" + uniqueIPSN + "";
		}
	}
};

handleuniqueIPSN();
gs.info('PD: Loadbalancer =   JSON'+ JSON.stringify(payloadObj)); //output of the new payload

rtrn = {
	'status': {
		'message': 'Enter your message here',
		'isSuccess' :true
	},
	'patternId': patternId,
	'payload': JSON.stringify(payloadObj)
};

 

Hope this helps someone.