From ab4602143bd805a0e67f3d4d0454f0b07211edcf Mon Sep 17 00:00:00 2001 From: Valdas Petrulis Date: Fri, 17 May 2024 10:40:47 +0300 Subject: [PATCH] Document exposed metrics --- README.md | 6 +++++- metrics/service.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd54188..e9792cb 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,11 @@ docker exec -it openvpn wget -q -O - "https://ipinfo.io/" ``` ## Metrics of traffic -After your bind API with e.g. `--proxy.api-bind=127.0.0.1:8000```, Prometheus metrics are available on http://127.0.0.1:8000/metrics. +After your bind API with e.g. `--proxy.api-bind=127.0.0.1:8000```, Prometheus metrics are available on http://127.0.0.1:8000/metrics: +- `proxy_request_data` - Proxy request data in bytes (Counter); +- `proxy_request_duration` - Proxy request duration in seconds (Histogram); +- `proxy_number_of_live_connections` - Number of currently live connections (Gauge); +- `proxy_number_of_processed_connections` - Number of incoming connections which were successfully assigned and processed (Counter); ## Forward non-standard ports to OpenVPN forwarder By default, OpenVPN forwarder listen ':8443' port and sends traffic to the standard port only diff --git a/metrics/service.go b/metrics/service.go index 9958f8d..66a05c2 100644 --- a/metrics/service.go +++ b/metrics/service.go @@ -52,7 +52,7 @@ func NewMetricsService() (*service, error) { proxyNumberOfProcessedConnections := prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "proxy_number_of_processed_connections", - Help: "Number of incmming connections which were succesfully assigned and processed", + Help: "Number of incoming connections which were successfully assigned and processed", }, []string{"request_type"}) if err := prometheus.Register(proxyNumberOfProcessedConnections); err != nil {