Managed Property - Last Report Time

(imported topic written by cstoneba)

I am trying to create a property that displays whether or not the client has checked in within the last 90 days. This is what I have but it doesn’t seem to work.

if apparent registration server time as universal string > 90*day then “Yes” else “No”

What makes this difficult is when you try and run the command “apparent registration server time as universal string” within the QnA, it says “No inspector context”

(imported comment written by Lee Wei)

Hi cstoneba,

I see different issues with what you need to accomplished. Can you jusy use the Last Report Time property in the Console instead?

  • The Relevance Debugger (QnA) is not the actual client, that is why it does not have the inspector to perform the query.

Use the Client API Tester that will send the query to the actual BigFix Client: http://forum.bigfix.com/viewtopic.php?id=2756

  • Your statement needs to be modified to:

if (now - apparent registration server time) > 90*day then “Yes” else “No”

Lee Wei

(imported comment written by cstoneba)

This probably won’t work though will it, becuase a client will have to check in to report back as “Yes”. That will reset the Last Report time days back to 0. I’m just looking for an easy way to see clients that are so many days old so we can remove them, and I don’t want to use the Expired Computer Removal tool.

(imported comment written by jessewk)

Paste the following code into the Presentation Debugger. Make sure to select the ‘Presentation’ radio button and click evaluate.

There are computers that have not reported in the last 30 days.

It will tell you how many computers are out of date and if you click on the number it will open them as an ad-hoc group.

You can create a custom web report using the same code, but it will need to be cleaned up to support non-IE browsers.

(imported comment written by cstoneba)

well that’s pretty cool. Thanks jessewk

(imported comment written by SystemAdmin)

How would I turn something like below into a Report ?

jessewk

Paste the following code into the Presentation Debugger. Make sure to select the ‘Presentation’ radio button and click evaluate.

There are

computers that have not reported in the last 30 days.

It will tell you how many computers are out of date and if you click on the number it will open them as an ad-hoc group.

You can create a custom web report using the same code, but it will need to be cleaned up to support non-IE browsers.

(imported comment written by SystemAdmin)

mamacher

How would I return something like

There are 12 Windows computers that have not reported in the last 30 days
There are 8 Linux computers that have not reported in the last 30 days

to be able to break it down a little more
we have several different groups that handle the different OS’s
the main ones who really care are Windows and Linux

{quote:title=jessewk}Paste the following code into the Presentation Debugger. Make sure to select the ‘Presentation’ radio button and click evaluate.

There are

computers that have not reported in the last 30 days.

It will tell you how many computers are out of date and if you click on the number it will open them as an ad-hoc group.

You can create a custom web report using the same code, but it will need to be cleaned up to support non-IE browsers.

{quote}

(imported comment written by SystemAdmin)

Im trying to narrow down the results and only show say windows systems in the last 30 days

below I assume is close but get a error “the operator “results” is not found”

(names of it, operating system of it) of computers of results whose ((exists value whose (it as time < now - 30 * day) of it) of bes property “Last Report Time” and (exists value whose (name of operating system as lowercase starts with “win”)of it) of bes property “OS”)

(imported comment written by MattBoyd)

Yes, you were on the right track. There were a few issues:

(names of it, operating system of it) of computers of results whose (exists value whose (it as time < now - 30 * day) of it and  (operating system of computer of it as lowercase starts with "win") ) of bes property "Last Report Time"

(imported comment written by SystemAdmin)

Thank You, Worked great

(imported comment written by SystemAdmin)

Here’s my report on machine names that have not reported in the last 30 days,

How would I get a total “COUNT” of these computers

<?Relevance concatenation of trs of (td of names of it& td of operating system of it) of computers of results whose (exists value whose (it as time < now - 30 * day) of it and (operating system of computer of it as lowercase starts with "win")) of bes property "Last Report Time" ?>

Computer

Operating System

(imported comment written by NoahSalzman)

“number of” will get you a count of items returned from a Relevance query. So, without having tried this myself, you are looking for something like this:

number of (computers of results whose (exists value whose (it as time < now - 30 * day) of it and (operating system of computer of it as lowercase starts with “win”)) of bes property “Last Report Time”)

(imported comment written by SystemAdmin)

This is what I came up with, is there a way to combine them ? or is this the best way

There are computers that have not reported in the last 30 days.

<?Relevance concatenation of trs of (td of names of it& td of operating system of it) of computers of results whose (exists value whose (it as time < now - 30 * day) of it and (operating system of computer of it as lowercase starts with "win")) of bes property "Last Report Time" ?>

Computer

Operating System

(imported comment written by SystemAdmin)

thank you :slight_smile:

this is what I have now… it outputs better to a scheduled report then having in the code

<b><h3><?Relevance number of (computers of results whose (exists value whose (it as time < now - 30 * day) of it and  (operating system of computer of it as lowercase starts with "win")) of bes property "Last Report Time")?> computers that have not reported in the last 30 days.</b></h3><hr>
<table border=0><tr><td><h3>Computer</td><td><h3>Operating System</td></tr>
<?Relevance concatenation of trs of (td of  names of it& td of operating system of it) of computers of results whose (exists value whose (it as time < now - 30 * day) of it and  (operating system of computer of it as lowercase starts with "win")) of bes property "Last Report Time" ?>
</table>

(imported comment written by SystemAdmin)

how can I add a property value to the code below

trs of (td of  names of it& td of operating system of it) of computers of results whose (exists value whose (it as time < now - 30 * day) of it and (operating system of computer of it as lowercase starts with "win")) of bes property "Last Report Time"

((name of property of it) as lowercase = “location”)

i would like the output to be “Computer name…Operating System…Location”

something like below

(td of names of it & td of operating system of it & td of value of property “Location” of it)

(imported comment written by BenKus)

Try:

(td of names of it & td of operating system of it & td of value of results of (bes property “Location”, it)) …

Ben

(imported comment written by SystemAdmin)

I still get an error “The operator “results” is not defined.”

<?Relevance  trs of (td of  names of it& td of operating system of it & td of value of results of (bes property "location" ,it)) of computers of results whose (exists value whose (it as time < now - 30 * day) of it and  (operating system of computer of it as lowercase starts with "win")) of bes property "Last Report Time" ?>

(imported comment written by Lee Wei)

Mark,

For the session relevance statement posted, you have an extra “of” behind results. It should be:

trs of 
(td of  names of it & 
td of operating system of it & 
td of value of results (bes property "location" ,it)) 
of computers 
of results whose 
    (exists value whose (it as time < now - 30 * day) of it and 
    (operating system of computer of it as lowercase starts with "win")) 
of bes property "Last Report Time"

(imported comment written by SystemAdmin)

Getting an Error

“Error: Singular expression refers to nonexistent object.”

I have tried other properties like “OS”… same error

when I use “BIOS” it seems to work fine also “Location” is a properties that I created

(imported comment written by jessewk)

The problem is that some of your computers are not reporting results for the “Location” property. You can use the following trick to make a blank cell for those computers. If you want it to say something like “no result”, you can substitute an if/then/else clause for the existence of the property result instead:

trs of
(
td of names of it & td of operating systems of it & td of concatenation “;” of values of
(
results
(
bes property “Location” ,it
)
)
)
of computers of results
whose
(
exists value
whose
(
it as time < now - 30 * day
)
of it
)
of bes property “Last Report Time”