prometheus-community / windows_exporter

Prometheus exporter for Windows machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I update windows exporter with config-file...using msiexec? more in-depth docs on using config file

njoylif opened this issue · comments

Hello, new to github, so bear with me if improper process/formatting...

I'm trying to get this exporting using a config file and can't figure out formatting when updating with msiexec.
I've tried:
msiexec /i c:\netdata\windows_exporter-0.25.1-amd64.msi --% EXTRA_FLAGS="--config.file=c:\netdata\netdata_config.yaml"
I've been able to get it exporting defaults using:
msiexec /i c:\netdata\windows_exporter-0.25.1-amd64.msi ENABLED_COLLECTORS="[default]"
that works.
I can't seem to get IIS exporting when using config nor this commandline:
msiexec /i c:\netdata\windows_exporter-0.25.1-amd64.msi ENABLED_COLLECTORS="[default],iis,process"

I also need formatting examples of config file past what's there. not sure what's right and cant seem to test it yet.
i.e. do I just remove this section if I want all services and tasks? Are wildcards supported?
#collector:
service:
services-where: Name='windows_exporter'
scheduled_task:
include: /Microsoft/.+

TYIA

One way - msiexec /i C:\windows_exporter-0.25.1-amd64.msi ENABLED_COLLECTORS=cpu,cs,iis,logical_disk,net,os,memory,process,tcp,service,system,textfile LISTEN_PORT=9182

The second way - using the config file
msiexec /i "C:\windows_exporter\windows_exporter-0.25.1-amd64.msi" --% EXTRA_FLAGS="--config.file=C:\windows_exporter\config.yml"

config.yml

Note this is not an exhaustive list of all configuration values #cpu,cs,logical_disk,net,os,service,system,textfile,iis

collectors:
enabled: cpu,iis,cs,logical_disk,net,os #please add collector name here using comma separated
collector:
service:
services-where: Name='windows_exporter'
scheduled_task:
include: /Microsoft/.+
log:
level: debug
scrape:
timeout-margin: 0.5
telemetry:
path: /metrics
max-requests: 5
web:
listen-address: ":9182"

I'll test, though I couldn't seem to get it working last time I tried.
thanks for your response/time! I'll post results

that just gives me the msiexec help popup:

Windows ® Installer. V 5.0.17763.4644

msiexec /Option [Optional Parameter]

Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install - Installs a product on the network
/j<u|m> <Product.msi> [/t ] [/g ]
Advertises a product - m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode - progress bar only
/q[n|b|r|f]
Sets user interface level
n - No UI
b - Basic UI
r - Reduced UI
f - Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|]
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log
Equivalent of /l

Update Options
/update <Update1.msp>[;Update2.msp]
Applies update(s)
/uninstall [;Update2.msp] /package <Product.msi | ProductCode>
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p - only if file is missing
o - if file is missing or an older version is installed (default)
e - if file is missing or an equal or older version is installed
d - if file is missing or a different version is installed
c - if file is missing or checksum does not match the calculated value
a - forces all files to be reinstalled
u - all required user-specific registry entries (default)
m - all required computer-specific registry entries (default)
s - all existing shortcuts (default)
v - runs from source and recaches local package
Setting Public Properties
[PROPERTY=PropertyValue]

Consult the Windows ® Installer SDK for additional documentation on the
command line syntax.

Copyright © Microsoft Corporation. All rights reserved.
Portions of this software are based in part on the work of the Independent JPEG Group.

ok, not to proud....PICNIC.

was in CMD...needed to be in powershell.

msiexec /i windows_exporter-0.25.1-amd64.msi --% EXTRA_FLAGS="--config.file=C:\Users<username>\downloads\config.yml"

worked when in right env. sigh.
Thanks for response