/build/static/layout/Breadcrumb_cap_w.png

Smart Label for Devices with Reboot Pending status after Deploy

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.

1 Comment   [ + ] Show comment
  • Is there a phase for failed? I tried that query but changed it to failed and not working. Not sure what else it would be. - DevilZ28 6 years ago
    • Device > Security shows the phase of patch job. in my case I am seeing error or error (Log Upload Failed) not sure how many other types of phases result in a fail. - DevilZ28 6 years ago
      • Here are the phases from the KBSYS.KONDUCTOR_TASK table on my appliance:
        'cancelled'
        'completed'
        'completed (Platform not supported or subscribed).'
        'deploying'
        'downloading'
        'error'
        'error (Handshake Failed)'
        'error (Log Upload Failed)'
        'error (Patch List Download Failed)'
        'error (Signature Download Failed)'
        'reboot pending'
        'reboot snoozed'
        'scheduled'
        'snoozed'
        'suspended'
        'upload1'
        'upload2'
        'upload3'
        'verifying'
        'waiting to connect'

        I can't guarantee that is an exhaustive list, but creating a smart label using KT.PHASE like 'error%' will apply to all of those with an error, which will get you started. - chucksteel 6 years ago

Answers (1)

Posted by: chucksteel 9 years ago
Red Belt
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.
 
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