(imported comment written by JasonWalker)
There are several ways to do this.
First off, Welcome to Relevance! Lot of terms in here that you can find out more about by Googling; but the BigFix documentation is scattered and poor, so if you don’t know these terms it’s hard to find them. One of the better references for both Client Relevance and Session Relevance is at
https://support.bigfix.com/inspectors/Action%20Objects_Any.html
“Session Relevance” is evaluated by the server. Useful in the BigFix Console, Web Reports, Dashboards, etc. Since Session Relevance is evaluated by the server, not the client, you can’t use Session Relevance to determine things like fixlet applicability. You can use it in the administrative tools.
“Client Relevance” is evaluated by the client. It can do things like determine whether a fixlet is applicable, or provide an answer for an Analysis.
To test Session Relevance, easiest way is to use the Presentation Debugger. In the BigFix Console, press “CTRL-ALT-SHIFT-D” (no, I’m not kidding). This brings up the Debugger. Click the checkbox in the upper left that says “Show Debug Menu”, then you can close the debug window. If you look at the menu bar at the top of the console, you’ll see a new option “Debug” right next to “Help”. Select Debug->Presentation Debugger to get to a place where you can evaluate Session Relevance.
In Session Relevance, you can do an evaluation like
(name of it, (now - last report time of it) / day ) of bes computers
and get a result like
hostname1, 0
hostname2, 29
That’s usable in the Console, custom Dashboards, and in Web Reports.
If this needs to be configured as a Client Setting, there’s a similar thing you can do on the client. Looking at your earlier post -
q:
((now
(apparent registration server time))
/
day)
as
string
&
" days"
E:
No inspector context.
The problem there is that the Fixlet Debugger, by default, runs in a separate process and cannot look at realtime client values. You need to select Debug -> Evaluate Using -> Local Client Evaluator in order to have the Fixlet Debugger run the Q: through the real BigFix Client. Note this command then ends up in the normal client polling cycle, so it will run a LOT slower than using the Fixlet Debugger Evaluator. Then I think what you’re looking for is:
q: ((now - last report time of client) / day) as string & " days"
A: 0 days
As has been pointed out, the client can evaluate this any time, but it won’t report the value back to the server until…it reports in to the server. So the value that’s being reported is always going to be “now”. So this might be useful to run in a Client Dashboard, or maybe as Relevance on a Policy Action, but you aren’t going to see much in the way of useful results from this in the console.
Where I’ve done something similar is to use an Analysis that creates a property in a date format that’s easier to sort. While it’s not easy to sort the “Last Report Time” client property because it’s written out like “Sunday, June 6 2014 …”, you could use an Analysis to report the date as YYYY_MM_DD so it sorts properly:
q: (year of it as string & “" & month of it as two digits as string & "” & day_of_month of it as two digits as string) of date (local time zone) of now
A: 2014_06_08