Skip to content

Commit

Permalink
update win scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Amol Agrawal committed May 22, 2024
1 parent 60be9ec commit 6fe6ee7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/windows/installer/livenessprobe/livenessprobe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int _tmain(int argc, wchar_t *argv[])
wprintf_s(L"ERROR:Process:%s is not running\n", argv[1]);
return NO_FLUENT_BIT_PROCESS;
}
const DWORD bufferSize = 256;
const DWORD bufferSize = 16;
wchar_t enableCustomMetricsValue[bufferSize];
wchar_t msiModeValue[bufferSize];
GetEnvironmentVariable(L"ENABLE_CUSTOM_METRICS", enableCustomMetricsValue, bufferSize);
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/windows/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,13 @@ function Start-Fluent-Telegraf {
}

$enableCustomMetrics = [System.Environment]::GetEnvironmentVariable("ENABLE_CUSTOM_METRICS", "process")
if ($enableCustomMetrics.ToLower() -eq 'true') {
if (![string]::IsNullOrEmpty($enableCustomMetrics) -and $enableCustomMetrics.ToLower() -eq 'true') {
Move-Item -Path "C:/etc/fluent/fluent-cm.conf" -Destination "C:/etc/fluent/fluent.conf" -Force
}

$isAADMSIAuth = [System.Environment]::GetEnvironmentVariable("USING_AAD_MSI_AUTH")
# Start fluentd as a windows service only if custom metrics is enabled or legacy mode
if ($enableCustomMetrics.ToLower() -eq 'true' -or [string]::IsNullOrEmpty($isAADMSIAuth) -or $isAADMSIAuth.ToLower() -eq "false") {
if ((![string]::IsNullOrEmpty($enableCustomMetrics) -and $enableCustomMetrics.ToLower() -eq 'true') -or [string]::IsNullOrEmpty($isAADMSIAuth) -or $isAADMSIAuth.ToLower() -eq "false") {
fluentd --reg-winsvc i --reg-winsvc-auto-start --winsvc-name fluentdwinaks --reg-winsvc-fluentdopt '-c C:/etc/fluent/fluent.conf -o C:/etc/fluent/fluent.log'
}

Expand Down

0 comments on commit 6fe6ee7

Please sign in to comment.