Skip to content

Commit

Permalink
In GCS scenarios, ensure that AMACoreAgent is running (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronRM authored Aug 30, 2023
1 parent 2232aa1 commit 4646db4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions AzureMonitorAgent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def enable():
Legacy: allows one of [MCS, GCS single tenant, or GCS multi tenant ("Auto-Config")] modes
Next-Generation: allows MCS, GCS multi tenant, or both
"""

is_gcs_single_tenant = False
# Next-generation schema
if public_settings is not None and (public_settings.get(GenevaConfigKey) or public_settings.get(AzureMonitorConfigKey)):

Expand Down Expand Up @@ -486,6 +486,7 @@ def enable():
else:
hutil_log_info("Detected Geneva mode; azuremonitoragent service will be started to handle Geneva configuration")
ensure["azuremonitoragent"] = True
is_gcs_single_tenant = True
handle_gcs_config(public_settings, protected_settings, default_configs)
# generate local syslog configuration files as in 1P syslog is not driven from DCR
generate_localsyslog_configs()
Expand Down Expand Up @@ -516,7 +517,9 @@ def enable():
# start the metrics and syslog watcher only in 3P mode
start_metrics_process()
start_syslogconfig_process()

elif ensure.get("azuremonitoragentmgr") or is_gcs_single_tenant:
# In GCS scenarios, ensure that AMACoreAgent is running
start_amacoreagent()

hutil_log_info('Handler initiating onboarding.')

Expand Down

0 comments on commit 4646db4

Please sign in to comment.