Forum Discussion

marting's avatar
marting
Icon for Neophyte rankNeophyte
4 years ago

Dynamic group membership refresh interval?

Hi all,

Reading about dynamic groups, it sounds like they will both gain and lose members dynamically (which is what I would expect).

What I want to find out is...

If you have a resource within a dynamic group because it matches the criteria for that DG (a property in this case), and then you remove that criteria (i.e. delete the property), how long before the resource is removed from that group?

I'm assuming there is some sort of refresh interval on DGs but I'm curious to know what that is and/or if it's configurable.

Thanks!

  • Anonymous's avatar
    Anonymous

    Ok, remember that inherited properties can't be used to populate dynamic groups. I'm not completely following what you did there, but that may be the issue. If that's the case, you could set the property using a propertysource. That would make the property not inherited but defined locally, which might get you working.

  • On 6/23/2021 at 6:50 AM, Stuart Weenig said:

    I'm curious what your expression was before and what you changed it to.

     

    The property and the AppliesTo function basically did the same exact thing but using the property didn't work right; maybe if I waited long enough, the group memberships would have been resolved but I'm not sure.

    Basically, using these to group together resources from many sub-groups in one group.

     

    The property:

    • Applies To:  join(system.staticgroups,",") =~ "/GroupName/"
    • println "team=GroupName"
    • Dynamic group query:  auto.team == "GroupName"

    The AppliesTo function:

    • Name:  teamIsGroupName
    • AppliesTo Code:  join(system.staticgroups,",") =~ "/GroupName/"
    • Dynamic group query:  teamIsGroupName()
  • Anonymous's avatar
    Anonymous

    I'm curious what your expression was before and what you changed it to. Referencing a property in an AppliesTo expression works, so it's odd that it wasn't working on your situation. Perhaps there was something else in play?

  • On 6/17/2021 at 6:53 AM, Stuart Weenig said:

    I've seen it be almost instantly in every case where i've been working with it.

     

    Unfortunately that was not happening in my case.  Several hours after I removed a property from a couple resources I was testing with, I double-verified that the property was gone, but the dynamic group that was looking for that property to be set to a specific value still contained those resources.

    I was able to work around this issue by using AppliesTo filters instead of properties for the dynamic group, but it is a bit troubling that the property method did not work as expected...

  • Anonymous's avatar
    Anonymous

    I've seen it be almost instantly in every case where i've been working with it.

  • I thought it was daily.  I found this older thread (2017) where Sarah Terry talks about the triggers for discovery..  I am not aware of any change to the behavior.