Set manual relay selection relays in automatic computer groups

(imported topic written by Bigfeex)

Pretense:

  1. I have a run once policy that sets all systems to automatic relay selection.

  2. I have policies setup to install relays on systems based upon name from automatic computer groups.

Ask:

  1. I would like to use these same automatic comptuer groups for to define manual relay selection and specify specific relays. I have part of this working, as defined below, but it’s only working the first time I apply the policy against the auto group. If I change a system in this auto group back to auto relay selection, the policy does not appear to be properly re-run against the systems. I set some systems to auto after the first run of this and the policy is not changing them to the desired settings. I think this has something to do with the date parameter defined in the action.

Ultimatley, I would like to define that, if auto is set or a relay other than defined below in the action is set, this policy become relevant and make the intended relay changes. This way, when a new relay is installed I can direct it to an intended set of main relays automagically.

Current policy settings:

Messages

No user interface will be shown before running this action.

No message will be shown while running this action.

Users

This action will run independently of user presence.

User interface will be shown to all users.

Execution

This action will never expire.

It will run at any time of day, on any day of the week.

If the action becomes relevant after it has successfully executed, the action will be reapplied as a policy an unlimited number of times.

If the action fails, it will not be retried.

Post-Action

No operations will occur after the action completes.

Relevance:

(value of it does not equal ((“0”) as string)) of setting “__RelaySelect_Automatic” of client

Action Script:

setting “__RelaySelect_Automatic”=“0” on “{parameter “action issue date” of action}” for client

setting “__RelayServer1”=“http%3a%2f%2fTB-TRNDRLY-P01%2eCorp%2eTrueblueinc%2ecom%3a53220%2fbfmirror%2fdownloads%2f” on “{parameter “action issue date” of action}” for client

setting “__RelayServer2”=“http%3a%2f%2fTB-TRNDRLY-P02%2eCorp%2eTrueblueinc%2ecom%3a53220%2fbfmirror%2fdownloads%2f” on “{parameter “action issue date” of action}” for client

(imported comment written by BenKus)

You are correct that the key to your question is the settings effective date. The design is that an agent will not set a setting that has an effective date that is older than the current effective date. This is to prevent settings conflicts where they flip back and forth.

If you want, you can change the

“{parameter “action issue date” of action}”

to

“{now}”

. This will mean that this settings will always be able to override older settings (unless they are set in the future).

Note that if you use this approach, whenever you change the setting to automatic, it will very quickly be set back to manual selection. You also want to be careful to not use “now” on two different settings actions or they will just flip back and forth…

Ben

(imported comment written by Bigfeex)

Thank you. I should be good with this. I only intend to use this manual configuration for specific relays that are WAN connected and improperly select other WAN systems as relays when set to auto. I need to force such systems to connect to datacenter relays to reduce WAN traffic. My policy for automatic relay selection on all computers is only set to run once so that new systems are set to auto. I shouldn’t run into any conflicting policies under these conditions.