Begin prometheus integration
Add a dependency on `prom-client` and emit a basic latency metric for testing purposes. Add a new configuration file for enabling/disabling prometheus exporter and configuring the listen address.
This commit is contained in:
parent
dd770137e5
commit
c7bec6251e
10 changed files with 222 additions and 1 deletions
14
conf/example/prometheus.toml
Normal file
14
conf/example/prometheus.toml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Configuration for binding an HTTP server to export prometheus metrics.
|
||||
# See https://prometheus.io/ and https://github.com/siimon/prom-client
|
||||
# for more details.
|
||||
[prometheus]
|
||||
enabled = true
|
||||
# Host, port to bind. This is separate from the main CyTube HTTP server
|
||||
# because it may be desirable to bind a different IP/port for monitoring
|
||||
# purposes. Default: localhost port 19820 (arbitrary port chosen not to
|
||||
# conflict with existing prometheus exporters).
|
||||
host = '127.0.0.1'
|
||||
port = 19820
|
||||
# Request path to serve metrics. All other paths are rejected with
|
||||
# 400 Bad Request.
|
||||
path = '/metrics'
|
||||
Loading…
Add table
Add a link
Reference in a new issue