Search code examples
windowsconsoleprometheusprometheus-pushgateway

Send metrics with pushgateway (Prometheus) using windows console


I am trying to send metrics to pushgateway from windows. But I get the following error:

text format parsing error in line 1: invalid metric name

This is the command I run from the console:

echo "some_metric 10" | curl --data-binary @ - http: // localhost: 9091 / metrics / job / some_job

How could I send my metrics from windows console?

Thanks


Solution

  • I run into the same issue, I guess it has something to do with running it on windows. You can try doing it with a powershell script, this worked for me:

    Invoke-WebRequest -Uri http://localhost:9091/metrics/job/some_job -Method POST