- 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 08:50 AM
Are you seeing results in probe xml payload? It doesn't really matter what your sensor is doing if your probe provides it zero data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2015 12:30 AM
Hi Andrew, thanks for the replies. Yes, I can see the services in the XML, probe "input"
<?xml version="1.0" encoding="UTF-8" ?>
- 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-25-2015 03:30 AM
Thanks Doug