Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohamdg081992 committed Nov 17, 2023
2 parents ddd5d7e + 19f0891 commit 22a76e0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions otelcollector/build/windows/scripts/livenessprobe.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ set /a durationInMinutes = -1
if "%MAC%" == "" (
rem Non-MAC mode
tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul
if %ERRORLEVEL% NEQ 0 (
if !ERRORLEVEL! NEQ 0 (
echo "Metrics Extension is not running (Non-MAC mode)"
exit /B 1
goto eof
)
) else (
if "%MAC%" == "true" (
Expand All @@ -33,19 +33,19 @@ if "%MAC%" == "" (
)
if !durationInMinutes! GTR 15 (
echo "Greater than 15 mins, No configuration present for the AKS resource"
exit /B 1
goto eof
)
)
) else (
tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul
if %ERRORLEVEL% NEQ 0 (
if !ERRORLEVEL! NEQ 0 (
echo "Metrics Extension is not running (configuration exists)"
exit /B 1
goto eof
)
tasklist /fi "imagename eq MonAgentLauncher.exe" /fo "table" | findstr MonAgentLauncher > nul
if %ERRORLEVEL% NEQ 0 (
if !ERRORLEVEL! NEQ 0 (
echo "MonAgentLauncher is not running (configuration exists)"
exit /B 1
goto eof
)
)
)
Expand Down Expand Up @@ -81,3 +81,6 @@ if %ERRORLEVEL% NEQ 0 (
endlocal

exit /B 0

:eof
exit /B 1

0 comments on commit 22a76e0

Please sign in to comment.