Session Relevance Query to return BigFix Server Version

Hi

I’ve written a session relevance query to return the version of the BigFix server, and it work on my test setup, but is not returning anything on a customers system (which I do not have direct access to test on).

The query is:

(name of property of it & " " & value of it & " on " & name of computer of it) of (results of (properties of (BES Fixlets whose (analysis flag of it and name of it = "BES Component Versions"))) whose (name of it = "BES Server Version")) whose (value of it != "Not Installed")

Can anyone suggest either how to improve this query, or provide a better solution for returning the server version(s).

I’m calling the query through the API (both SOAP and REST) if that makes a difference.

Thanks in advance.

Gary

This works in my deployment.

How is your customer trying to evaluate this? Are they using the Presentation Debugger from the console?

Note: There is a difference between session relevance evaluation and client inspector relevance evaluation.

Please provide more information as to the use case the customer is employing.

Try adding a couple of existence checks for results and values:

(name of property of it & " " & value of it & " on " & name of computer of it) of (results of (properties of (BES Fixlets whose (analysis flag of it and name of it = "BES Component Versions"))) whose (exists results of it and name of it = "BES Server Version")) whose (exists value of it and value of it != "Not Installed")
1 Like

@BigFixNinja the query is wrapped in a C# app which is executing the query via the SOAP API (also works with the REST API). For me it returns the same result as when I run it in the Presentation Debugger, while for them, no results are returned. But their system is far more complex than mine, covering 80,000+ client devices, and I do not have access to it, I can only ask my contact to run my app against their SOAP API.

@steve Thanks Steve, I’ll give this a try. For me your amended query produces the same result as my original script (which is good), so I’ll try this against the customers system.

It won’t return results if they don’t have that analysis globally activated in their console.

It also won’t work if the account the REST API call is using doesn’t have the ability to see the root server in it’s scope from computer assignment.

I prefer to write the relevance so that it flows logically from right to left. Also, if using plural relevance, then you don’t have to check for existence:

(name of property of it & " " & value of it & " on " & name of computer of it) of results whose (value of it != "Not Installed") of properties whose(name of it = "BES Server Version") of bes fixlets whose(analysis flag of it and name of it = "BES Component Versions")
1 Like

If you don’t want to rely on the BES Component Analysis you can use this simpler relevance:

( version **of** datastore inspectors ) **as** string
3 Likes