-
Notifications
You must be signed in to change notification settings - Fork 42
Description
One of the main behaviors of ServiceMonitor.exe is to promote its environment variables to the applicationPool's config. However, if the environment variable is already defined for the pool, then ServiceMonitor.exe fails.
We are currently running into this issue now. Ideally it would be nice if ServiceMonitor.exe could skip environment variables that are already defined for the pool. There are a couple of ways this could be achieved in UpdateEnvironmentVarsToConfig , for example:
- For each pool, retrieve the currently set env vars (if any), and skip those that are set.
- Or, set each environment variable individually. If it fails, just skip it (assume already defined) and move to the next.
An alternative approach would be to allow adding to the deny list. e.g. you could support a SERVICEMONITOR_ADDITIONAL_SKIP_VARIABLES variable in FilterEnv that defines the variables to skip:
SERVICEMONITOR_ADDITIONAL_VARIABLES="MY_FIRST_VAR,MY_SECOND_VAR"
Would you be open to either of these options? We would be happy to contribute the feature if so?