/build/static/layout/Breadcrumb_cap_w.png

SQL query based smart label

I have used the SQL query from the report called "Devices Needing Reboot" to create a smart label for the devices which are stuck on reboot pending in the patch cycle, so I can create automatic alerts for the users to reboot.

The query in the report is working fine so as from the MySQL workbench tool but it doesn't work properly for the smart label, it attaches the labels to the machines which don't have reboot pending status, I see all the devices in label with and without reboot pending status. 

Is anyone came across with this type of issue?

I am running Version: 10.1.99 on the server and 10.0.113 for the agents.

The query:

select DISTINCT NAME, IP, LAST_SYNC, UPTIME from MACHINE join KBSYS.KONDUCTOR_TASK KT on KT.KUID = MACHINE.KUID and KT.TYPE like 'kpatch%' and KT.PHASE ='reboot pending' order by MACHINE.NAME



4 Comments   [ + ] Show comments
  • The query looks fine to me. The issue could be due to the device labels only updating when the machine inventories while the patching runs on a different schedule. - paulfaz 4 years ago
  • I have already mentioned, query worked fine on the report and SQL Workbench, it's the label. Almost all devices [300+] are attached to this label however, in reality, there are only 24 devices pending for the reboot. - tahirebi 4 years ago
  • im in the same boat, did you ever find a fix for this? - nygiants907 4 years ago
  • im in the same boat, did you ever find a fix for this? - nygiants907 4 years ago
    • Unfortunately, No, I couldn't find a fix for it and I gave up. :( - tahirebi 4 years ago

Answers (1)

Posted by: chucksteel 4 years ago
Red Belt
0

If you create a smart label using the wizard it selects these columns:

MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID 

I'm pretty sure that last MACHINE.ID as TOPIC_ID is the most important bit, but I always set my SQL smart labels to return those columns.

 
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