Search computers still relevant to specified action (baseline)

Ok I’ve cleaned up something a bit that I think you could use as an example. I’ve posted a Web Report on my github page at https://raw.githubusercontent.com/Jwalker107/BigFix/master/Test%20Content/Web%20Reports/dataTables%20-%20Action%20Details%20Report.beswrpt

Building on the earlier examples I posted into the same repo at GitHub - Jwalker107/BigFix: BigFix Samples and working tools, this Web Report runs a Session Relevance query to pull the per-action results from every computer, and uses dataTables.js to render the results into a sortable, searchable, filterable table. The normal Web Reports functions for Filtering by computer or action can also be used.

Because this is a fully-custom report, the options to Add/Remove/Expand columns are not possible. To add or remove columns you’d have to use the ‘Edit Source’ button and modify the two Session Relevance queries that are used. One query builds the names of the column headers, the second query supplies all the row data. The number of columns must be consistent, both queries have to return the same number of cells or dataTables will not render the table correctly.

As with all unofficial content, this is provided ‘as-is’, without support. It’s an example I hope will be useful, and I’ll be happy to answer questions about it, but our Support team won’t have any info about this report.

Just so we have it attached in the forum, the Session Relevance I’m using to drive the query result is

(
item 4 of it as string/* computer id */
, item 5 of it /* computer name */
, item 3 of it /* computer groups string */
, ((if group member flag of it then id of parent group of it as string else "") of item 1 of it as string | "")
, ((if group member flag of it then link of parent group of it  else "" as html) of item 1 of it  | "" as html)
, id of item 1 of it as string | ""
, link of item 1 of it | "" as html
, name of issuer of item 1 of it | ""
, time issued of item 1 of it as string | ""
, status of item 2 of it as string | ""
, exit code of item 2 of it as string | ""
, end time of item 2 of it as string | ""
) of
(
item 0 of it /* computer */
, action of item 1 of it /* action */
, item 1 of it /* action result */
, item 2 of it /* computer groups */
, item 3 of it /* computer id */
, item 4 of it /* computer name */
) of 
(
item 0 of it /* computer object */
, action results of item 0 of it /* action results for computer */
, item 1 of it /* computer groups */
, item 2 of it /* computer id */
, item 3 of it /* computer name */
) of
(
it
, (concatenation ";" of names of bes computer groups of it | "None") /* computer groups is expensive - so only lookup once per computer*/
, id of it as string | "No computer ID"
, link of it | "Unknown" as html
) of
(
bes computers
)

I went through several permutations trying to find the most efficient ways to look up Action Results, and starting from the ‘bes computer’ was the most efficient form I was able to find. I’m certainly open to suggestions if anyone can find improvements on it, as I said it does have trouble when scaling into the tens of thousands of computers.

4 Likes