elastic / elastic-stack-installers

Windows MSI packages for Elastic stack
Apache License 2.0
2 stars 16 forks source link

Misplaced metricbeat.cmd file in metricbeat 8.13 on windows server/container #291

Open ramdaspotale opened 3 months ago

ramdaspotale commented 3 months ago

Hi,

I recently upgraded metricbeat on our kubernetes environment with mixed os platform and realised our windows metricbeat build was broken with error 'The system can not find the path specified'. upon looking deeper into metricbeat installation i noticed earlier metricbeat.cmd file used to be stored at C:\Program Files\Elastic\Beats\ and metricbeat.exe executable at C:\Program Files\Elastic\Beats\\metricbeat

however now with version 8.13, metricbeat.cmd file and metricbeat.exe is stored at same location C:\Program Files\Elastic\Beats\\metricbeat. but the problem is metricbeat.cmd has not been updated to reflect this change and still refers to metricbeat.exe and other files in metricbeat folder instead of looking at current directory.

here is contents of metricbeat.cmd:

@echo off set args=%*

if "%args%" == "" ( set args=--help )

set beat_bin=%~dp0%~n0 set beat_data=%beat_bin%

"%beat_bin%\%~n0.exe" ^ --path.home "%beat_bin%" ^ --path.config "%beat_data%" ^ --path.data "%beat_data%\data" ^ --path.logs "%beat_data%\logs" ^ --E logging.files.redirect_stderr=true ^ %args%

For confirmed bugs, please report:

ramdaspotale commented 3 months ago

image

this is proof of how it does not work.

elasticmachine commented 3 months ago

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)