Pushgateway windows

From UVOO Tech Wiki
Revision as of 00:12, 12 January 2024 by Busk (talk | contribs) (Created page with "# Windows ## Not working ``` $cred = Get-Credential $r=(invoke-webrequest http://localhost:9182/metrics).content; $r.tostring() -split "[`r`n]" | select-string -pattern "go_|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Windows

Not working

$cred = Get-Credential
$r=(invoke-webrequest http://localhost:9182/metrics).content; $r.tostring() -split "[`r`n]" | select-string -pattern "go_|http_request|http_requests|http_response|process" -NotMatch | ConvertTo-Json | Invoke-WebRequest -Method POST -Uri https://pushgateway.example/metrics/job/windowsnode/instance/foo -cred $cred -ContentType 'application/json'