Skip to content

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

@ramdaspotale

Description

@ramdaspotale

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<version> and metricbeat.exe executable at C:\Program Files\Elastic\Beats<version>\metricbeat

however now with version 8.13, metricbeat.cmd file and metricbeat.exe is stored at same location C:\Program Files\Elastic\Beats<version>\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:

  • Version: 8.13.0
  • Operating System: Windows server 2022/2019
  • Discuss Forum URL:
  • Steps to Reproduce:
    1. Install metricbeat
    2. look for metricbeat.cmd file in metricbeat installation directory
    3. try running above .cmd file and it throws error "The system can not find the path specified"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions