andrewmostello / prometheus-windows-exporter.install

Chocolatey package for Prometheus WMI Exporter (https://github.com/martinlindhe/wmi_exporter)
5 stars 9 forks source link

Install with config.file option ? #16

Open elfranne opened 2 months ago

elfranne commented 2 months ago

What is the correct install syntax (or is it a bug?) for specifying config.file ? Installing without params works fine. OS: Windows Server 2019 Datacenter

Details:

choco install prometheus-windows-exporter.install --source="'https://choco-cache.domain.com/repository/chocolatey'" --params='"/ExtraFlags --config.file="C:\ProgramData\Sensu\config\win_exporter.yaml""'       
Chocolatey v2.2.2
Installing the following packages:
prometheus-windows-exporter.install
By installing, you accept licenses for the packages.
Progress: Downloading prometheus-windows-exporter.install 0.25.1... 100%

prometheus-windows-exporter.install v0.25.1
prometheus-windows-exporter.install package files install completed. Performing other installation steps.
Extra flags: 'True'
File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded.
Hashes match.
Hashes match.
Installing prometheus-windows-exporter.install...
[multiple minutes hang]
WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already inst
alled). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\prometheus-windows-exporter.install_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the er
ror.
ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi" /quiet /norestart /l*v "C:\Users\elfranne\AppDat
a\Local\Temp\chocolatey\prometheus-windows-exporter.install.0.25.1.MsiInstall.log" EXTRA_FLAGS="True" ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment 
error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try aga
in adding '--install-arguments="'/l*v c:\prometheus-windows-exporter.install_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
The install of prometheus-windows-exporter.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - prometheus-windows-exporter.install (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1'.
 See log for details.

prometheus-windows-exporter.install.0.25.1.MsiInstall.log


MSI (s) (5C:E0) [13:08:13:615]: Product: windows_exporter -- Error 1920. Service 'windows_exporter' (windows_exporter) failed to start.  Verify that you have sufficient privileges to start system services.

Error 1920. Service 'windows_exporter' (windows_exporter) failed to start.  Verify that you have sufficient privileges to start system services.
MSI (s) (5C:E0) [13:08:13:615]: Note: 1: 2265 2:  3: -2147287035
MSI (s) (5C:E0) [13:08:13:630]: User policy value 'DisableRollback' is 0
MSI (s) (5C:E0) [13:08:13:630]: Machine policy value 'DisableRollback' is 0
Action ended 13:08:13: InstallFinalize. Return value 3.

chocolatey.log

-05-03 13:03:50,755 6096 [DEBUG] - Adding new type 'FrameWorkReferencesMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,759 6096 [DEBUG] - Adding new type 'IconMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,759 6096 [DEBUG] - Adding new type 'LicenseMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,759 6096 [DEBUG] - Adding new type 'PackageTypesMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,759 6096 [DEBUG] - Adding new type 'ReadmeMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,775 6096 [DEBUG] - Adding new type 'RepositoryMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,775 6096 [DEBUG] - Adding new type 'RequireLicenseAcceptanceMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,790 6096 [DEBUG] - Adding new type 'ServicableMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2024-05-03 13:03:50,790 6096 [DEBUG] - Adding new type 'VersionMetadataRule' for type 'IMetadataRule' from assembly 'choco' 
2024-05-03 13:03:50,837 6096 [DEBUG] - Registering new command 'cache' in assembly 'choco'
2024-05-03 13:03:50,837 6096 [DEBUG] - Registering new command 'list' in assembly 'choco'
2024-05-03 13:03:50,837 6096 [DEBUG] - Registering new command 'template' in assembly 'choco'
2024-05-03 13:03:50,853 6096 [DEBUG] - Registering new command 'export' in assembly 'choco'
2024-05-03 13:03:50,853 6096 [DEBUG] - Registering new command 'info' in assembly 'choco'
2024-05-03 13:03:50,853 6096 [DEBUG] - Registering new command 'help' in assembly 'choco'
2024-05-03 13:03:50,853 6096 [DEBUG] - Registering new command 'config' in assembly 'choco'
2024-05-03 13:03:50,869 6096 [DEBUG] - Registering new command 'feature' in assembly 'choco'
2024-05-03 13:03:50,869 6096 [DEBUG] - Registering new command 'new' in assembly 'choco'
2024-05-03 13:03:50,884 6096 [DEBUG] - Registering new command 'outdated' in assembly 'choco'
2024-05-03 13:03:50,884 6096 [DEBUG] - Registering new command 'pack' in assembly 'choco'
2024-05-03 13:03:50,884 6096 [DEBUG] - Registering new command 'pin' in assembly 'choco'
2024-05-03 13:03:50,900 6096 [DEBUG] - Registering new command 'push' in assembly 'choco'
2024-05-03 13:03:50,900 6096 [DEBUG] - Registering new command 'apikey' in assembly 'choco'
2024-05-03 13:03:50,915 6096 [DEBUG] - Registering new command 'source' in assembly 'choco'
2024-05-03 13:03:50,915 6096 [DEBUG] - Registering new command 'uninstall' in assembly 'choco'
2024-05-03 13:03:50,915 6096 [DEBUG] - Registering new command 'upgrade' in assembly 'choco'
2024-05-03 13:03:50,915 6096 [DEBUG] - Registering new command 'search' in assembly 'choco'
2024-05-03 13:03:50,915 6096 [DEBUG] - Registering new command 'unpackself' in assembly 'choco'
2024-05-03 13:03:50,915 6096 [DEBUG] - Registering new command 'install' in assembly 'choco'
2024-05-03 13:03:51,120 6096 [INFO ] - ============================================================
2024-05-03 13:03:51,433 6096 [INFO ] - Chocolatey v2.2.2
2024-05-03 13:03:51,714 6096 [DEBUG] - Chocolatey is running on Windows v 10.0.17763.0
2024-05-03 13:03:51,730 6096 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2024-05-03 13:03:51,745 6096 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2024-05-03 13:03:51,782 6096 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install prometheus-windows-exporter.install --source='https://choco-cache.domain.com/repository/chocolatey' --params="/ExtraFlags --config.file="C:
\ProgramData\Sensu\config\win_exporter.yaml""
2024-05-03 13:03:51,782 6096 [DEBUG] - Received arguments: install prometheus-windows-exporter.install --source='https://choco-cache.domain.com/repository/chocolatey' --params=/ExtraFlags --config.file=C:\ProgramData\Sensu\config\win_expo
rter.yaml
2024-05-03 13:03:52,058 6096 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2024-05-03 13:03:52,105 6096 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2024-05-03 13:03:52,105 6096 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2024-05-03 13:03:52,199 6096 [DEBUG] - Performing validation checks.
2024-05-03 13:03:52,214 6096 [DEBUG] - Global Configuration Validation Checks:
2024-05-03 13:03:52,230 6096 [DEBUG] -  - Package Exit Code / Exit On Reboot = Checked
2024-05-03 13:03:52,230 6096 [DEBUG] - System State Validation Checks:
2024-05-03 13:03:52,245 6096 [DEBUG] -  Reboot Requirement Checks: 
2024-05-03 13:03:52,251 6096 [DEBUG] -  - Pending Computer Rename = Checked
2024-05-03 13:03:52,251 6096 [DEBUG] -  - Pending Component Based Servicing = Checked
2024-05-03 13:03:52,251 6096 [DEBUG] -  - Pending Windows Auto Update = Checked
2024-05-03 13:03:52,251 6096 [DEBUG] -  - Pending File Rename Operations = Checked
2024-05-03 13:03:52,269 6096 [DEBUG] -  - Pending Windows Package Installer = Checked
2024-05-03 13:03:52,269 6096 [DEBUG] -  - Pending Windows Package Installer SysWow64 = Checked
2024-05-03 13:03:52,269 6096 [DEBUG] - Cache Folder Lockdown Checks:
2024-05-03 13:03:52,269 6096 [DEBUG] -  - Elevated State = Checked
2024-05-03 13:03:52,285 6096 [DEBUG] -  - Folder Exists = Checked
2024-05-03 13:03:52,285 6096 [DEBUG] -  - Folder lockdown = Checked
2024-05-03 13:03:52,285 6096 [INFO ] - 3 validations performed. 3 success(es), 0 warning(s), and 0 error(s).
2024-05-03 13:03:52,322 6096 [DEBUG] - The source 'https://choco-cache.domain.com/repository/chocolatey' evaluated to a 'normal' source type
2024-05-03 13:03:52,331 6096 [DEBUG] -
NOTE: Hiding sensitive configuration data! Please double and triple
 check to be sure no sensitive data is shown, especially if copying
 output to a gist for review.
2024-05-03 13:03:52,347 6096 [DEBUG] - Configuration: CommandName='install'|
CacheLocation='C:\Users\elfranne\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'| 
Sources='https://choco-cache.domain.com/repository/chocolatey'|
SourceType='normal'|ShowOnlineHelp='False'|Debug='False'|
Verbose='False'|Trace='False'|Force='False'|Noop='False'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|
DisableCompatibilityChecks='False'|AcceptLicense='False'|
AllowUnofficialBuild='False'| 
Input='prometheus-windows-exporter.install'|AllVersions='False'|
SkipPackageInstallProvider='False'|SkipHookScripts='False'|
PackageNames='prometheus-windows-exporter.install'|Prerelease='False'|
ForceX86='False'|OverrideArguments='False'|NotSilent='False'|
PackageParameters='/ExtraFlags --config.file=C:\ProgramData\Sensu\config\win_exporter.yaml'|

ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
CacheExpirationInMinutes='30'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.17763.0'|
Information.PlatformName='Windows Server 2016'|
Information.ChocolateyVersion='2.2.2.0'|
Information.ChocolateyProductVersion='2.2.2'|
Information.FullName='choco, Version=2.2.2.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='False'|
Information.UserName='elfranne'|Information.UserDomainName='CONTOSO'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|
Information.IsLicensedAssemblyLoaded='False'|
Information.LicenseType='Foss'|
Information.CurrentDirectory='C:\Users\elfranne'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'| 
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'|
ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
ListCommand.ExplicitPageSize='False'|
ListCommand.ExplicitSource='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='Unknown'|
ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'| 
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'|
CacheCommand.RemoveExpiredItemsOnly='False'|
2024-05-03 13:03:52,354 6096 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2024-05-03 13:03:52,354 6096 [INFO ] - Installing the following packages:
2024-05-03 13:03:52,373 6096 [INFO ] - prometheus-windows-exporter.install
2024-05-03 13:03:52,373 6096 [INFO ] - By installing, you accept licenses for the packages.
2024-05-03 13:03:52,788 6096 [DEBUG] - Running list with the following filter = ''
2024-05-03 13:03:52,788 6096 [DEBUG] - --- Start of List ---
2024-05-03 13:03:52,853 6096 [DEBUG] - Resolving resource PackageSearchResource for source C:\ProgramData\chocolatey\lib
2024-05-03 13:03:53,103 6096 [DEBUG] - chocolatey 2.2.2 
2024-05-03 13:03:53,103 6096 [DEBUG] - chocolatey-core.extension 1.3.5.1
2024-05-03 13:03:53,119 6096 [DEBUG] - chocolatey-windowsupdate.extension 1.0.4
2024-05-03 13:03:53,167 6096 [DEBUG] - git.install 2.30.0
2024-05-03 13:03:53,183 6096 [DEBUG] - KB2919355 1.0.20160915
2024-05-03 13:03:53,184 6096 [DEBUG] - KB2919442 1.0.20160915
2024-05-03 13:03:53,206 6096 [DEBUG] - KB3118401 1.0.5
2024-05-03 13:03:53,206 6096 [DEBUG] - notepadplusplus.install 7.9.2
2024-05-03 13:03:53,215 6096 [DEBUG] - powershell-core 7.2.1
2024-05-03 13:03:53,215 6096 [DEBUG] - sensu-agent 6.10.0.7172
2024-05-03 13:03:53,215 6096 [DEBUG] - sysinternals 2021.1.11
2024-05-03 13:03:53,232 6096 [DEBUG] - --- End of List ---
2024-05-03 13:03:53,232 6096 [DEBUG] - Resolving resource ListResource for source https://choco-cache.domain.com/repository/chocolatey 
2024-05-03 13:03:53,554 6096 [INFO ] - [NuGet]   GET https://choco-cache.domain.com/repository/chocolatey/$metadata 
2024-05-03 13:03:53,580 6096 [INFO ] - [NuGet]   OK https://choco-cache.domain.com/repository/chocolatey/$metadata 19ms
2024-05-03 13:03:53,633 6096 [INFO ] - [NuGet]   GET https://choco-cache.domain.com/repository/chocolatey/Packages()?$filter=(tolower(Id) eq 'prometheus-windows-exporter.install') and IsLatestVersion&semVerLevel=2.0.0
2024-05-03 13:03:53,754 6096 [INFO ] - [NuGet]   OK https://choco-cache.domain.com/repository/chocolatey/Packages()?$filter=(tolower(Id) eq 'prometheus-windows-exporter.install') and IsLatestVersion&semVerLevel=2.0.0 105ms 
2024-05-03 13:03:53,798 6096 [DEBUG] - Resolving resource DependencyInfoResource for source https://choco-cache.domain.com/repository/chocolatey
2024-05-03 13:03:53,829 6096 [INFO ] - [NuGet]   GET https://choco-cache.domain.com/repository/chocolatey/Packages(Id='prometheus-windows-exporter.install',Version='0.25.1')
2024-05-03 13:03:53,829 6096 [INFO ] - [NuGet]   OK https://choco-cache.domain.com/repository/chocolatey/Packages(Id='prometheus-windows-exporter.install',Version='0.25.1') 7ms
2024-05-03 13:03:53,872 6096 [INFO ] - [NuGet]   GET https://choco-cache.domain.com/repository/chocolatey/FindPackagesById()?id='chocolatey-core.extension'&semVerLevel=2.0.0 
2024-05-03 13:03:53,888 6096 [INFO ] - [NuGet]   OK https://choco-cache.domain.com/repository/chocolatey/FindPackagesById()?id='chocolatey-core.extension'&semVerLevel=2.0.0 6ms
2024-05-03 13:03:53,932 6096 [INFO ] - [NuGet]   GET https://choco-cache.domain.com/repository/chocolatey/FindPackagesById()?id='chocolatey-compatibility.extension'&semVerLevel=2.0.0
2024-05-03 13:03:53,932 6096 [INFO ] - [NuGet]   OK https://choco-cache.domain.com/repository/chocolatey/FindPackagesById()?id='chocolatey-compatibility.extension'&semVerLevel=2.0.0 4ms
2024-05-03 13:03:54,099 6096 [INFO ] - [NuGet] Resolving dependency information took 0 ms 
2024-05-03 13:03:54,114 6096 [DEBUG] - Resolving resource DownloadResource for source https://choco-cache.domain.com/repository/chocolatey
2024-05-03 13:03:54,145 6096 [DEBUG] - Attempting to delete file "".
2024-05-03 13:03:54,194 6096 [INFO ] - [NuGet]   GET https://choco-cache.domain.com/repository/chocolatey/prometheus-windows-exporter.install/0.25.1
2024-05-03 13:03:54,194 6096 [INFO ] - [NuGet]   OK https://choco-cache.domain.com/repository/chocolatey/prometheus-windows-exporter.install/0.25.1 5ms
2024-05-03 13:03:54,209 6096 [INFO ] - [NuGet] Acquiring lock for the installation of prometheus-windows-exporter.install 0.25.1
2024-05-03 13:03:54,256 6096 [INFO ] - [NuGet] Acquired lock for the installation of prometheus-windows-exporter.install 0.25.1 
2024-05-03 13:03:54,497 6096 [INFO ] - [NuGet] Installed prometheus-windows-exporter.install 0.25.1 from https://choco-cache.domain.com/repository/chocolatey with content hash v9h9FsfP6LCArWQHu+BA26aKdU/TlwwlDEj+nb7SYod9I138raa5HTbZyzEZRl
C7ZUK2dP+Xa7REB/Uk+BjxBg==.
2024-05-03 13:03:54,544 6096 [INFO ] - [NuGet] Adding package 'prometheus-windows-exporter.install.0.25.1 : chocolatey-core.extension [1.1.0, )' to folder 'C:\ProgramData\chocolatey\lib'
2024-05-03 13:03:54,606 6096 [INFO ] - [NuGet] Added package 'prometheus-windows-exporter.install.0.25.1 : chocolatey-core.extension [1.1.0, )' to folder 'C:\ProgramData\chocolatey\lib'
2024-05-03 13:03:54,606 6096 [DEBUG] - Attempting to delete file "C:\Users\elfranne\AppData\Local\Temp\chocolatey\ChocolateyScratch\prometheus-windows-exporter.install/0.25.1\prometheus-windows-exporter.install.0.25.1.nupkg".
2024-05-03 13:03:54,606 6096 [DEBUG] - Attempting to delete file "C:\Users\elfranne\AppData\Local\Temp\chocolatey\ChocolateyScratch\prometheus-windows-exporter.install/0.25.1\.nupkg.metadata".
2024-05-03 13:03:54,606 6096 [DEBUG] - Attempting to delete file "C:\Users\elfranne\AppData\Local\Temp\chocolatey\ChocolateyScratch\prometheus-windows-exporter.install/0.25.1\prometheus-windows-exporter.install.0.25.1.nupkg.sha512".   
2024-05-03 13:03:54,622 6096 [INFO ] -  
prometheus-windows-exporter.install v0.25.1 
2024-05-03 13:03:54,675 6096 [INFO ] - prometheus-windows-exporter.install package files install completed. Performing other installation steps. 
2024-05-03 13:03:54,839 6096 [DEBUG] - Setting installer args for prometheus-windows-exporter.install 
2024-05-03 13:03:54,855 6096 [DEBUG] - Setting package parameters for prometheus-windows-exporter.install 
2024-05-03 13:03:54,855 6096 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1': 
2024-05-03 13:03:54,870 6096 [DEBUG] - $ErrorActionPreference = 'Stop'; 

$packageName= 'prometheus-windows-exporter.install' 
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$version    = "0.25.1"
$url64      = "https://github.com/prometheus-community/windows_exporter/releases/download/v$version/windows_exporter-$version-amd64.msi" 

$pp = Get-PackageParameters

$silentArgs = "/quiet /norestart /l*v `"$($env:TEMP)\$($packageName).$($version).MsiInstall.log`""

if ($pp["EnabledCollectors"] -ne $null -and $pp["EnabledCollectors"] -ne '') {
  $silentArgs += " ENABLED_COLLECTORS=$($pp["EnabledCollectors"])"
  Write-Host "Collectors: `'$($pp["EnabledCollectors"])`'"
}

if ($pp["ListenAddress"] -ne $null -and $pp["ListenAddress"] -ne '') {
  $silentArgs += " LISTEN_ADDR=$($pp["ListenAddress"])"
  Write-Host "Listen Address: `'$($pp["ListenAddress"])`'" 
}

if ($pp["ListenPort"] -ne $null -and $pp["ListenPort"] -ne '') {
  $silentArgs += " LISTEN_PORT=$($pp["ListenPort"])"
  Write-Host "Listen Port: `'$($pp["ListenPort"])`'"
}

if ($pp["MetricsPath"] -ne $null -and $pp["MetricsPath"] -ne '') {
  $silentArgs += " METRICS_PATH=$($pp["MetricsPath"])"
  Write-Host "Metrics Path: `'$($pp["MetricsPath"])`'"
}

if ($pp["TextFileDir"] -ne $null -and $pp["TextFileDir"] -ne '') {
  $silentArgs += " TEXTFILE_DIR=$($pp["TextFileDir"])"
  Write-Host "Textfile Directory: `'$($pp["TextFileDir"])`'"
}

if ($pp["RemoteAddresses"] -ne $null -and $pp["RemoteAddresses"] -ne '') {
  $silentArgs += " REMOTE_ADDR=$($pp["RemoteAddresses"])"
  Write-Host "Remote Addresses: `'$($pp["RemoteAddresses"])`'"
}

if ($pp["ExtraFlags"] -ne $null -and $pp["ExtraFlags"] -ne '') {
  $silentArgs += " EXTRA_FLAGS=`"$($pp["ExtraFlags"])`""
  Write-Host "Extra flags: `'$($pp["ExtraFlags"])`'"
}

$packageArgs = @{
  packageName   = $packageName
  unzipLocation = $toolsDir
  fileType      = 'MSI'
  url64bit      = $url64

  softwareName  = 'windows_exporter*'

  checksum64    = 'bbe6a2e13850e7fd15a3b9a58ed4a078a93b402caec62df014453f258878134c'
  checksumType64= 'sha256'

  silentArgs    = $silentArgs
  validExitCodes= @(0, 3010, 1641)
}

Install-ChocolateyPackage @packageArgs

2024-05-03 13:03:54,886 6096 [DEBUG] - Calling built-in PowerShell host with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = '';[System.Net.ServicePointManager]
::SecurityProtocol = [System.Net.SecurityProtocolType]::SystemDefault; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 
'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '/ExtraFlags --config.file=C:\ProgramData\Sensu\config\win_exporter.yaml' -preRunHookScripts $null 
-postRunHookScripts $null']
2024-05-03 13:03:54,886 6096 [DEBUG] - Redirecting System.Management.Automation.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35, requested by ''
2024-05-03 13:03:55,353 6096 [DEBUG] - Host version is 5.1.17763.1, PowerShell Version is '5.1.17763.5696' and CLR Version is '4.0.30319.42000'.
2024-05-03 13:03:56,434 6096 [INFO ] - VERBOSE: Exporting function 'Format-FileSize'.
2024-05-03 13:03:56,434 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChecksumValid'.
2024-05-03 13:03:56,434 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyConfigValue'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyPath'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyUnzip'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyWebFile'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-EnvironmentVariable'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-FtpFile'.
2024-05-03 13:03:56,449 6096 [INFO ] - VERBOSE: Exporting function 'Get-OSArchitectureWidth'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageParameters'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-ToolsLocation'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-UACEnabled'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-UninstallRegistryKey'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-VirusCheckValid'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebFile'.
2024-05-03 13:03:56,465 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebFileName'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebHeaders'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Install-BinFile'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.
2024-05-03 13:03:56,481 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPackage'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPath'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyShortcut'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.
2024-05-03 13:03:56,496 6096 [INFO ] - VERBOSE: Exporting function 'Install-Vsix'.
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Set-EnvironmentVariable'.
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Set-PowerShellExitCode'.
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Test-ProcessAdminRights'.
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-BinFile'.
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyEnvironmentVariable'. 
2024-05-03 13:03:56,512 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.
2024-05-03 13:03:56,528 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.
2024-05-03 13:03:56,528 6096 [INFO ] - VERBOSE: Exporting function 'Update-SessionEnvironment'.
2024-05-03 13:03:56,528 6096 [INFO ] - VERBOSE: Exporting function 'Write-FunctionCallLogMessage'.
2024-05-03 13:03:56,528 6096 [INFO ] - VERBOSE: Exporting alias 'Get-ProcessorBits'.
2024-05-03 13:03:56,528 6096 [INFO ] - VERBOSE: Exporting alias 'Get-OSBitness'.
2024-05-03 13:03:56,528 6096 [INFO ] - VERBOSE: Exporting alias 'Get-InstallRegistryKey'.
2024-05-03 13:03:56,543 6096 [INFO ] - VERBOSE: Exporting alias 'Generate-BinFile'.
2024-05-03 13:03:56,543 6096 [INFO ] - VERBOSE: Exporting alias 'Add-BinFile'.
2024-05-03 13:03:56,543 6096 [INFO ] - VERBOSE: Exporting alias 'Start-ChocolateyProcess'.
2024-05-03 13:03:56,543 6096 [INFO ] - VERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.
2024-05-03 13:03:56,559 6096 [INFO ] - VERBOSE: Exporting alias 'Remove-BinFile'.
2024-05-03 13:03:56,559 6096 [INFO ] - VERBOSE: Exporting alias 'refreshenv'.
2024-05-03 13:03:56,574 6096 [DEBUG] - Loading community extensions
2024-05-03 13:03:56,590 6096 [DEBUG] - Importing 'C:\ProgramData\chocolatey\extensions\chocolatey-core\chocolatey-core.psm1' 
2024-05-03 13:03:56,590 6096 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey-core\chocolatey-core.psm1'.
2024-05-03 13:03:56,715 6096 [INFO ] - VERBOSE: Exporting function 'Get-UninstallRegistryKey'. 
2024-05-03 13:03:56,715 6096 [INFO ] - VERBOSE: Exporting function 'Get-AppInstallLocation'.
2024-05-03 13:03:56,731 6096 [INFO ] - VERBOSE: Exporting function 'Get-AvailableDriveLetter'.
2024-05-03 13:03:56,731 6096 [INFO ] - VERBOSE: Exporting function 'Get-EffectiveProxy'.
2024-05-03 13:03:56,731 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageCacheLocation'.
2024-05-03 13:03:56,731 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageParameters'.
2024-05-03 13:03:56,731 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebContent'.
2024-05-03 13:03:56,834 6096 [INFO ] - VERBOSE: Exporting function 'Register-Application'.
2024-05-03 13:03:56,834 6096 [INFO ] - VERBOSE: Exporting function 'Remove-Process'.
2024-05-03 13:03:56,844 6096 [INFO ] - VERBOSE: Importing function 'Get-AppInstallLocation'. 
2024-05-03 13:03:56,846 6096 [INFO ] - VERBOSE: Importing function 'Get-AvailableDriveLetter'.
2024-05-03 13:03:56,846 6096 [INFO ] - VERBOSE: Importing function 'Get-EffectiveProxy'.
2024-05-03 13:03:56,846 6096 [INFO ] - VERBOSE: Importing function 'Get-PackageCacheLocation'.
2024-05-03 13:03:56,846 6096 [INFO ] - VERBOSE: Importing function 'Get-PackageParameters'.
2024-05-03 13:03:56,846 6096 [INFO ] - VERBOSE: Importing function 'Get-UninstallRegistryKey'.
2024-05-03 13:03:56,846 6096 [INFO ] - VERBOSE: Importing function 'Get-WebContent'.
2024-05-03 13:03:56,862 6096 [INFO ] - VERBOSE: Importing function 'Register-Application'.
2024-05-03 13:03:56,862 6096 [INFO ] - VERBOSE: Importing function 'Remove-Process'.
2024-05-03 13:03:56,862 6096 [DEBUG] - Importing 'C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate\chocolatey-windowsupdate.psm1'
2024-05-03 13:03:56,862 6096 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate\chocolatey-windowsupdate.psm1'.
2024-05-03 13:03:56,944 6096 [INFO ] - VERBOSE: Exporting function 'Install-WindowsUpdate'.
2024-05-03 13:03:56,944 6096 [INFO ] - VERBOSE: Exporting function 'Test-WindowsUpdate'.
2024-05-03 13:03:56,944 6096 [INFO ] - VERBOSE: Importing function 'Install-WindowsUpdate'.
2024-05-03 13:03:56,944 6096 [INFO ] - VERBOSE: Importing function 'Test-WindowsUpdate'.
2024-05-03 13:03:56,944 6096 [INFO ] - VERBOSE: Exporting function 'Format-FileSize'.
2024-05-03 13:03:56,959 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChecksumValid'.
2024-05-03 13:03:56,959 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyConfigValue'.
2024-05-03 13:03:56,959 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyPath'.
2024-05-03 13:03:56,959 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyUnzip'.
2024-05-03 13:03:56,959 6096 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyWebFile'. 
2024-05-03 13:03:56,975 6096 [INFO ] - VERBOSE: Exporting function 'Get-EnvironmentVariable'.
2024-05-03 13:03:56,975 6096 [INFO ] - VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.
2024-05-03 13:03:56,975 6096 [INFO ] - VERBOSE: Exporting function 'Get-FtpFile'.
2024-05-03 13:03:56,975 6096 [INFO ] - VERBOSE: Exporting function 'Get-OSArchitectureWidth'.
2024-05-03 13:03:56,975 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageParameters'.
2024-05-03 13:03:56,975 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-ToolsLocation'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-UACEnabled'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-UninstallRegistryKey'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-VirusCheckValid'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebFile'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebFileName'.
2024-05-03 13:03:56,991 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebHeaders'.
2024-05-03 13:03:57,006 6096 [INFO ] - VERBOSE: Exporting function 'Install-BinFile'.
2024-05-03 13:03:57,006 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.
2024-05-03 13:03:57,006 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.
2024-05-03 13:03:57,006 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.
2024-05-03 13:03:57,006 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPackage'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPath'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyShortcut'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.
2024-05-03 13:03:57,017 6096 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyZipPackage'. 
2024-05-03 13:03:57,033 6096 [INFO ] - VERBOSE: Exporting function 'Install-Vsix'.
2024-05-03 13:03:57,036 6096 [INFO ] - VERBOSE: Exporting function 'Set-EnvironmentVariable'.
2024-05-03 13:03:57,036 6096 [INFO ] - VERBOSE: Exporting function 'Set-PowerShellExitCode'.
2024-05-03 13:03:57,036 6096 [INFO ] - VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.
2024-05-03 13:03:57,036 6096 [INFO ] - VERBOSE: Exporting function 'Test-ProcessAdminRights'.
2024-05-03 13:03:57,036 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-BinFile'.
2024-05-03 13:03:57,036 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyEnvironmentVariable'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Update-SessionEnvironment'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Write-FunctionCallLogMessage'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Get-AppInstallLocation'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Get-AvailableDriveLetter'.
2024-05-03 13:03:57,051 6096 [INFO ] - VERBOSE: Exporting function 'Get-EffectiveProxy'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting function 'Get-PackageCacheLocation'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting function 'Get-WebContent'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting function 'Register-Application'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting function 'Remove-Process'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting function 'Install-WindowsUpdate'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting function 'Test-WindowsUpdate'.
2024-05-03 13:03:57,067 6096 [INFO ] - VERBOSE: Exporting alias 'Get-ProcessorBits'.
2024-05-03 13:03:57,083 6096 [INFO ] - VERBOSE: Exporting alias 'Get-OSBitness'.
2024-05-03 13:03:57,083 6096 [INFO ] - VERBOSE: Exporting alias 'Get-InstallRegistryKey'.
2024-05-03 13:03:57,083 6096 [INFO ] - VERBOSE: Exporting alias 'Generate-BinFile'.
2024-05-03 13:03:57,083 6096 [INFO ] - VERBOSE: Exporting alias 'Add-BinFile'.
2024-05-03 13:03:57,083 6096 [INFO ] - VERBOSE: Exporting alias 'Start-ChocolateyProcess'.
2024-05-03 13:03:57,098 6096 [INFO ] - VERBOSE: Exporting alias 'Invoke-ChocolateyProcess'. 
2024-05-03 13:03:57,098 6096 [INFO ] - VERBOSE: Exporting alias 'Remove-BinFile'.
2024-05-03 13:03:57,098 6096 [INFO ] - VERBOSE: Exporting alias 'refreshenv'.
2024-05-03 13:03:57,098 6096 [INFO ] - VERBOSE: Importing function 'Format-FileSize'.
2024-05-03 13:03:57,098 6096 [INFO ] - VERBOSE: Importing function 'Get-AppInstallLocation'.
2024-05-03 13:03:57,098 6096 [INFO ] - VERBOSE: Importing function 'Get-AvailableDriveLetter'.
2024-05-03 13:03:57,114 6096 [INFO ] - VERBOSE: Importing function 'Get-ChecksumValid'. 
2024-05-03 13:03:57,114 6096 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyConfigValue'. 
2024-05-03 13:03:57,114 6096 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyPath'.
2024-05-03 13:03:57,114 6096 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyUnzip'.
2024-05-03 13:03:57,114 6096 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyWebFile'.
2024-05-03 13:03:57,114 6096 [INFO ] - VERBOSE: Importing function 'Get-EffectiveProxy'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-EnvironmentVariable'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-EnvironmentVariableNames'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-FtpFile'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-OSArchitectureWidth'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-PackageCacheLocation'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-PackageParameters'.
2024-05-03 13:03:57,129 6096 [INFO ] - VERBOSE: Importing function 'Get-PackageParametersBuiltIn'.
2024-05-03 13:03:57,145 6096 [INFO ] - VERBOSE: Importing function 'Get-ToolsLocation'.
2024-05-03 13:03:57,145 6096 [INFO ] - VERBOSE: Importing function 'Get-UACEnabled'.
2024-05-03 13:03:57,145 6096 [INFO ] - VERBOSE: Importing function 'Get-UninstallRegistryKey'.
2024-05-03 13:03:57,163 6096 [INFO ] - VERBOSE: Importing function 'Get-VirusCheckValid'.
2024-05-03 13:03:57,163 6096 [INFO ] - VERBOSE: Importing function 'Get-WebContent'.
2024-05-03 13:03:57,163 6096 [INFO ] - VERBOSE: Importing function 'Get-WebFile'.
2024-05-03 13:03:57,163 6096 [INFO ] - VERBOSE: Importing function 'Get-WebFileName'.
2024-05-03 13:03:57,163 6096 [INFO ] - VERBOSE: Importing function 'Get-WebHeaders'.
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-BinFile'. 
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyEnvironmentVariable'.
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyExplorerMenuItem'.
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyFileAssociation'.
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyInstallPackage'.
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPackage'.
2024-05-03 13:03:57,176 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPath'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPinnedTaskBarItem'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPowershellCommand'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyShortcut'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyVsixPackage'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyZipPackage'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-Vsix'.
2024-05-03 13:03:57,192 6096 [INFO ] - VERBOSE: Importing function 'Install-WindowsUpdate'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Register-Application'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Remove-Process'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Set-EnvironmentVariable'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Set-PowerShellExitCode'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Start-ChocolateyProcessAsAdmin'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Test-ProcessAdminRights'.
2024-05-03 13:03:57,208 6096 [INFO ] - VERBOSE: Importing function 'Test-WindowsUpdate'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing function 'Uninstall-BinFile'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyEnvironmentVariable'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyPackage'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyZipPackage'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing function 'Update-SessionEnvironment'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing function 'Write-FunctionCallLogMessage'.
2024-05-03 13:03:57,223 6096 [INFO ] - VERBOSE: Importing alias 'Add-BinFile'.
2024-05-03 13:03:57,254 6096 [INFO ] - VERBOSE: Importing alias 'Generate-BinFile'.
2024-05-03 13:03:57,254 6096 [INFO ] - VERBOSE: Importing alias 'Get-InstallRegistryKey'. 
2024-05-03 13:03:57,254 6096 [INFO ] - VERBOSE: Importing alias 'Get-OSBitness'.
2024-05-03 13:03:57,254 6096 [INFO ] - VERBOSE: Importing alias 'Get-ProcessorBits'.
2024-05-03 13:03:57,270 6096 [INFO ] - VERBOSE: Importing alias 'Invoke-ChocolateyProcess'.
2024-05-03 13:03:57,270 6096 [INFO ] - VERBOSE: Importing alias 'refreshenv'.
2024-05-03 13:03:57,270 6096 [INFO ] - VERBOSE: Importing alias 'Remove-BinFile'.
2024-05-03 13:03:57,270 6096 [INFO ] - VERBOSE: Importing alias 'Start-ChocolateyProcess'.
2024-05-03 13:03:57,333 6096 [DEBUG] - ---------------------------Script Execution---------------------------
2024-05-03 13:03:57,333 6096 [DEBUG] - Running 'ChocolateyScriptRunner' for prometheus-windows-exporter.install v0.25.1 with packageScript 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1',
 packageFolder:'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install', installArguments: '', packageParameters: '/ExtraFlags --config.file=C:\ProgramData\Sensu\config\win_exporter.yaml', preRunHookScripts: '', postRunHookS
cripts: '',
2024-05-03 13:03:57,348 6096 [DEBUG] - Running package script 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1'
2024-05-03 13:03:57,411 6096 [DEBUG] - Running Get-PackageParameters  
2024-05-03 13:03:57,411 6096 [DEBUG] - Parsing $env:ChocolateyPackageParameters and $env:ChocolateyPackageParametersSensitive for parameters
2024-05-03 13:03:57,442 6096 [DEBUG] - Adding package param 'ExtraFlags'='True'
2024-05-03 13:03:57,489 6096 [INFO ] - Extra flags: 'True'
2024-05-03 13:03:57,536 6096 [DEBUG] - Running Install-ChocolateyPackage -url64bit 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi' -checksum64 'bbe6a2e13850e7fd15a3
b9a58ed4a078a93b402caec62df014453f258878134c' -silentArgs '/quiet /norestart /l*v "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install.0.25.1.MsiInstall.log" EXTRA_FLAGS="True"' -packageName 'prometheus-
windows-exporter.install' -fileType 'MSI' -validExitCodes '0 3010 1641' -checksumType64 'sha256'
2024-05-03 13:03:57,598 6096 [DEBUG] - Running Get-ChocolateyWebFile -packageName 'prometheus-windows-exporter.install' -fileFullPath 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\prometheu
s-windows-exporter.installInstall.MSI' -url '' -url64bit 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi' -checksum '' -checksumType '' -checksum64 'bbe6a2e13850e7fd
15a3b9a58ed4a078a93b402caec62df014453f258878134c' -checksumType64 'sha256' -options 'System.Collections.Hashtable' -getOriginalFileName 'True'
2024-05-03 13:03:57,614 6096 [DEBUG] - Running Get-OSArchitectureWidth -compare '64'
2024-05-03 13:03:57,672 6096 [DEBUG] - CPU is 64 bit 
2024-05-03 13:03:57,687 6096 [DEBUG] - Setting url to 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi' and bitPackage to 64
2024-05-03 13:03:57,718 6096 [DEBUG] - Running Get-WebFileName -url 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi' -defaultName 'prometheus-windows-exporter.instal
lInstall.MSI'
2024-05-03 13:03:58,366 6096 [DEBUG] - Using header 'Content-Disposition' to determine file name. 
2024-05-03 13:03:58,382 6096 [DEBUG] - File name determined from url is 'windows_exporter-0.25.1-amd64.msi'
2024-05-03 13:03:58,413 6096 [DEBUG] - Running Get-WebHeaders -url 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi' -ErrorAction 'Stop'
2024-05-03 13:03:58,413 6096 [DEBUG] - Setting the UserAgent to 'chocolatey command line'
2024-05-03 13:03:58,413 6096 [DEBUG] - Request Headers:
2024-05-03 13:03:58,429 6096 [DEBUG] -   'Accept':'*/*'
2024-05-03 13:03:58,429 6096 [DEBUG] -   'User-Agent':'chocolatey command line'
2024-05-03 13:03:58,805 6096 [DEBUG] - Response Headers: 
2024-05-03 13:03:58,805 6096 [DEBUG] -   'Connection':'keep-alive'
2024-05-03 13:03:58,805 6096 [DEBUG] -   'Content-MD5':'uwhmYN94gMw++i+v+B/r+A=='
2024-05-03 13:03:58,821 6096 [DEBUG] -   'x-ms-request-id':'8f1e2729-b01e-002f-566c-8bec9e000000'
2024-05-03 13:03:58,821 6096 [DEBUG] -   'x-ms-version':'2020-10-02'
2024-05-03 13:03:58,821 6096 [DEBUG] -   'x-ms-creation-time':'Tue, 16 Jan 2024 17:56:34 GMT'
2024-05-03 13:03:58,821 6096 [DEBUG] -   'x-ms-lease-status':'unlocked'
2024-05-03 13:03:58,821 6096 [DEBUG] -   'x-ms-lease-state':'available'
2024-05-03 13:03:58,836 6096 [DEBUG] -   'x-ms-blob-type':'BlockBlob'
2024-05-03 13:03:58,836 6096 [DEBUG] -   'Content-Disposition':'attachment; filename=windows_exporter-0.25.1-amd64.msi'
2024-05-03 13:03:58,836 6096 [DEBUG] -   'x-ms-server-encrypted':'true'
2024-05-03 13:03:58,836 6096 [DEBUG] -   'Age':'4356'
2024-05-03 13:03:58,836 6096 [DEBUG] -   'X-Served-By':'cache-iad-kjyo7100128-IAD, cache-cph2320059-CPH'
2024-05-03 13:03:58,836 6096 [DEBUG] -   'X-Cache':'HIT, HIT'
2024-05-03 13:03:58,852 6096 [DEBUG] -   'X-Cache-Hits':'506, 0'
2024-05-03 13:03:58,852 6096 [DEBUG] -   'X-Timer':'S1714734238.424976,VS0,VE343'
2024-05-03 13:03:58,852 6096 [DEBUG] -   'Accept-Ranges':'bytes'
2024-05-03 13:03:58,852 6096 [DEBUG] -   'Content-Length':'10637312'
2024-05-03 13:03:58,852 6096 [DEBUG] -   'Content-Type':'application/octet-stream'
2024-05-03 13:03:58,868 6096 [DEBUG] -   'Date':'Fri, 03 May 2024 11:03:58 GMT'
2024-05-03 13:03:58,868 6096 [DEBUG] -   'ETag':'"0x8DC16BC7A4C76BA"'
2024-05-03 13:03:58,868 6096 [DEBUG] -   'Last-Modified':'Tue, 16 Jan 2024 17:56:34 GMT'
2024-05-03 13:03:58,883 6096 [DEBUG] -   'Server':'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0'
2024-05-03 13:03:58,883 6096 [DEBUG] -   'Via':'1.1 varnish, 1.1 varnish'
2024-05-03 13:03:58,899 6096 [INFO ] - File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded.
2024-05-03 13:03:58,899 6096 [DEBUG] - Running Get-ChecksumValid -file 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi' -checksum 'bbe6a2e13850e7fd15a3b9a58e
d4a078a93b402caec62df014453f258878134c' -checksumType 'sha256' -originalUrl 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi' -ErrorAction 'Stop'
2024-05-03 13:03:58,915 6096 [DEBUG] - checksum.exe found at 'C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe'
2024-05-03 13:03:58,915 6096 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="bbe6a2e13850e7fd15a3b9a58ed4a078a93b402caec62df014453f258878134c" -t="sha256" -f="C:\Users\elfranne\AppData\Local\T
emp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi"]
2024-05-03 13:04:00,260 6096 [DEBUG] - Command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="bbe6a2e13850e7fd15a3b9a58ed4a078a93b402caec62df014453f258878134c" -t="sha256" -f="C:\Users\elfranne\AppData\Local\Temp\chocol
atey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi"] exited with '0'.
2024-05-03 13:04:00,276 6096 [DEBUG] - prometheus-windows-exporter.install's requested file has already been downloaded. Using cached copy at
 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi'.
2024-05-03 13:04:02,299 6096 [DEBUG] - No runtime virus checking built into FOSS Chocolatey. Check out Pro/Business - https://chocolatey.org/compare 
2024-05-03 13:04:02,299 6096 [DEBUG] - Verifying package provided checksum of 'bbe6a2e13850e7fd15a3b9a58ed4a078a93b402caec62df014453f258878134c' for 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0
.25.1\windows_exporter-0.25.1-amd64.msi'.
2024-05-03 13:04:02,312 6096 [DEBUG] - Running Get-ChecksumValid -file 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi' -checksum 'bbe6a2e13850e7fd15a3b9a58e
d4a078a93b402caec62df014453f258878134c' -checksumType 'sha256' -originalUrl 'https://github.com/prometheus-community/windows_exporter/releases/download/v0.25.1/windows_exporter-0.25.1-amd64.msi'
2024-05-03 13:04:02,312 6096 [DEBUG] - checksum.exe found at 'C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe'
2024-05-03 13:04:02,328 6096 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="bbe6a2e13850e7fd15a3b9a58ed4a078a93b402caec62df014453f258878134c" -t="sha256" -f="C:\Users\elfranne\AppData\Local\T
emp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi"]
2024-05-03 13:04:02,687 6096 [DEBUG] - Command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="bbe6a2e13850e7fd15a3b9a58ed4a078a93b402caec62df014453f258878134c" -t="sha256" -f="C:\Users\elfranne\AppData\Local\Temp\chocol
atey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi"] exited with '0'.
2024-05-03 13:04:02,719 6096 [DEBUG] - Running Install-ChocolateyInstallPackage -packageName 'prometheus-windows-exporter.install' -fileType 'MSI' -silentArgs '/quiet /norestart /l*v "C:\Users\elfranne\AppData\Local\Temp\chocolatey\pro
metheus-windows-exporter.install.0.25.1.MsiInstall.log" EXTRA_FLAGS="True"' -file 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi' -validExitCodes '0 3010 16
41' -useOnlyPackageSilentArguments 'False'
2024-05-03 13:04:02,734 6096 [DEBUG] - Running Get-OSArchitectureWidth -compare '32'
2024-05-03 13:04:02,734 6096 [INFO ] - Installing prometheus-windows-exporter.install...
2024-05-03 13:04:02,765 6096 [DEBUG] - Ensuring 'C:\Users\elfranne\AppData\Local\Temp\chocolatey' exists
2024-05-03 13:04:02,844 6096 [DEBUG] - Running Start-ChocolateyProcessAsAdmin -validExitCodes '0 3010 1641' -workingDirectory 'C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1' -statements '/i 
"C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi" /quiet /norestart /l*v "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install.
0.25.1.MsiInstall.log" EXTRA_FLAGS="True" ' -exeToRun 'C:\Windows\System32\msiexec.exe'
2024-05-03 13:04:02,875 6096 [DEBUG] - Test-ProcessAdminRights: returning True 
2024-05-03 13:04:02,875 6096 [DEBUG] - Elevating permissions and running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.ms
i" /quiet /norestart /l*v "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install.0.25.1.MsiInstall.log" EXTRA_FLAGS="True" ]. This may take a while, depending on the statements.
2024-05-03 13:08:13,787 6096 [DEBUG] - Command ["C:\Windows\System32\msiexec.exe" /i "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi" /quiet /norestart /l*v 
"C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install.0.25.1.MsiInstall.log" EXTRA_FLAGS="True" ] exited with '1603'.
2024-05-03 13:08:13,802 6096 [WARN ] - WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like 
the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\prometheus-windows-exporter.install_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and l
ook above that for the error.
2024-05-03 13:08:13,818 6096 [ERROR] - ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install\0.25.1\windows_exporter-0.25.1-amd64.msi" /quiet /norestar
t /l*v "C:\Users\elfranne\AppData\Local\Temp\chocolatey\prometheus-windows-exporter.install.0.25.1.MsiInstall.log" EXTRA_FLAGS="True" ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. Thi
s is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if availabl
e. If not, try again adding '--install-arguments="'/l*v c:\prometheus-windows-exporter.install_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
2024-05-03 13:08:13,818 6096 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = '';[System.Net.ServicePointManager]:
:SecurityProtocol = [System.Net.SecurityProtocolType]::SystemDefault; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript '
C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '/ExtraFlags --config.file=C:\ProgramData\Sensu\config\win_exporter.yaml' -preRunHookScripts $null -
postRunHookScripts $null'] exited with '1603'.
2024-05-03 13:08:13,834 6096 [DEBUG] - Calling command ['"C:\Windows\System32\shutdown.exe" /a']
2024-05-03 13:08:13,880 6096 [DEBUG] - Command ['"C:\Windows\System32\shutdown.exe" /a'] exited with '1116'
2024-05-03 13:08:13,927 6096 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install' 
2024-05-03 13:08:13,927 6096 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\prometheus-windows-exporter.install.nupkg'
  with checksum '7E28FB4E771D6340085281D0290C1A3A'
2024-05-03 13:08:13,927 6096 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\prometheus-windows-exporter.install.nuspec'
  with checksum '56AF8EFF7654C85AAF85A2469E7B58A9'
2024-05-03 13:08:13,927 6096 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1'
  with checksum '28B9ACC90E0B480FC6AB76C28C190420'
2024-05-03 13:08:13,943 6096 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyuninstall.ps1'
  with checksum '7A35959FB4DE657BEDD2C0BD2F992D30'
2024-05-03 13:08:13,959 6096 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\prometheus-windows-exporter.install.0.25.1\.arguments".
2024-05-03 13:08:13,959 6096 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\prometheus-windows-exporter.install.0.25.1\.extra".
2024-05-03 13:08:13,959 6096 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\prometheus-windows-exporter.install.0.25.1\.version".
2024-05-03 13:08:13,959 6096 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\prometheus-windows-exporter.install.0.25.1\.sxs".
2024-05-03 13:08:13,959 6096 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\prometheus-windows-exporter.install.0.25.1\.pin".
2024-05-03 13:08:13,959 6096 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2024-05-03 13:08:13,975 6096 [ERROR] - The install of prometheus-windows-exporter.install was NOT successful.
2024-05-03 13:08:13,979 6096 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1'.
 See log for details.
2024-05-03 13:08:13,984 6096 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib-bad\prometheus-windows-exporter.install".
2024-05-03 13:08:13,985 6096 [DEBUG] - Moving C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install to C:\ProgramData\chocolatey\lib-bad\prometheus-windows-exporter.install\0.25.1
2024-05-03 13:08:13,985 6096 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install'
 to 'C:\ProgramData\chocolatey\lib-bad\prometheus-windows-exporter.install\0.25.1'
2024-05-03 13:08:15,997 6096 [WARN ] -  
Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2024-05-03 13:08:15,997 6096 [INFO ] -
2024-05-03 13:08:16,012 6096 [ERROR] - Failures
2024-05-03 13:08:16,028 6096 [ERROR] -  - prometheus-windows-exporter.install (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\prometheus-windows-exporter.install\tools\chocolateyinstall.ps1'.
 See log for details.
2024-05-03 13:08:16,028 6096 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2024-05-03 13:08:16,028 6096 [DEBUG] - Exiting with 1603
Dr-Electron commented 1 month ago

Yeah, I have the same issue 🤔 Were you ever able to resolve it?

elfranne commented 1 month ago

I found a workaround by changing a registry key.

I use Puppet with Chocolatey and Sensu (monitoring), here is how I solved my issue:


# Prometheus Collector for Windows,
# see list of all collectors available: https://github.com/prometheus-community/windows_exporter/?tab=readme-ov-file#collectors
class profile::win_exporter (
  Hash $config,
) {
  $config_file = 'C:\\ProgramData\\Sensu\\config\\win_exporter.yaml' # sensu::etc_dir
  file { $config_file:
    ensure  => 'file',
    content => to_yaml($config),
    require => Class['sensu::agent'],
    notify  => Service['windows_exporter'],
  }
  package { 'prometheus-windows-exporter.install' :
    ensure   => 'latest',
    provider => 'chocolatey',
  }
  service { 'windows_exporter':
    ensure  => 'running',
    require => Package['prometheus-windows-exporter.install'],
  }
  registry_value { 'windows_exporter-use-config-file':
    ensure   => 'present',
    path     => 'HKLM\\System\\CurrentControlSet\\Services\\windows_exporter\\ImagePath',
    data     => "\"C:\\Program Files\\windows_exporter\\windows_exporter.exe\" --log.file eventlog  --web.listen-address 0.0.0.0:9182 --config.file \"${config_file}\"",
    provider => 'registry',
    type     => 'expand',
    notify   => Service['windows_exporter'],
    require  => Package['prometheus-windows-exporter.install'],
  }
}