Skip to content

Commit

Permalink
[fix] Windows liveness probe for ME (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
gracewehner authored Nov 16, 2023
1 parent 66ee77e commit f91aa8e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
5 changes: 4 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Azure Monitor Metrics for AKS clusters

## Pending
## Release 11-16-2023
* Windows image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.8.2-main-<tbd>-win
* Change log -
* Fix Windows liveness probe for error level evaluation

## Release 11-03-2023
* Linux image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.8.1-main-11-03-2023-c061beb4`
Expand Down
2 changes: 1 addition & 1 deletion otelcollector/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.8.1
6.8.2
30 changes: 15 additions & 15 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 1 (
if %ERRORLEVEL% NEQ 0 (
echo "Metrics Extension is not running (Non-MAC mode)"
exit /b 1
exit /B 1
)
) else (
if "%MAC%" == "true" (
Expand All @@ -33,51 +33,51 @@ if "%MAC%" == "" (
)
if !durationInMinutes! GTR 15 (
echo "Greater than 15 mins, No configuration present for the AKS resource"
exit /b 1
exit /B 1
)
)
) else (
tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul
if errorlevel 1 (
if %ERRORLEVEL% NEQ 0 (
echo "Metrics Extension is not running (configuration exists)"
exit /b 1
exit /B 1
)
tasklist /fi "imagename eq MonAgentLauncher.exe" /fo "table" | findstr MonAgentLauncher > nul
if errorlevel 1 (
if %ERRORLEVEL% NEQ 0 (
echo "MonAgentLauncher is not running (configuration exists)"
exit /b 1
exit /B 1
)
)
)
)

@REM "Checking if fluent-bit is running"
tasklist /fi "imagename eq fluent-bit.exe" /fo "table" | findstr fluent-bit
if errorlevel 1 (
if %ERRORLEVEL% NEQ 0 (
echo "Fluent-Bit is not running"
exit /b 1
exit /B 1
)

@REM "Checking if config map has been updated since agent start"
if exist "C:\opt\microsoft\scripts\filesystemwatcher.txt" (
echo "Config Map Updated or DCR/DCE updated since agent started"
exit /b 1
exit /B 1
)

@REM REM "Checking if Telegraf is running"
tasklist /fi "imagename eq telegraf.exe" /fo "table" | findstr telegraf
if errorlevel 1 (
if %ERRORLEVEL% NEQ 0 (
echo "Telegraf is not running"
exit /b 1
exit /B 1
)

@REM REM "Checking if otelcollector is running"
tasklist /fi "imagename eq otelcollector.exe" /fo "table" | findstr otelcollector
if errorlevel 1 (
if %ERRORLEVEL% NEQ 0 (
echo "otelcollector is not running"
exit /b 1
exit /B 1
)

endlocal

exit /b 0
exit /B 0

0 comments on commit f91aa8e

Please sign in to comment.