diff --git a/README.md b/README.md index 7dac8426..2a7eba7b 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ run ->(_) { [200, {'content-type' => 'text/html'}, ['OK']] } ``` Start the server and have a look at the metrics endpoint: -[http://localhost:5000/metrics](http://localhost:5000/metrics). +[http://localhost:5123/metrics](http://localhost:5123/metrics). For further instructions and other scripts to get started, have a look at the integrated [example application](examples/rack/README.md). diff --git a/examples/rack/README.md b/examples/rack/README.md index e3497335..9c6188e6 100644 --- a/examples/rack/README.md +++ b/examples/rack/README.md @@ -33,8 +33,8 @@ bundle install bundle exec unicorn -c ./unicorn.conf ``` -You can now open the [example app](http://localhost:5000/) and its [metrics -page](http://localhost:5000/metrics) to inspect the output. The running +You can now open the [example app](http://localhost:5123/) and its [metrics +page](http://localhost:5123/metrics) to inspect the output. The running Prometheus server can be used to [play around with the metrics][rate-query]. [rate-query]: http://localhost:9090/graph#%5B%7B%22range_input%22%3A%221h%22%2C%22expr%22%3A%22rate(http_server_requests_total%5B1m%5D)%22%2C%22tab%22%3A0%7D%5D diff --git a/examples/rack/prometheus.yml b/examples/rack/prometheus.yml index ab9c4477..2e57f88d 100644 --- a/examples/rack/prometheus.yml +++ b/examples/rack/prometheus.yml @@ -10,4 +10,4 @@ scrape_configs: - job_name: "rack-example" static_configs: - targets: - - "localhost:5000" + - "localhost:5123" diff --git a/examples/rack/run b/examples/rack/run index eaaa6929..bf89080f 100755 --- a/examples/rack/run +++ b/examples/rack/run @@ -20,11 +20,11 @@ if ! installed vegeta; then fatal "Could not find go. Either run the examples manually or install" fi - go get github.com/tsenart/vegeta - go install github.com/tsenart/vegeta + go get github.com/tsenart/vegeta # versions of Go < 1.18 + go install github.com/tsenart/vegeta@latest # versions of Go >= 1.18 fi -PORT=5000 +PORT=5123 URL=http://127.0.0.1:${PORT}/ log "starting example server" diff --git a/examples/rack/unicorn.conf b/examples/rack/unicorn.conf index 290ca789..f1ffcfdc 100644 --- a/examples/rack/unicorn.conf +++ b/examples/rack/unicorn.conf @@ -1,3 +1,3 @@ -listen 5000 +listen 5123 worker_processes 1 preload_app true