Fix for common netscaler hostname issue in ServiceNow Discovery

      Comments Off on Fix for common netscaler hostname issue in ServiceNow Discovery

Many organization uses the virtual NetScaler appliance that can be hosted in Citrix XenServer®, VMware ESX or ESXi, Linux-KVM, and Microsoft Hyper-V virtualization platforms.

Though it has many functionalities, commonly it is used as a load balancer. So as we speak of service mapping this is a crucial CI for any Bussiness services that need to be mapped.

Problem:

Even though after changing the hostname from the console, via SNMP it gives a generic name “netscaler”. So all the netscaler devices in an estate will be discovered with a common name if we set the below property (SNMP is trusted host name source)- True. If the property is not enabled Discovery will use the DNS name as trusted name source. But most of the monitoring tools use the hostname via SNMP rather than DNS name while generating the alert. So its preferred to use the SNMP name in ServiceNow as well.

Solution:

Navigate to the sensor script “SNMP – Classify” and add the below lines inside the function “_handleHostname”

if (haveNow && name==”netscaler”)
return;
if (!haveNow && name==”netscaler”){
this.ci_data[‘name’] = name+”-“+this.ci_data[‘ip_address’];
return;
}

Output:

The output will be a CI created with DNS name. In case if the reverse DNS lookup fails the ci will be created in the form of “Netscaler-IP”

Eg: “netscaler-127.0.0.0.1”

Sharing is caring!