-
Notifications
You must be signed in to change notification settings - Fork 737
Description
Problem Statement
I'm trying to install windows_exporter with a prewritten config.yaml and web.config.yaml web.config.file. However, I'm not getting the results I'd expect. The install directory has the below files in it.
c:\Temp\windows_exporter_install>dir
Volume in drive C is Windows
Volume Serial Number is 183B-1E6B
Directory of c:\Temp\windows_exporter_install
08/07/2025 10:31 AM
.08/07/2025 10:32 AM ..
08/05/2025 10:45 AM 154 config.yaml
08/06/2025 03:33 PM 4,838 web.config.yaml
07/28/2025 03:56 PM 11,403,264 windows_exporter-0.31.1-amd64.msi
I've tried a couple of different versions of the command without success. Can you provide some guidance?
msiexec.exe /l*v C:\Windows\companyName\windows_exporter_install.log /i windows_exporter-0.31.1-amd64.msi ADDLOCAL=FirewallException CONFIG_FILE="config.yaml" EXTRA_FLAGS="--web.config.file='C:\Program Files\windows_exporter\web.config.yaml'"
This command will not complete installation and fails at the starting service section. The install fails and rolls back- I'm guessing because the web.config.yaml file is not in the C:\Program Files\windows_exporter directory, but how could it be there? We just started installing and the directories didn't previously exist.
msiexec.exe /l*v C:\Windows\companyName\windows_exporter_install.log /i windows_exporter-0.31.1-amd64.msi ADDLOCAL=FirewallException CONFIG_FILE="config.yaml" EXTRA_FLAGS="--web.config.file='web.config.yaml'"
This command completes the installation but I can't start the service even with the web.config.yaml file copied to the c:\program files\windows_exporter\ directory.
I attached the log from the msiexec command. Also, below are some logs from the windows system event log:
A service was installed in the system.
Service Name: windows_exporter
Service File Name: "c:\Program Files\windows_exporter\windows_exporter.exe" --config.file="c:\Program Files\windows_exporter\config.yaml" --web.config.file='web.config.yaml'
Service Type: user mode service
Service Start Type: auto start
Service Account: LocalSystem
The windows_exporter service entered the running state.
The windows_exporter service entered the stopped state.
The windows_exporter service terminated with the following service-specific error:
Incorrect function.
Environment
- windows_exporter Version:0.31.1
- Windows Server Version: 2022