Hi All,

I'm trying to create a report that gives us a report of server that have total patches deployed and total patches detected. with the code below i'm getting a list of all deployed and detected for each server.

How do I group them and get the totals?

SELECT MACHINE.NAME AS SYSTEM_NAME, (group_concat(distinct concat(KBSYS.PATCHLINK_PATCH.TITLE,' (',IDENTIFIER,') - ',PATCHLINK_MACHINE_STATUS.DEPLOY_STATUS) order by KBSYS.PATCHLINK_PATCH.TITLE separator '\n')) as DEPLOY_STATUS, group_concat(distinct concat(KBSYS.PATCHLINK_PATCH.TITLE,' (',IDENTIFIER,') - ',PATCHLINK_MACHINE_STATUS.STATUS) order by KBSYS.PATCHLINK_PATCH.TITLE separator '\n') as DETECT_STATUS

FROM MACHINE  left join PATCHLINK_MACHINE_STATUS on PATCHLINK_MACHINE_STATUS.MACHINE_ID = MACHINE.ID LEFT JOIN KBSYS.PATCHLINK_PATCH ON (KBSYS.PATCHLINK_PATCH.UID = PATCHLINK_MACHINE_STATUS.PATCHUID)

WHERE ((( exists  (select 1 from LABEL, MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID AND MACHINE_LABEL_JT.LABEL_ID = LABEL.ID  AND LABEL.TYPE <> 'hidden' and LABEL.NAME = 'C_Servers')) ))  GROUP BY MACHINE.ID ORDER BY SYSTEM_NAME

I'm after the below:

ServerDeployed PatchesDetected Patches
Server0154156

1 Comment   [ + ] Show Comment

Comments

  • is anyone able to help with this? I still don't have it fixed.
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity
Nine Simple (but Critical) Tips for Effective Patch Management
This paper reviews nine simple tips that can make patch management simpler, more effective and less expensive.

Share