Reporting on Software not installed

march
Kilo Guru

We are collecting the laptop/desktop information through the Help the Help Desk in the login script. Now, as part of a compliance check, we need to report on computer not running a certain piece of software.

e.g.:
Hostname Software
COM-0001 SoftwareA 1.2.3
COM-0003
COM-0004 SoftwareA 1.2.3

Looking at this report we would see which machine don't hold that mandatory software.
We found it quite easy to report on discovered machines, on machines running the software, but i can't find an easy way to have a single report listing the discovered machine together with the information around that specific software.

Anybody encounter the same kind of requirement?

22 REPLIES 22

scott111
Kilo Expert

Create Script Include called ComputersWO_Software with this code:



function ComputersWO_Software(SoftName1) {


// var SoftName = 'IBM BigFix Client';


// gs.print('SoftName1=' + SoftName1);


var computers = '';


var queryString = "operational_status!=2";


var gr = new GlideRecord('cmdb_ci_computer');


gr.addEncodedQuery(queryString);


// gr.setLimit(100);


gr.orderBy('name');


gr.query();


while (gr.next()) {


  // gs.print(gr.name);


  var ComputerName = gr.sys_id;


  // gs.print('   ' + ComputerName);


  var soft = new GlideRecord('cmdb_software_instance');


  soft.addQuery('installed_on', ComputerName);


  soft.addQuery('name', SoftName1);


  // soft.setLimit(100);


  soft.query();


  var softcount = soft.getRowCount();


  // gs.print('softcount=' + softcount);


  if (softcount == 0) {


  // gs.print('   ' + SoftName1 + ' not installed on ' + ComputerName);


  if (computers.length > 0) { computers += ','; }


  computers += ComputerName;


  }


  }


return computers;


}




THEN select Computers under Configuration with query:   Sys id is one of javascript:ComputersWO_Software('IBM BigFix Client');     where 'IBM BigFix Client' is a value copied from name field in cmdb_software_instances table.


david1234
Kilo Explorer

Due to your Antivirus and other firewall software installed, you cannot install certain software because of blockage privacy settings. You can find more help at K7 Antivirus Customer Support

Adam Peterson
Kilo Sage

I was able to accomplish this through the Related List Conditions on the report.

  • Report table will be cmdb_ci_computer table.
  • Related List Condition set to 'None'.
  • Related List Condition table = Software Installation->Installed On
  • Add the filter. etc Name Contains Carbon Black or Publisher is Carbon Black.

This should bring back records of CIs that DO NOT have carbon black software on there. Hope this helps someone. 

find_real_file.png