- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
About Microsoft Cluster Servers
Microsoft developed a clustering and failover ability for Microsoft Windows Servers. This is meant to provide to customers the ability to load balance Windows servers running databases, web servers or any server software running on Windows Servers. Redundant resources can be in different data center locations and managed trough the cluster configuration.
The architecture of the Microsoft Cluster Server involves configuring the Microsoft Cluster Server software with the nodes of servers and a virtual IP address (and virtual host name) that is used to reference the cluster of servers. When a software application makes a network connection to a server by the virtual host name or virtual IP address, the connection is directed to one of the nodes in the cluster.
Microsoft Cluster Architecture
ServiceNow Discovery and Microsoft Cluster Server
If a company has an application that leverages Microsoft Cluster, then it makes sense for that cluster architecture to be stored in the CMDB. If they are managing business applications that use a Microsoft Cluster, it makes sense to want the redundant cluster nodes associated with their that business application.
ServiceNow Horizontal Discovery has a pattern library in the discovery pattern for Windows Servers that discovers the Microsoft Cluster software, Windows Cluster Nodes, Cluster virtual IP Addresses and other Windows Cluster Resources. These configuration items are related according to the below diagram.
ServiceNow CMDB Architecture for Microsoft Cluster
During discovery of the Windows Server on which the Microsoft Cluster Configuration Server is running, Discovery runs a WMI Query to Root\MSCluster and requests information on any Windows Clusters, Cluster Nodes, VIPs and Cluster node to Cluster relationships. Then, the reference relationships are created in the CMDB.
Service Mapping of Microsoft Cluster Servers
ServiceNow Service Mapping is another automated discovery capability designed to map and model Business Services. The goal of Service Mapping is to relate infrastructure components (servers, software applications, network devices) to a business service by discovering the configuration components on those servers from an entry point. It also creates models of the dependencies between the business service components showing how the different components are related to each other. When application components are clustered in a Microsoft Cluster, it makes sense to map these components as a cluster.
In order to map and model the Windows Clusters within a ServiceNow automated service Map, the following must happen:
1. The windows clusters with the clustered nodes and virtual IP addresses must be already discovered and stored in the CMDB with Horizontal Discovery.
2. The virtual IP address for an application must be discovered and used in a "Create Connection" operation. The operation must specify the HTTP(S) Entry Point for it to map the cluster.
When Service Mapping maps an application with an HTTP(S) entry point, and the entry point is a virtual IP, Service Mapping will then look into the CMDB and will automatically make a connection to each node in the list of windows cluster nodes for the cluster that has the virtual IP that matches.
Mapping Windows Cluster Servers with a TCP Entry Point
There is a way to map the Microsoft Cluster Servers using the virtual IP from any service mapping discovery pattern "Connection Section" using whichever entry point you like. A custom "Connection Section" on a discovery pattern can take the virtual IP and identify the cluster nodes and make a connection to them. Here is how this can be done:
1. Within the service map, go into the discovery log from the node that connects to the windows cluster.
2. Go into Debug mode in the identification section
3. While in Debug mode, go into the Discovery pattern and create a new Connection Section that will connect to the Windows Cluster
4. In the Connection section, you will need an operation that gets the virtual IP address that references the cluster. This may be in a configuration file or some other source. The VIP may also be a hostname in a URL that is found in a file (such as win_config) on an IIS server.
5. If the VIP is a hostname, then a simple operation is needed to get the IP Address, such as doing an "nslookup" on the hostname.
6. Now, we need the list of cluster nodes from the CMDB for the pattern. This needs to be done by creating a script in the sa_pre_task_script table. This table has scripts that are associated with a Configuration Item that run on the ServiceNow Instance just before the pattern runs. The script allows for querying of data from the CMDB and putting that data into a table object that will be available to the pattern. In my example here, I created a Pre Service Mapping Task Script called: "Get Windows Cluster WS" that queries all the Windows Clusters, Cluster Nodes, and Virtual iPs and places them into a table structure.
You can copy/past the JavaScript code listed here:
/* Get the Windows Clusters */
/*** script to get Windows cluster data ***/
var data = new SNC.PrePatternExecutionData();
var wincarr = [];
var winc = new GlideRecord ( 'cmdb_ci_win_cluster' );
winc.query();
while (winc.next())
{
var cluster_line = "";
var cl_name = winc.name;
cluster_line = cl_name;
var wincn = new GlideRecord ( 'cmdb_ci_win_cluster_node' );
wincn.addQuery ( 'cluster', winc.sys_id + '' );
wincn.query();
var wincnname_string = '';
var wincnserver_string = '';
while (wincn.next())
{
var wincn_name = wincn.name;
var wincn_serversysid = wincn.server;
var cm = new GlideRecord ( 'cmdb_ci' );
cm.get ( wincn_serversysid + '' );
var wincn_server = cm.name;
if (wincnname_string == '')
{
wincnname_string = wincn_name;
wincnserver_string = wincn_server;
}
else
{
wincnname_string = wincnname_string + ',' + wincn_name;
wincnserver_string = wincnserver_string + ',' + wincn_server;
}
}
cluster_line += '|' + wincnname_string + '|' + wincnserver_string;
var wincnvip = new GlideRecord ( 'cmdb_ci_cluster_vip' );
wincnvip.addQuery ( 'cluster', winc.sys_id + '' );
wincnvip.query();
var wincnvip_name_string = '';
var wincnvip_ip_string = '';
while (wincnvip.next())
{
var wincnvip_name = wincnvip.name;
var wincnvip_ip_address = wincnvip.ip_address;
if (wincnvip_name_string == '')
{
wincnvip_name_string = wincnvip_name;
wincnvip_ip_string = wincnvip_ip_address;
}
else
{
wincnvip_name_string = wincnvip_name_string + ',' + wincnvip_name;
wincnvip_ip_string = wincnvip_ip_string + ',' + wincnvip_ip_address;
}
}
cluster_line += '|' + wincnvip_name_string + '|' + wincnvip_ip_string;
wincarr.push ( cluster_line );
data.addTableEntry('windows_cluster',
{
'name':cl_name,
'nodes_name':wincnname_string,
'nodes_servers': wincnserver_string,
'vip_name': wincnvip_name_string,
'vip_ip': wincnvip_ip_string
}
);
rtrn = data;
7. As a result of the Pre Service Mapping Task Script being executed, we will now have a temporary variable table called windows_cluster that has a column called "vip_ip" and a column called "nodes_servers".
8. We can now filter down this table based on our virtual IP to get a table with the server nodes in a filter table operation
9. We can now put the cluster nodes into a neat table called "cluster_nodes" since all the nodes are separated by commas.
10. Now, we can put in a simple "Create Connection" operation on the table and it will connect to the Windows Cluster using whatever Entry Point we prefer.
Thanks to the connection section, we now have a mapped application leveraging the Windows Cluster:
- 4,837 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.