2016-09-16 06:36:58 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
2018-04-05 06:37:23 +00:00
|
|
|
xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension"
|
|
|
|
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
2016-09-16 06:36:58 +00:00
|
|
|
<?if $(sys.BUILDARCH)=x64 ?>
|
|
|
|
<?define PlatformProgramFiles = "ProgramFiles64Folder" ?>
|
|
|
|
<?else ?>
|
|
|
|
<?define PlatformProgramFiles = "ProgramFilesFolder" ?>
|
|
|
|
<?endif ?>
|
|
|
|
|
2020-05-24 18:42:23 +00:00
|
|
|
<Product Id="*" UpgradeCode="66a6eb5b-1fc2-4b14-a362-5ceec6413308"
|
|
|
|
Name="windows_exporter" Version="$(var.Version)" Manufacturer="prometheus-community"
|
2016-09-16 06:36:58 +00:00
|
|
|
Language="1033" Codepage="1252">
|
2020-10-10 18:36:55 +00:00
|
|
|
<Package Id="*" Manufacturer="prometheus-community" InstallScope="perMachine" InstallerVersion="500"
|
2020-05-24 18:42:23 +00:00
|
|
|
Description="windows_exporter $(var.Version) installer" Compressed="yes" />
|
|
|
|
<Media Id="1" Cabinet="windows_exporter.cab" EmbedCab="yes"/>
|
2020-09-12 14:37:32 +00:00
|
|
|
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
|
2016-09-16 06:36:58 +00:00
|
|
|
|
|
|
|
<Property Id="ENABLED_COLLECTORS" Secure="yes"/>
|
2017-08-12 06:49:18 +00:00
|
|
|
<SetProperty Id="CollectorsFlag" After="InstallFiles" Sequence="execute" Value="--collectors.enabled [ENABLED_COLLECTORS]">ENABLED_COLLECTORS</SetProperty>
|
2016-09-16 06:36:58 +00:00
|
|
|
|
2018-11-29 19:14:37 +00:00
|
|
|
<Property Id="EXTRA_FLAGS" Secure="yes"/>
|
|
|
|
<SetProperty Id="ExtraFlags" After="InstallFiles" Sequence="execute" Value="[EXTRA_FLAGS]">EXTRA_FLAGS</SetProperty>
|
|
|
|
|
2016-09-16 06:36:58 +00:00
|
|
|
<Property Id="LISTEN_ADDR" Secure="yes" />
|
|
|
|
<Property Id="LISTEN_PORT" Secure="yes" Value="9182" />
|
2017-08-12 06:49:18 +00:00
|
|
|
<SetProperty Id="ListenFlag" After="InstallFiles" Sequence="execute" Value="--telemetry.addr [LISTEN_ADDR]:[LISTEN_PORT]">LISTEN_ADDR OR LISTEN_PORT</SetProperty>
|
2016-09-16 06:36:58 +00:00
|
|
|
|
|
|
|
<Property Id="METRICS_PATH" Secure="yes"/>
|
2017-08-12 06:49:18 +00:00
|
|
|
<SetProperty Id="MetricsPathFlag" After="InstallFiles" Sequence="execute" Value="--telemetry.path [METRICS_PATH]">METRICS_PATH</SetProperty>
|
2020-09-28 13:37:48 +00:00
|
|
|
|
|
|
|
<Property Id="REMOTE_ADDR" Secure="yes" />
|
|
|
|
<SetProperty Id="RemoteAddressFlag" After="InstallFiles" Sequence="execute" Value="[REMOTE_ADDR]">REMOTE_ADDR</SetProperty>
|
2016-09-16 06:36:58 +00:00
|
|
|
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
|
|
<Directory Id="$(var.PlatformProgramFiles)">
|
2020-05-24 18:42:23 +00:00
|
|
|
<Directory Id="APPLICATIONROOTDIRECTORY" Name="windows_exporter">
|
2018-04-05 06:08:19 +00:00
|
|
|
<Directory Id="textfile_inputs" Name="textfile_inputs" />
|
|
|
|
</Directory>
|
2016-09-16 06:36:58 +00:00
|
|
|
</Directory>
|
|
|
|
</Directory>
|
|
|
|
|
2018-04-03 19:37:10 +00:00
|
|
|
<Property Id="TEXTFILE_DIR" Secure="yes"/>
|
|
|
|
<SetProperty Id="TextfileDirFlag" After="InstallFiles" Sequence="execute" Value="--collector.textfile.directory [TEXTFILE_DIR]">TEXTFILE_DIR</SetProperty>
|
|
|
|
|
2018-04-05 06:08:19 +00:00
|
|
|
<ComponentGroup Id="Files">
|
|
|
|
<Component Directory="APPLICATIONROOTDIRECTORY">
|
2020-05-24 18:42:23 +00:00
|
|
|
<File Id="windows_exporter.exe" Name="windows_exporter.exe" Source="Work\windows_exporter.exe" KeyPath="yes">
|
2020-09-28 13:37:48 +00:00
|
|
|
<fw:FirewallException Id="MetricsEndpoint" Name="windows_exporter (HTTP [LISTEN_PORT])" Description="windows_exporter HTTP endpoint" Port="[LISTEN_PORT]" Protocol="tcp" IgnoreFailure="yes">
|
|
|
|
<fw:RemoteAddress>[REMOTE_ADDR]</fw:RemoteAddress>
|
|
|
|
</fw:FirewallException>
|
2016-09-16 06:36:58 +00:00
|
|
|
</File>
|
2020-11-01 13:12:59 +00:00
|
|
|
<ServiceInstall Id="InstallExporterService" Name="windows_exporter" DisplayName="windows_exporter" Description="Exports Prometheus metrics about the system" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="--log.format logger:eventlog?name=windows_exporter [CollectorsFlag] [ListenFlag] [MetricsPathFlag] [TextfileDirFlag] [ExtraFlags]">
|
|
|
|
<util:ServiceConfig FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" RestartServiceDelayInSeconds="60" />
|
|
|
|
<ServiceDependency Id="wmiApSrv" />
|
2018-04-05 06:37:23 +00:00
|
|
|
</ServiceInstall>
|
2020-05-24 18:42:23 +00:00
|
|
|
<ServiceControl Id="ServiceStateControl" Name="windows_exporter" Remove="uninstall" Start="install" Stop="both" />
|
|
|
|
<util:EventSource Log="Application" Name="windows_exporter" EventMessageFile="%SystemRoot%\System32\EventCreate.exe" />
|
2016-09-16 06:36:58 +00:00
|
|
|
</Component>
|
2018-04-05 06:08:19 +00:00
|
|
|
<Component Id="CreateTextfileDirectory" Directory="textfile_inputs" Guid="d03ef58a-9cbf-4165-ad39-d143e9b27e14">
|
|
|
|
<CreateFolder />
|
|
|
|
</Component>
|
2016-09-16 06:36:58 +00:00
|
|
|
</ComponentGroup>
|
|
|
|
|
|
|
|
<Feature Id="DefaultFeature" Level="1">
|
|
|
|
<ComponentGroupRef Id="Files" />
|
|
|
|
</Feature>
|
|
|
|
</Product>
|
2018-04-03 19:37:10 +00:00
|
|
|
</Wix>
|