Want to get CMDB CI field which shows up under the device tab under discovery schedule on the INC form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 11:43 PM
Hi Guys,
Please guide me how to get the CMDB CI field which shows up on the Device page when a discovery is ran on the Incident form. Which table does that device field under discovery schedule come and how to get it on the incident form.. Please guide me through the whole process.. Thanks..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2018 11:46 PM
Hi Ashutosh,
I use client script. What is a Multi-sensor script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2018 11:48 PM
If I write a normal client script on Incident table, will this script work to have this field on the Incident table ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 01:26 AM
Hi Utkarsha,
Yes in client script you have to Query below table:
discovery_device_history
From here you can fetch the CI information by using field cmdb_ci.
THanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 10:04 PM
Hi Ashutosh,
I made the client script on the discovery_device_history table of onLoad type with the following script as cmdb_ci is the name for the field which I want on the incident table. Please also tell if I need to query the Incident table or build anything on that table.
function onLoad(result, ciData, debug, sensor)
{
var output = result.output;
gs.log('Output '+output,'Snow Sensor');
if (output === null || gs.nil(output))
return;
run(output, ciData, debug);
function run(output, ciData, debug)
{
var cmdb_ci = ciData.getData();
gs.log('Data Output '+ci_data.name,'Snow Sensor');
}
}
Is it correct ?
Thanks,
Utkarsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 10:07 PM