I got this error : Invoke-WebRequest -Uri 'http://192.168.1.111:9091/metrics/job/jobname1/instance/instancename1' -Method Post -Body 'metricname1 101' -ContentType 'application/octet-stream' *Invoke-WebRequest : text format parsing error in line 1: unexpected end of input stream*
I am facing the same issue here: https://stackoverflow.com/questions/68818211/send-metrics-with-pushgateway-prometheus-using-windows-console But the solution mentioned did not work for me. echo "metricname1 101 " | Invoke-WebRequest -Uri http://192.168.1.111:9091/metrics/job/jobname1 -Method POST *Invoke-WebRequest : text format parsing error in line 1: expected float as value, got "101\r"* On Monday, March 4, 2024 at 4:21:22 PM UTC+3 Brian Candler wrote: > https://superuser.com/questions/344927/powershell-equivalent-of-curl > > On Monday 4 March 2024 at 07:10:18 UTC Leen Tux wrote: > >> Hi >> What is the powershell command equivalent to: >> *$ echo 'metricname1 101' | curl --data-binary @- >> http://localhost:9091/metrics/job/jobname1/instance/instancename1 >> <http://localhost:9091/metrics/job/jobname1/instance/instancename1>* >> > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/83551da0-96b6-4a4b-a7e4-4138b93ba998n%40googlegroups.com.

