CI lookup rules for VR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
(function process(rule, sourceValue, sourcePayload) {
/*********************************
* CI Lookup Rule Script
*
* Available variables:
* - sourceValue: The value of the source field from incoming data that is used for lookup
* - rule: Reference to the lookup rule that is being evaluated
* - sourcePayload: All the fields from incoming data that can be used for matching CI
*
* Return either:
* - the sysid of the CI that was matched by the rule
* - null if there were no CI records that matched
**********************************/
var sourceField = {};
var ignore = global.SecProperty.getProperty("sn_sec_cmn.ignoreCIClass", "");
sourceField[rule.source_field] = sourceValue;
var f = sourceValue.split('.')[0];
cmdbci = new GlideRecord("cmdb_ci");
cmdbci.addQuery("name", "CONTAINS", f);
if (!gs.nil(ignore))
cmdbci.addQuery('sys_class_name','INSTANCEOF','cmdb_ci_lb_pool_member');
cmdbci.query();
if(cmdbci.next()){
return cmdbci.getUniqueValue();
}
return null;
})(rule, sourceValue, sourcePayload);
fqdn = x.kddn.com. i am, trying to split x from fqdn and then trying to match it on a ci record. i have verified that data is present on cmdb but the correct ci is not getting matched to discovered item. each time the discovered item is getting mapped to the unclassed hardware ci created by IRE through a fqdn ignore classes ci lookup rule. i have also verified that order of my lookup rule is lower than fqdnignore classes rule.
can someone point out the possible reason for this?
what i a