Custom Probe/Sensor Windows Video Cards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2013 04:27 PM
Have a customer that do alot of design work so they needed to track their video adapters so here you go!
Note you will need to create a custom table (I extended cmdb_ci) then on that table create a reference field back to cmdb_ci called it 'u_installed_on' and of course all your new fields below
WMI Probe... (WMI Fields)
***************
Win32_VideoController.CurrentHorizontalResolution
Win32_VideoController.InstalledDisplayDrivers
Win32_VideoController.Description
Win32_VideoController.DriverVersion
Win32_VideoController.CurrentVerticalResolution
**************
Then the sensor
**************
new DiscoverySensor({ dataArray: [], process: function(result) { this.parseResult(result); }, parseResult: function(result) { var dataArrayList = g_array_util.ensureArray(result.Win32_VideoController); for (var i = 0; i < dataArrayList.length; i++) { var element = dataArrayList<i>; var dataArrayDef = {}; dataArrayDef.name = element.Description; dataArrayDef.driverversion = element.DriverVersion; dataArrayDef.verticalresolution = element.CurrentVerticalResolution; dataArrayDef.horizontalresolution = element.CurrentHorizontalResolution; dataArrayDef.driverdate = element.DriverDate; dataArrayDef.installeddrivers = element.InstalledDisplayDrivers; this.dataArray.push(dataArrayDef); } this.addToRelatedList('u_video_adapter', this.dataArray, 'u_installed_on', 'name'); }, type: "DiscoverySensor" });
***********
Enjoy!
Remember sharing is caring? Doing anything cool in your environment?
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 05:41 AM