Posted on 09-09-2013 09:35 AM
Is it possible to query Inventory via UUID? Basically I have a UUID, I want it to spit out back at me the computer in JSS.
Posted on 09-16-2013 09:27 AM
Did you find an answer, hkim? I'd like to be able to do this as well. Seems like it should be do-able via an extension attribute that looks at System Information, but I don't want to reinvent the wheel if it already exists out there.
Posted on 09-16-2013 09:29 AM
I was able to use MySQL Workbench to look directly into the tables in question and have them match up. Basically exporting a CSV from MySQL Workbench manually for reach group (UUID and Computer Name).
You could do it via EA, but that would require each of the computers to resubmit inventory, but again that is re-inventing the wheel since the data is already there.
Posted on 09-16-2013 09:44 AM
Thanks for the quick reply!
Posted on 09-16-2013 09:51 AM
Huh. In the JSS, there's already an entry in every managed system's record for a UDID, and this appears to be the same as UUID. But doing an inventory search for a string from one of the managed system's UUID's (aka UDID apparently) doesn't get me any results. Not sure why this data is not searchable.
Posted on 09-16-2013 09:53 AM
It just isn't searchable. *shrug* Thus there's no way to match it up. That's why I just used the raw data in MySQL and extracted it that way.
Posted on 09-16-2013 09:56 AM
Ah, gotcha, you're way ahead of me. :)
Posted on 09-16-2013 11:56 AM
@hikim and @althea
What version of the JSS are you currently on? With version 9.x of the JSS you can do this search and have it pull back the computer record properly. If you are using version 9.x and this isn't working please contact your JAMF Software Account Manager to resolve this issue.
Thanks,
Joel
Posted on 09-16-2013 12:06 PM
We're running 8.64, and will continue to do so for awhile yet.
Posted on 02-17-2014 12:54 PM
I have the same thing here. we have not moved on to Version 9. I created an extension attribute for this info. Here it is.
#!/bin/sh
#This script is to be used with JSS version 8.7
#Pulls UUID number.
Devices=system_profiler SPHardwareDataType | grep 'Hardware UUID' | cut -c 21-60
#Output for extension attribute
echo '<result>'$Devices'</result>'
Posted on 03-11-2014 07:57 AM
We are on 8.73, I can't get the UUID to populate is it compatible with 8.73?
Posted on 05-27-2014 08:44 AM
I updated this script to use awk instead of cut. This is working successfully in our 8.73 environment.
#!/bin/sh
#This script is to be used with JSS version 8.73
#Pulls UUID number.
UUID=system_profiler SPHardwareDataType | grep 'Hardware UUID' | awk '{ print $3 }'
#Output for extension attribute
echo '<result>'$UUID'</result>'
Posted on 05-27-2014 08:49 AM
I would consider using ioreg to pull that information since its way faster than calling system_profiler in a script
UUID=$( ioreg -rd1 -c IOPlatformExpertDevice | awk -F'"' '/IOPlatformUUID/{print $4}' )
Posted on 05-27-2014 08:54 AM
Right you are! That is much faster! Thanks!