Clustered application discovery on Windows
A process and its corresponding resource information can be used to determine whether the process is a clustered process.
The Microsoft SQL Server process classifier that comes with your instance identifies clustered SQL Servers. You can leverage the same technique to detect other clustered applications on Windows using Discovery.
To detect Windows clustered applications with Discovery, you create a process classifier that detects whether a process is a clustered process. Perform the following steps:
Create a classifier for clustered processes
To detect Windows clustered applications, create a process classifier for that CI type.
Before you begin
Procedure
Relate the process classifier to Windows cluster resources
In the second step, relate the process classifier to the information that is in the Windows Cluster resources table.
Before you begin
Role required: admin
About this task
The Windows Cluster resources table is cmdb_ci_win_cluster_resource. This relationship is built through JavaScript.
Procedure
Populate the Value field on the Classifier Parameter form
The value field defines two JavaScript objects, called resourceType and isMatch.
Before you begin
Role required: admin
About this task
The resourceType value refers to the Resource Type column in the Windows Cluster Resources table [cmdb_ci_win_cluster_resource]. The resourceType value can not be empty or null.
Procedure
- Navigate to a Windows cluster page to access the Windows Cluster Resources table.
- Click the Windows Cluster Resources tab.
Example
- An evaluation that returns true indicates the process is a clustered application, and the process is classified as a clustered application in the cluster.
- An evaluation that returns false classifies the process as a regular application running on the cluster node.
- process: Process is the GlideRecord of the process application. It is determined by the Table field in the classifier. In this example, it is the GlideRecord entry of the Application table (cmdb_ci_app) for the process that is being classified. You have access to any field values for the CI type such as name or version.
- resource: Resource is the GlideRecord entry in the Windows Cluster Resource table after the resourceType condition has been applied. In the example, it is the GlideRecord entry of the sixth row.
Examples of JavaScript for the Value field.
In the following example code: resourceType: "SQL Server" the query filters the Windows Cluster Resources table entry for the Resource Type field that has a value that is equal to SQL Server. In the following example table, the sixth record would be returned.
resourceType: "SQL Server"
isMatch: function(process, resource) {
return true;
}
The following script indicates that if if there is a resource of type SQL Server,
and the application name is equal to the resource name, then the process is
classified as a clustered application.
resourceType: "SQL Server"
isMatch: function(process, resource) {
if (process.name == resource.name)
return true;
}
If there are multiple matches to the resourceType condition, the matching function
is called multiple times. For the following resourceType example, the matching
function is called twice because there are two entries that have Physical
Disk in the Resource Type column in the
sample Windows Cluster Resources table.
resourceType: "Physical Disk"