- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 05:42 AM
There's an OOB probe called Windows Services. We don't have it configured to run, and it would be useful to look at what services were configured on a server.
I've configured our dev instance so that the probe and sensor run. I can see them running, and I can see that the sensor processes a list of services on the server.
But I don't understand how the CMDB gets updated by the sensor.
Specifically, what does this statement do?
this.addToRelatedList('cmdb_ci_windows_service', this.dataArray, 'cmdb_ci', 'name');
What have I not done? The service data doesn't get added to the server CI. I can't see the data anywhere in the CMDB.
This is the complete sensor. It all makes sense until the addrelatedlits statement!
new DiscoverySensor({
dataArray: [],
process: function(result) {
this.parseResult(result);
},
parseResult: function(result) {
var dataArrayList = g_array_util.ensureArray(result.Win32_Service);
for (var i = 0; i < dataArrayList.length; i++) {
var element = dataArrayList[i];
var dataArrayDef = {};
dataArrayDef.name = element.Name;
dataArrayDef.display_name = element.DisplayName;
dataArrayDef.path_name = element.PathName;
dataArrayDef.service_state = element.State;
dataArrayDef.start_mode = element.StartMode;
dataArrayDef.service_type = element.ServiceType;
dataArrayDef.process_id = element.ProcessId;
dataArrayDef.can_be_paused = element.AcceptPause;
dataArrayDef.can_be_stopped = element.AcceptStop;
dataArrayDef.desktop_interact = element.DesktopInteract;
dataArrayDef.account = element.StartName;
this.dataArray.push(dataArrayDef);
}
this.addToRelatedList('cmdb_ci_windows_service', this.dataArray, 'cmdb_ci', 'name');
},
type: "DiscoverySensor"
});
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 08:42 AM
Mike,
Perhaps its because you are running a powershell script to collect the values and not the OOB WMI queries that come with the product. While you can absolutely do this, you want to build a new sensor that just deals with the pure data array and not expect to see a result from win_32.service..
Or you can just add the OOB Windows services probe to the classifier and see if that meets your need...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 06:21 AM
Windows Services are on their own separate table in the CMDB. This is adding the reference of the server you are scanning to the individual Windows Services CIs that are being created. You should see the related list on the CI form being populated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 06:27 AM
No I don't see anything. I checked the table cmdb_ci_windows_service and it is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 07:18 AM
Are you running Discovery on a server with the probe and sensor turned on or are you only using the "Test Probe" function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 07:36 AM
I'm runing discovery with the probe and sensor turned on. I put some gs.log statements into the sensor, and I can see them in script log, so I know it's running, and I know it gets services from the server I'm discovering.