BigFix's native relevance language and built-in APIs, allow operators to pull platform-based data for various purposes such as Reporting, Third-Party integrations and automation.
The quickest way to begin testing some querries is by using the built-in debugger tool, which is hidden by default, provided by the BES Console.
The Presentation Debugger
To enable and start using the 'Presentation Debugger', we need to open the BigFix Console, wait until it is fully loaded and hold the left 'Alt' + 'Ctrl' + 'Shift' keys and press the latter 'D'.
This key combination should open up a windows titled 'Debug', check the 'Show Debug Menu' box and close the window using the 'X' button.
Now click on the 'Debug' menu and click on the 'Pesentation Debugger...' item.
Say hello to my little friend:
For the first example, We will pull all relevant Microsoft patches with a severity of 'Critical' and display the relevant computer names for each patch:
(names of it, concatenation " ; " of (names of applicable computers of it as string)) of relevant fixlets whose (source severity of it = "Critical" AND source of it = "Microsoft") of bes computers
Click on 'Evaluate' to see the results.
The above example shows the patch names and computer names which reported back as relevant.
This data can now be used as a report or sent as a CSV file that third-party application can digest.
Export to CSV Utility
Another utility can be used to leverage the query above and write the results to a file located on a remote location.
The utility is called 'ExportToCSV' and can be downloaded from here.
Web Reports
Another method of using session relevance is within reports. let's create one :)
Open the Web Reports (In the console, click on the 'Tools' menu and select 'Launch Web Reports'.
Click on 'Explore Data' and then 'Custom'.
If 'Custom' is not visible than we need to enable it via registry:
Open the registry editor on the BigFix Root Server and go to the following location and set the two top values as seen below:
Inside 'Custom', we can now create a blank report using the same relevance query above to pull the information and present it as a report.
Before we can actually visualize the data in a readable manner, we need to create some HTML objects to structure the data, copy and paste the code below in the source area and click on 'Preview'
<HTML>
<BODY>
<TABLE border="1">
<?relevance tr of concatenation of (th of "Patch Name" & th of "Computers") & concatenation of trs of (td of (item 0 of it as string) & td of (item 1 of it as string)) of
(names of it,concatenation " ; " of (names of applicable computers of it as string)) of relevant fixlets whose (source severity of it = "Critical" AND source of it = "Microsoft") of bes computers?>
</TABLE>
</BODY>
</HTML>
The result should look something like this:
We can now add some css styles to make the table better looking, here's an example:
This report can now be shared via direct link to Web Reports.
Enjoy!
Comments