Pushgateway windows
Jump to navigation
Jump to search
Windows
Not working
$ErrorActionPreference = "Stop" $cred = Get-Credential $r=(invoke-webrequest http://localhost:9182/metrics).content # filter is not working properly # $metrics = ($r.tostring() -split "[`r`n]" | select-string -pattern "go_|http_request|http_requests|http_response|process" -NotMatch) $metrics = ($r.tostring()) Invoke-WebRequest -uri https://pushgateway.example.com/metrics/job/windows-node/instance/winhost -cred $cred -Body $metrics -Method Post