Topic
  • 9 replies
  • Latest Post - ‏2014-04-01T13:10:46Z by SergioBenavides
amagewick91
amagewick91
76 Posts

Pinned topic How to reference automatic group membership in relevance?

‏2010-07-28T15:16:52Z |
I would like to know how to do this, and I can't seem to stumble across the answer!
  • NoahSalzman
    NoahSalzman
    676 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-28T18:06:52Z  
    Here is one example:

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

    Check out the Session Inspector guide here for more info.
  • amagewick91
    amagewick91
    76 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-28T21:48:59Z  
    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.
  • Lee Wei
    Lee Wei
    296 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-28T22:01:20Z  
    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
  • SystemAdmin
    SystemAdmin
    2808 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-29T15:44:33Z  
    Lee, can this only be used in action script? Or can be use it client relevance as well?
  • amagewick91
    amagewick91
    76 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-29T16:57:56Z  
    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
    
  • Lee Wei
    Lee Wei
    296 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-29T18:37:36Z  
    jspanitz,

    Yes, these are valid client relevance.

    Lee Wei
  • Lee Wei
    Lee Wei
    296 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-29T18:40:05Z  
    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
  • amagewick91
    amagewick91
    76 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2010-07-30T11:24:33Z  
    I will check this out and let you know! I tried all "Else If" and then all "Else" previously but both did not work.
  • SergioBenavides
    SergioBenavides
    9 Posts

    Re: How to reference automatic group membership in relevance?

    ‏2014-04-01T13:10:46Z  
    Lee, can this only be used in action script? Or can be use it client relevance as well?

    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 <integer> of sites" the above relevance can be tested by using the debugger.