Here is the SQL of a report to genereate a nice table of critical patches Patched, Un Patched and % complete by patch vendor.
Select P.VENDOR AS 'Crtitical Patches by Vendor',
COUNT(CASE WHEN S.STATUS='PATCHED' THEN S.MACHINE_ID END) as PATCHED,
COUNT(CASE WHEN S.STATUS='NOTPATCHED' THEN S.MACHINE_ID END) as UNPATCHED,
CONCAT(ROUND(COUNT(CASE WHEN S.STATUS='PATCHED' THEN S.MACHINE_ID END)/(COUNT(CASE WHEN S.STATUS='NOTPATCHED' THEN S.MACHINE_ID END)+COUNT(CASE WHEN S.STATUS='PATCHED' THEN S.MACHINE_ID END))*100),'%') AS 'Percent Patched'
from PATCHLINK_MACHINE_STATUS S, MACHINE, KBSYS.PATCHLINK_PATCH P, PATCHLINK_PATCH_STATUS PS
where
MACHINE.ID = S.MACHINE_ID and
PS.PATCHUID = P.UID and
S.PATCHUID = P.UID and
P.IMPACTID like "Critical" and
P.IS_SUPERCEDED = 0 and
PS.STATUS=0
group by P.VENDOR
order by P.VENDOR
We use this for compliance reporting. It provides exactly what we need!
John - jverbosk 12 years ago