/build/static/layout/Breadcrumb_cap_w.png

HOW TO: Smart label for Dell Machines older than X years

Hey Guys,

I'll keep this one short and sweet. Here's some SQL to create a label for all machines older than 2 years old.

 

SELECT *, 
       Unix_timestamp(NOW()) - Unix_timestamp(LAST_SYNC) AS LAST_SYNC_TIME, 
       Unix_timestamp(MACHINE.LAST_SYNC)                 AS LAST_SYNC_SECONDS 
FROM   ORG1.MACHINE 
       LEFT JOIN KBSYS.KUID_ORGANIZATION 
         ON ( KUID_ORGANIZATION.KUID = MACHINE.KUID ) 
       LEFT JOIN KBSYS.SMMP_CONNECTION 
         ON ( SMMP_CONNECTION.KUID = MACHINE.KUID 
              AND KUID_ORGANIZATION.ORGANIZATION_ID = 1 ) 
       JOIN KBSYS.DELL_ASSET DA 
         ON ( MACHINE.BIOS_SERIAL_NUMBER = DA.SERVICE_TAG ) 
WHERE  DA.SHIP_DATE < DATE_SUB(NOW(), INTERVAL 2 YEAR) 

 

 

Hope it helps.


Comments

  • A related comment, ...I love using DATE_SUB(NOW(), for all my custom reports. It makes them always active rather than hardwiring in date ranges. A lot of help desk queries that I've written use ranges like last 30, last 90 etc. - dan@kace.com 12 years ago
  • I setup the smart label but the results aren't quite accurate. Does it rely on the Dell Update schedule to be setup? We haven't configured that, yet. - chucksteel 12 years ago
    • What version of the K1 are you on? It does require at least 5.3 to get the dell warranty info. - dchristian 12 years ago
      • We're running 5.3.47927. The warranty information appears and I see now that it does appear there. I had tried setting the interval to 4, however and machines were appearing that were newer than that. Running the SQL query yields correct results, but the smart label is being applied to newer systems. - chucksteel 12 years ago
      • Hmmm... that's weird.. What happens when you force a check-in on these "incorrect" machines. I've seen this happen if there's machines associated to a label before you enter the custom SQL. - dchristian 12 years ago
This post is locked
 
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