windows_exporter
windows_exporter copied to clipboard
Can't install with --% EXTRA_FLAGS: got "Invalid command line argument" error from windows installer
This works:
$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="cpu,cpu_info,cs,logical_disk,net,os,service,system,process"
This don't work:
$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="cpu,cpu_info,cs,logical_disk,net,os,service,system,process" --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE '%foo%'""";
I got pop-up window with text:
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
What's wrong with my installation command?
The command looks alright, I just tested it. It might be some weird msiexec
issue. Maybe you could checkout this and try to reregister msiexec
I experimented with command syntax and the problem was solved when I removed the semicolon at the end of the command.
So this didn't work (";" symbol at the end):
$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="..." --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE '%foo%'""";
And this worked (no ";" at the end):
$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="..." --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE '%foo%'"""
And this worked(cmd):
msiexec /i D:\soft\windows_exporter-0.24.0-amd64.msi ENABLED_COLLECTORS="cpu,cs,logical_disk,net,os,service,system,textfile,mssql" EXTRA_FLAGS="--collectors.mssql.classes-enabled=accessmethods,availreplica,bufman,databases,dbreplica,genstats,locks,memmgr,sqlstats"
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.