/build/static/layout/Breadcrumb_cap_w.png

Inventory search on last sync

Advanced Search has "Last Sync" as a criteria, but I can't figure out how to filter. EG, I'd like to find all computers that have not checked in for more than a day, so I tried Last Sync contains d, but that doesn't work. * doesn't work at all as a wild card - no results found. % kinda works, but not in a useful way. If I put % by itself, it returns all my PCs, but I can't use % with the characters d, h or any number.

Sorting without filtering isn't helpful because I want to filter the last sync, then order by computer name.

Any ideas? Thanks.


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: chucksteel 11 years ago
Red Belt
4

I played with this some more and it looks like the Advanced Search does a comparison with the value in the database (even though it displays it as the relative difference). Knowing that I did a search for Last Sync < 2012-09-27% and got machines that haven't checked in since yesterday. The value is stored in the DB as yyyy-mm-dd hh:mm:ss so searching for Last Sync < 2012-09-27 15:% got even more specific to computers the checked in over one day ago (since it's is almost 4:00pm here as I'm writing this).


Comments:
  • Thanks, CS. That's the ticket. I had tried the < and the % separately, so putting them together did it. - tpr 11 years ago
Posted by: dugullett 11 years ago
Red Belt
1

I've never done this in advanced search, but you can create a report for this.

SELECT NAME, LAST_SYNC

FROM MACHINE

where (LAST_SYNC > CURDATE() - INTERVAL 1 DAY)

order by name

Comments:
  • Thanks. I have a report that sorts by last date. It doesn't filter, but I can sort and filter the csv file. The reason I want to have it work in the advanced search is because it will simplify the work I need to do in kbox; for example, checking the non-syncing computers against another db before removing from kbox. - tpr 11 years ago
Posted by: chucksteel 11 years ago
Red Belt
1

Since last sync is one of the fields shown in the list I just sort by that and go from there.

Posted by: jverbosk 11 years ago
Red Belt
1

You could also use a Smart Label to do thi.  Just take what dgullett gave you and create a Smart Label using that for the SQL query. Just change the last line to order by the sync, i.e.:

SELECT NAME, LAST_SYNC
FROM MACHINE
WHERE (LAST_SYNC > CURDATE() - INTERVAL 1 DAY)
ORDER BY LAST_SYNC

If you need help setting up a Smart Label, check this out:

K1000 Labels - Effective Organization & Process Flow Using Manual, Smart & LDAP Labels and Label Groups

http://www.itninja.com/blog/view/k1000-labels-effective-organization-process-flow-using-manual-smart-ldap-labels-and-label-groups

John


Comments:
  • But smart labels only apply when the machine syncs, so wouldn't this label never get applied to a machine? - chucksteel 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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