/build/static/layout/Breadcrumb_cap_w.png

KACE:: Last Reboot and Last Sync Smart Machine Label

When creating a Smart Machine Label for 'Last Reboot' or 'Last Sync', many people often wonder what the configuration is needed for the third field in order to get the search criteria to work properly.

In reality, by design the advanced search feature cannot query the dynamic time interval.  Instead, you will need to use a MySQL query in order to get the information you desire with a WHERE statement of when sync or last reboot occurred.

WHERE LAST_SYNC > DATE_SUB(now(), interval 24 hour)


Comments

  • This is a great tip. Note that you can save the smart label in the GUI, but you will need to edit the SQL query and remove the single-quote marks surrounding the query fragment. - MacDude 12 years ago
  • This is a great tip! I'm still a SQL newb. If I want to make this label capture machines that have rebooted more than 30 days ago do I do this?:

    WHERE LAST_REBOOT > DATE_SUB(now(30), interval 24 hour) - awingren 11 years ago
  • OK. I just figured out I can do this:
    where (( UPTIME > '30')) - awingren 11 years ago
    • WHERE LAST_REBOOT > DATE_SUB(NOW(), INTERVAL 30 DAY) will work. - dugullett 11 years ago
  • I have used the below query which works perfect for a report. Why will it not work for a smart label?
    SELECT MACHINE.NAME AS SYSTEM_NAME, MACHINE.IP, USER_LOGGED, LAST_REBOOT, LAST_SYNC FROM MACHINE WHERE DateDiff(CurDate(), LAST_REBOOT) > 30 ORDER BY LAST_REBOOT - rsm11 11 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