Bring the textfile collector over from node_exporter (#174)

Bring the textfile collector over from node_exporter

This adds a slightly modified textfile collector from the official
node_exporter project.
This commit is contained in:
Patrick O'Brien
2018-04-03 12:37:10 -07:00
committed by Calle Pettersson
parent 5db7c0a936
commit cf792394f3
5 changed files with 266 additions and 4 deletions

View File

@@ -31,12 +31,15 @@
</Directory>
</Directory>
<Property Id="TEXTFILE_DIR" Secure="yes"/>
<SetProperty Id="TextfileDirFlag" After="InstallFiles" Sequence="execute" Value="--collector.textfile.directory [TEXTFILE_DIR]">TEXTFILE_DIR</SetProperty>
<ComponentGroup Id="Files" Directory="APPLICATIONROOTDIRECTORY">
<Component>
<File Id="wmi_exporter.exe" Name="wmi_exporter.exe" Source="Work\wmi_exporter.exe" KeyPath="yes">
<fw:FirewallException Id="MetricsEndpoint" Name="WMI Exporter (HTTP [LISTEN_PORT])" Description="WMI Exporter HTTP endpoint" Port="[LISTEN_PORT]" Protocol="tcp" Scope="any" IgnoreFailure="yes" />
</File>
<ServiceInstall Id="InstallExporterService" Name="wmi_exporter" DisplayName="WMI exporter" Description="Exports Prometheus metrics from WMI queries" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="--log.format logger:eventlog?name=wmi_exporter [CollectorsFlag] [ListenFlag] [MetricsPathFlag]" />
<ServiceInstall Id="InstallExporterService" Name="wmi_exporter" DisplayName="WMI exporter" Description="Exports Prometheus metrics from WMI queries" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="--log.format logger:eventlog?name=wmi_exporter [CollectorsFlag] [ListenFlag] [MetricsPathFlag] [TextfileDirFlag]" />
<ServiceControl Id="ServiceStateControl" Name="wmi_exporter" Remove="uninstall" Start="install" Stop="both" />
</Component>
</ComponentGroup>
@@ -45,4 +48,4 @@
<ComponentGroupRef Id="Files" />
</Feature>
</Product>
</Wix>
</Wix>