Name

sn_agent.PolicyMonitoredCisQuery

Description

Client Callable Script Include for validation of Monitored CI type. Only the following CI classes ( sysparm_table ) can be monitored without a proxy configuration subclass of cmdb_ci_computer or cmdb_ci_appl cmdb_ci_computer cmdb_ci_appl or sn_agent_cmdb_ci_agent

Script

var PolicyMonitoredCisQuery = Class.create();
PolicyMonitoredCisQuery.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
  
  getTables: function() {
  	var tables = new GlideTableHierarchy('cmdb_ci_computer').getTableExtensions().concat(new GlideTableHierarchy('cmdb_ci_appl').getTableExtensions());
  	tables.push('cmdb_ci_computer');
  	tables.push('cmdb_ci_appl');
  	tables.push('sn_agent_cmdb_ci_agent');
  	tables.push('cmdb_ci_docker_container');
  	return tables;
  },
  
  validate: function() {
  	if (this.getTables().indexOf(this.getParameter('sysparm_table')) < 0 && this.getParameter('sysparm_isProxy') == "false") {
  		return "false";
  	}
  	return "true";
  },
  
  type: 'PolicyMonitoredCisQuery'
});

Sys ID

04a779d653054010086addeeff7b1234

Offical Documentation

Official Docs: