Skip to content

Commit

Permalink
Document exposed metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Waldz committed May 17, 2024
1 parent b81152a commit ab46021
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion metrics/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ab46021

Please sign in to comment.