Skip to content

Commit c89e884

Browse files
committed
DOC/MEDIUM: add prometheus metrics doc
1 parent 1629b45 commit c89e884

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

documentation/prometheus.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,33 @@ Then point the controller to this secret by adding the `prometheus-endpoint-auth
1717
```
1818
prometheus-endpoint-auth-secret: haproxy-controller/prometheus-credentials
1919
```
20+
21+
22+
## Metrics
23+
24+
On top of the prometheus provided metrics, we added these three ones:
25+
```
26+
haproxy_reloads_total: The number of haproxy reloads partitioned by result (success/failure)
27+
haproxy_restarts_total: The number of haproxy restarts partitioned by result (success/failure)
28+
haproxy_runtime_socket_connections_total: The number of haproxy runtime socket connections partitioned by object (server/map) and result (success/failure)
29+
```
30+
31+
32+
### Example
33+
34+
Metrics are exposed outside on the haproxy-kubernetes-ingress service, http nodePort, on the `/mterics` endpoint.
35+
36+
```
37+
curl <nodeIP>:<haproxy-kubernetes-ingress svc http nodePort>/metrics|grep haproxy_
38+
39+
# HELP haproxy_reloads_total The number of haproxy reloads partitioned by result (success/failure)
40+
# TYPE haproxy_reloads_total counter
41+
haproxy_reloads_total{result="success"} 4
42+
# HELP haproxy_restarts_total The number of haproxy restarts partitioned by result (success/failure)
43+
# TYPE haproxy_restarts_total counter
44+
haproxy_restarts_total{result="success"} 1
45+
# HELP haproxy_runtime_socket_connections_total The number of haproxy runtime socket connections partitioned by object (server/map) and result (success/failure)
46+
# TYPE haproxy_runtime_socket_connections_total counter
47+
haproxy_runtime_socket_connections_total{object="map",result="success"} 4
48+
haproxy_runtime_socket_connections_total{object="server",result="success"} 50
49+
```

0 commit comments

Comments
 (0)