Is this a Tag Governance Policy limitation?

martiniozev
Tera Contributor

Hello,

 

I have a Tag Key & Value policy that compares Application tag against existing Business Applications:

 

var tagValues = [];
var gr = new GlideRecord('cmdb_ci_business_app');
gr.addQuery('life_cycle_stage_status.name', 'In Use');
gr.query();

while (gr.next()) {
var Item = gr.getValue('name');
tagValues.push(Item); }

 

When CIs in scope are above 100k the policy executes with no errors, however nothing is populated on the Dashboard. I've checked the underlying tables and a Business Rule that triggers the population of the table source for the Dashboards (sn_itom_tag_health_listing) and apparently when there are many CIs audited by the policy we hit a threshold described in KB0749085 - String object would exceed maximum permitted size of 33554432.

Any suggestions how to go around it, without segmenting the CIs in scope?

 

2 REPLIES 2

mcucaita
Tera Contributor

Try setting the tagValues var at the end like this:

 

var names = [];
var gr = new GlideRecord('cmdb_ci_business_app');
gr.addQuery('life_cycle_stage_status.name', 'In Use');
gr.query();

while (gr.next()) {
var Item = gr.getValue('name');
names.push(Item); }

tagValues = names;

sandeepdutt
Tera Patron

Hi @martiniozev ,

You are targetting a massive Array of Data as you are quering  cmdb_ci_business_app table and its running over 100K CIs. 

What i would suggest is to run on individual tag and check if's compliant or not by returing True or false. In Place of using Key Value.

 

Thanks,
Sandeep Dutta

Please mark the answer correct & Helpful, if i could help you.