diff --git a/scripts/install/install_macos.sh b/scripts/install/install_macos.sh index 45f17f945..b28579f5f 100755 --- a/scripts/install/install_macos.sh +++ b/scripts/install/install_macos.sh @@ -612,13 +612,16 @@ create_supervisor_config() { command printf ' accepts_remote_config: true\n' >>"$supervisor_yml_path" command printf ' reports_remote_config: true\n' >>"$supervisor_yml_path" command printf 'agent:\n' >>"$supervisor_yml_path" - # TODO(dakota): Add logging config option when supervisor suppports it command printf ' executable: "%s"\n' "$INSTALL_DIR/observiq-otel-collector" >>"$supervisor_yml_path" command printf ' description:\n' >>"$supervisor_yml_path" command printf ' non_identifying_attributes:\n' >>"$supervisor_yml_path" [ -n "$OPAMP_LABELS" ] && command printf ' service.labels: "%s"\n' "$OPAMP_LABELS" >>"$supervisor_yml_path" command printf 'storage:\n' >>"$supervisor_yml_path" command printf ' directory: "%s"\n' "$INSTALL_DIR/supervisor_storage" >>"$supervisor_yml_path" + command printf 'telemetry:\n' >>"$supervisor_yml_path" + command printf ' logs:\n' >>"$supervisor_yml_path" + command printf ' level: 0\n' >>"$supervisor_yml_path" + command printf ' output_paths: ["%s"]' "$INSTALL_DIR/supervisor_storage/supervisor.log" >>"$supervisor_yml_path" succeeded } diff --git a/scripts/install/install_unix.sh b/scripts/install/install_unix.sh index 04feac536..8692e417c 100755 --- a/scripts/install/install_unix.sh +++ b/scripts/install/install_unix.sh @@ -742,6 +742,10 @@ create_supervisor_config() { [ -n "$OPAMP_LABELS" ] && command printf ' service.labels: "%s"\n' "$OPAMP_LABELS" >>"$supervisor_yml_path" command printf 'storage:\n' >>"$supervisor_yml_path" command printf ' directory: "%s"\n' "$INSTALL_DIR/supervisor_storage" >>"$supervisor_yml_path" + command printf 'telemetry:\n' >>"$supervisor_yml_path" + command printf ' logs:\n' >>"$supervisor_yml_path" + command printf ' level: 0\n' >>"$supervisor_yml_path" + command printf ' output_paths: ["%s"]' "$INSTALL_DIR/supervisor_storage/supervisor.log" >>"$supervisor_yml_path" } # This will display the results of an installation diff --git a/windows/install/generate-supervisor-yaml.bat b/windows/install/generate-supervisor-yaml.bat index e1d6e19aa..f5c5613f1 100644 --- a/windows/install/generate-supervisor-yaml.bat +++ b/windows/install/generate-supervisor-yaml.bat @@ -47,6 +47,11 @@ set "serviceLabelsField= service.labels: "%labels%"" set "storageField=storage:" set "directoryField= directory: '%install_dir%supervisor_storage'" +set "telemetryField=telemetry:" +set "logsField= logs:" +set "logsLevelField= level: 0" +set "logsOutputPathsField= output_paths: ['%install_dir%supervisor_storage\supervisor.log']" + echo %serverField% >"%supervisorFile%" echo %endpointField% >>"%supervisorFile%" echo %headersField% >>"%supervisorFile%" @@ -68,4 +73,9 @@ echo %serviceLabelsField% >>"%supervisorFile%" echo %storageField% >>"%supervisorFile%" echo %directoryField% >>"%supervisorFile%" +echo %telemetryField% >>"%supervisorFile%" +echo %logsField% >>"%supervisorFile%" +echo %logsLevelField% >>"%supervisorFile%" +echo %logsOutputPathsField% >>"%supervisorFile%" + endlocal