*: cleanup collector API 1 (#1547)

This commit is contained in:
Jan-Otto Kröpke
2024-08-05 15:50:41 +02:00
committed by GitHub
parent dffc53eff8
commit d1e3a63f93
86 changed files with 2162 additions and 1930 deletions

View File

@@ -41,7 +41,16 @@ for ($i=1; $i -le 5; $i++) {
Write-Host "Waiting for exporter to start"
}
$response = Invoke-WebRequest -UseBasicParsing -URI http://127.0.0.1:9182/metrics
try {
$response = Invoke-WebRequest -UseBasicParsing -URI http://127.0.0.1:9182/metrics
} catch {
Write-Host "STDOUT"
Get-Content "$($temp_dir)/windows_exporter.log"
Write-Host "STDERR"
Get-Content "$($temp_dir)/windows_exporter_error.log"
throw $_
}
# Response output must be split and saved as UTF-8.
$response.content -split "[`r`n]"| Select-String -NotMatch $skip_re | Set-Content -Encoding utf8 "$($temp_dir)/e2e-output.txt"
Stop-Process -Id $exporter_proc.Id