Merge pull request #2466 from tifayuki/prometheus_go_metrics
add prometheus metrics
This commit is contained in:
commit
6664ec7039
113 changed files with 17182 additions and 8 deletions
|
@ -218,6 +218,9 @@ http:
|
|||
hosts: [myregistryaddress.org]
|
||||
debug:
|
||||
addr: localhost:5001
|
||||
prometheus:
|
||||
enabled: true
|
||||
path: /metrics
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
http2:
|
||||
|
@ -805,6 +808,19 @@ access to the debug endpoint is locked down in a production environment.
|
|||
The `debug` section takes a single required `addr` parameter, which specifies
|
||||
the `HOST:PORT` on which the debug server should accept connections.
|
||||
|
||||
## `prometheus`
|
||||
|
||||
The `prometheus` option defines whether the prometheus metrics is enable, as well
|
||||
as the path to access the metrics.
|
||||
|
||||
| Parameter | Required | Description |
|
||||
|-----------|----------|-------------------------------------------------------|
|
||||
| `enabled` | no | Set `true` to enable the prometheus server |
|
||||
| `path` | no | The path to access the metrics, `/metrics` by default |
|
||||
|
||||
The url to access the metrics is `HOST:PORT/path`, where `HOST:PORT` is defined
|
||||
in `addr` under `debug`.
|
||||
|
||||
### `headers`
|
||||
|
||||
The `headers` option is **optional** . Use it to specify headers that the HTTP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue