/build/static/layout/Breadcrumb_cap_w.png

Looking for a SQL report to show Installed Patches with Installed dates and times, based on Machine Label?

Also using the report wizard under Patch, what does Machine Status = Patched mean? I get random numbers for each patch?


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: jverbosk 11 years ago
Red Belt
0

Try this, it's basically a reworking of dugullett's query here:

http://www.itninja.com/question/report-to-show-recently-installed-patches

Tweak the "AND L.NAME rlike" line to use whatever you want - from 1 to however many machine label names you want to include.  Also, it's set to just return the last 7 days of patching activity as a start - increase this as you see fit, but be aware that there is the potential for hanging your K1000 if you remove it and end up returning hundreds of patches for thousands of machines.

As for your question, each patch has a Lumension ID associated with it, so I'm assuming that's what the "random numbers" may be.  Would have to see it to know for sure.

John

______________________________

SQL Select Statement:
SELECT DISTINCT M.NAME AS MACHINE, PP.TITLE AS PATCH_TITLE,
PM.DEPLOY_STATUS_DT AS DEPLOY_DATE, PM.STATUS
FROM MACHINE M
LEFT JOIN PATCHLINK_MACHINE_STATUS PM ON (PM.MACHINE_ID = M.ID)
LEFT JOIN KBSYS.PATCHLINK_PATCH PP ON (PP.UID = PM.PATCHUID)
JOIN MACHINE_LABEL_JT ML ON (M.ID = ML.MACHINE_ID)
JOIN LABEL L ON (ML.LABEL_ID = L.ID)
WHERE (DEPLOY_STATUS_DT > CURDATE() - INTERVAL 7 DAY)
AND L.NAME rlike 'Label1|Label2|etc'
ORDER BY M.NAME, PP.TITLE

Break on Columns: MACHINE

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ