I am trying to create a smart label that will collect machines that have been recently (within the last 24 hours) added to Kace; I do not care when the OS was installed.  
What I would like to do with this label is then assign it to an aggressive patching sequence.   However, it appears that most of my machines are being added to this smart label.  Which is really strange because if I run the mysql using MYSQL workbench it works correctly.  So with smart labels, if a machine is added does it not remove itself once it no longer satisfies the criteria?  

SELECT MACHINE.NAME AS SYSTEM_NAME
 FROM MACHINE where CREATED   > DATE_SUB(NOW(), INTERVAL 1 DAY)   ORDER BY SYSTEM_NAME
2 Comments   [ + ] Show Comments

Comments

  • Are you using this exact query in the smart label? I made a label like this on my KBox using the wizard and this is the query is generated:
    SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE WHERE (((TIMESTAMP(MACHINE.CREATED) <= NOW() AND TIMESTAMP(MACHINE.CREATED) > DATE_SUB(NOW(),INTERVAL 1 DAY))))

    At this point it is only applying to the correct machines.
    • Chuck that appears to be working! Thanks again!
  • Thanks Chuck! Yes I am using the exact query above, I created it manually. I will try your query and let you know.
Please log in to comment

Answers

0
Answered in Comments.
Answered 07/10/2014 by: MacDude
Fourth Degree Brown Belt

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

Share