I am attempting to create a smart label for all machines who are pending a reboot after the previous patch run.  I attempted to use the sql provided in 
http://www.itninja.com/question/is-there-a-way-to-setup-schedule-to-reboot-machines-which-are-pending-reboot-after-patching-on-the-k1000

which also happens to be the same SQL used to create the prefab report "Devices needing reboot".

The problem is, when I run the report I get different results then when viewing by smart label with the same SQL.  When viewing by label, some machines which aren't even part of our patch schedules are listed.  The report on the other hand is correct.  Any Ideas?

Here is the SQL:
select NAME, IP, LAST_SYNC, UPTIME
from MACHINE
join KBSYS.KONDUCTOR_TASK KT on KT.KUID = MACHINE.KUID and KT.TYPE like 'patch%' and KT.PHASE ='reboot pending'

Thanks in advance.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
I used this query and it seems to work although I did get a couple of false positives (not sure about that).

SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE  
join KBSYS.KONDUCTOR_TASK KT on KT.KUID = MACHINE.KUID and KT.TYPE like 'patch%' 
WHERE KT.PHASE ='reboot pending'
The only differences are the columns returned and I'm using an actual WHERE clause.
Answered 04/22/2015 by: chucksteel
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity