Hi there.
I have been stumped for weeks trying to write a relevance statement that returns the members of a computer group that have a particular custom setting set to YES.
Can anyone show me how this is done?
Hi there.
I have been stumped for weeks trying to write a relevance statement that returns the members of a computer group that have a particular custom setting set to YES.
Can anyone show me how this is done?
Hi,
Do you have an example statement you’ve been trying and we can go from there?
Bill
I’ve tried dozens of different syntax.
Here’s another one that doesn’t work:
names of members of bes computer groups whose(name of it = ‘Patch_Group_1’ ) where value of setting “OKAYTOPATCH” of client is “YES”
Hi
Are you doing this on a client (client relevance) as part of a fixlet or analysis or in web reports/presentation debugger (session relevance)?
Bill
I am using the REST API and doing this through a web query.
(/api/query?relevance=)
The session inspectors are documented here:
http://support.bigfix.com/inspectors/Session%20Objects_Any.html
Have you tried something like…
names of members whose (exists (client settings of it) whose (name of it = "OKAYTOPATCH" and value of it = "YES")) of bes computer groups whose (name of it = "Patch_Group_1" )
This should get us our target groups
bes computer groups whose (name of it = "Patch_Group_1" )
For the client settings we can get all of the client settings of a computer using
client settings of <bes computer>
So we filter it like this:
(client settings of <bes computer>) whose (name of it = "OKAYTOPATCH" and value of it = "YES")
If that setting and value exist it will return which will be caught by exists.
So this:
members whose (exists (client settings of it) whose (name of it = "OKAYTOPATCH" and value of it = "YES"))
Should be all of the computers that have that setting with that value
You have solved my problem! Thank you!
This comes down to my unfamiliarity with relevance. I am learning but slowly.