How to reference automatic group membership in relevance?

(imported topic written by amagewick91)

I would like to know how to do this, and I can’t seem to stumble across the answer!

(imported comment written by NoahSalzman)

Here is one example:

names of bes computer groups whose (automatic flag of it)

Check out the Session Inspector guide

here

for more info.

(imported comment written by amagewick91)

I haven’t gotten into session relevance yet, so that guide confuses me at this moment. I want if possible something that will work in the action script, so that I can run different lines depending on what group the computer is in.

(imported comment written by Lee Wei)

Session Relevance is meant for the BigFix Server. Since you are working with the BigFix Client, we need a relevance that the Clients will know how to evaluate.

Sounds like you need a statement to return True/False depending on whether the computer belongs to a specific Automatic Computer Group.

The Relevance is:

member of group <integer> of sites
Example: member of group 32 of sites

Go to the BigFix Console and find the ID for your automatic computer group.

  • Note that if the Console does not have the ID column, you can right-click on the column headers and then choose to display ID.
  • Note that you should remove 00- in front of the ID.
  • Also note that the above statement will not work in the Fixlet Debugger/Relevance Debugger/QnA tools because the actual BigFix Client needs to evaluate the command.

You can use the “BigFix Client API Tester” if you want to test this on your computer without actually running the ActionScript.

http://forum.bigfix.com/viewtopic.php?id=2756

Lee Wei

(imported comment written by SystemAdmin)

Lee, can this only be used in action script? Or can be use it client relevance as well?

(imported comment written by SergioBenavides)

To use it in a relevance try the following:

(exists true whose (if true then (exists setting "YOUR GROUP NAME HERE" whose (value of it is "True") of client) else false))

You can get the group name from : HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\Settings\Client

As opposed to “member of group of sites” the above relevance can be tested by using the debugger.

(imported comment written by amagewick91)

Ah very good, now onto the next problem! Can I use an if/else type of statement like the following? I want to replace the “”“dos MSG *”"" commands with different things, but for now I can test with the MSG command. I am looking in the Action Guide and I am not seeing it.

If {member of group 130 of sites}
dos MSG * Group 130
Else If {member of group 132 of sites}
dos MSG * Group 132
Else {member of group 131 of sites}
dos MSG * Group 131
Else {member of group 5321 of sites}
dos MSG * Group 5321
else {member of group 129 of sites}
dos MSG * Group 129
endif

I did this as a test and it popped up multiple MSG commands for various groups… of which the client was NOT a part of.

If {member of group 130 of sites}
dos MSG * Group 130
Else If {member of group 132 of sites}
dos MSG * Group 132
endif
 
If {member of group 131 of sites}
dos MSG * Group 131
Else If {member of group 5321 of sites}
dos MSG * Group 5321
endif

(imported comment written by Lee Wei)

jspanitz,

Yes, these are valid client relevance.

Lee Wei

(imported comment written by Lee Wei)

amagewick,

A few ideas:

  • We need to get the correct syntax for the if-else statements. They are a little tricky. They should be:

    If {member of group 481 of sites}
    dos MSG * Group 481
    ElseIf {member of group 482 of sites}
    dos MSG * Group 482
    ElseIf {member of group 32 of sites}
    dos MSG * Group 32
    Else {member of group 483 of sites}
    dos MSG * Group 483
    endif

  • Please note that the Group ID needs to be valid, otherwise, you will get an error.

  • Also, check the Client log file for the error returned when not successful. This will usually give us a good indication of the problem.

Lee Wei

(imported comment written by amagewick91)

I will check this out and let you know! I tried all “Else If” and then all “Else” previously but both did not work.

2 posts were split to a new topic: Issues with group membership relevance

Hi leewei,
I’ve tried your suggestion with FixletDebugger, but got an error that says:
Command failed (This expression contained a character which is not allowed.)

can you please help with debugging?

thank you