Skip to content

Commit

Permalink
Merge branch 'main' into add-k6-benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
sontek authored Jan 2, 2023
2 parents 7c1e25b + 886a10d commit 1da6c30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ E.g. if you have the program running locally:
echo 'http_requests_total{method="post",code="200"} 1027' | curl --data-binary @- http://localhost/metrics/
```

You can also add labels that will apply to all metrics that are passed. For example, the following will add the `domain="sometest.com"` and `instance="nginx-1"` labels to both metrics:

```bash
echo '
http_requests_total{method="post",code="200"} 1027
http_errors_total{method="post",code="500"} 6
' | curl --data-binary @- http://localhost/metrics/domain/sometest.com/instance/nginx-1
```

Now you can push your metrics using your favorite Prometheus client.

E.g. in Python using [prometheus/client_python](https://github.com/prometheus/client_python):
Expand Down

0 comments on commit 1da6c30

Please sign in to comment.