Posted on 05-08-2017 10:40 AM
Dear Experts,
I hope this is not too twisted. In fact it is not as twisted as the title suggests (I believe).
I have an extension attribute that is a date. For many nodes the entry for that EA is empty. Is there a way to use that as a criterion for smart group membership? The reports with an empty 'value_on_client' field have '0' in the 'date_value_epoch' field, which corresponds to 1970 01 01 01:00:00. So I would expect that a criterion like before '2000-01-01' should catch all these. Unfortunately it does not, I expect that jamf does a special treatment for the empty date field.
Did anybody succeed in finding a criterion to select empty date fields?
Thanks in advance for your help,
Matthias
Posted on 05-08-2017 12:29 PM
There's seemingly no way to do this, likely because of how the data is stored in the database (Date vs plain string) I have a small number of machines that have an empty value in a date based EA and I couldn't figure out a way to gather them. Even using something like more than x days ago
and putting in something like 10000
for the value doesn't gather them. : /
I noticed in my case, those few systems with the empty value are not showing anything for it in the API. It just has a <value/>
tag where it would normally be <value>[some value]</value>
There is a way to build Smart Groups on empty data in regular string fields, but I was recently told by Jamf this is not recommended. Apparently this puts a strain on the JSS because it's akin to doing a wilcard search against an entire table in the db, versus looking for something specific. Especially if that table is large, like I recently had an issue with, this makes Smart Group calculations that use that information (and use a blank criteria search) eat up a lot of resources and hold onto connections from the Tomcat web apps into the database, so it's not a great idea overall.
Posted on 05-09-2017 02:10 PM
Unless this is the way that @mm2270 was told not to use you can do it using two smart groups.
Create one group with the criteria:
XXX More than 0 days
or
XXX Less than 0 days
This will return every computer with a date in the specified field.
Then create a second group with the criteris:
Computer Group Not a member of First Group
This will return all the blank dates for that field.
Posted on 02-04-2019 02:53 PM
Thanks for this, @Look - this saves a lot of time when doing a lookup!