awx
awx copied to clipboard
Expose wsrelay metrics
SUMMARY
- We were already maintaining prometheus metrics for the websocket relay service. This change exposes those metrics over the local per-service prometheus server.
ISSUE TYPE
- New or Enhanced Feature
COMPONENT NAME
- API
AWX VERSION
devel
ADDITIONAL INFORMATION
docker exec -it tools_awx_1 /bin/bash
curl localhost:8016
# HELP wsrelay_messages_received_total Number of messages received, to be forwarded, by the broadcast websocket system
# TYPE wsrelay_messages_received_total counter
wsrelay_messages_received_total{remote_host="awx_3"} 0.0
wsrelay_messages_received_total{remote_host="awx_2"} 0.0
# HELP wsrelay_messages_received_created Number of messages received, to be forwarded, by the broadcast websocket system
# TYPE wsrelay_messages_received_created gauge
wsrelay_messages_received_created{remote_host="awx_3"} 1.712085502612824e+09
wsrelay_messages_received_created{remote_host="awx_2"} 1.712085502613021e+09
# HELP wsrelay_connection Websocket broadcast connection established status
# TYPE wsrelay_connection gauge
wsrelay_connection{remote_host="awx_3",wsrelay_connection="disconnected"} 0.0
wsrelay_connection{remote_host="awx_3",wsrelay_connection="connected"} 1.0
wsrelay_connection{remote_host="awx_2",wsrelay_connection="disconnected"} 0.0
wsrelay_connection{remote_host="awx_2",wsrelay_connection="connected"} 1.0
# HELP wsrelay_connection_start_time_seconds Time the connection was established since unix epoch in seconds
# TYPE wsrelay_connection_start_time_seconds gauge
wsrelay_connection_start_time_seconds{remote_host="awx_3"} 1.712085502621528e+09
wsrelay_connection_start_time_seconds{remote_host="awx_2"} 1.7120855026317036e+09
docker exec -it tools_awx_2 /bin/bash
bash-5.1$ curl localhost:8016
# HELP wsrelay_messages_received_total Number of messages received, to be forwarded, by the broadcast websocket system
# TYPE wsrelay_messages_received_total counter
wsrelay_messages_received_total{remote_host="awx_3"} 0.0
wsrelay_messages_received_total{remote_host="awx_1"} 0.0
# HELP wsrelay_messages_received_created Number of messages received, to be forwarded, by the broadcast websocket system
# TYPE wsrelay_messages_received_created gauge
wsrelay_messages_received_created{remote_host="awx_3"} 1.7120854948292418e+09
wsrelay_messages_received_created{remote_host="awx_1"} 1.71208549482941e+09
# HELP wsrelay_connection Websocket broadcast connection established status
# TYPE wsrelay_connection gauge
wsrelay_connection{remote_host="awx_3",wsrelay_connection="disconnected"} 0.0
wsrelay_connection{remote_host="awx_3",wsrelay_connection="connected"} 1.0
wsrelay_connection{remote_host="awx_1",wsrelay_connection="disconnected"} 0.0
wsrelay_connection{remote_host="awx_1",wsrelay_connection="connected"} 1.0
# HELP wsrelay_connection_start_time_seconds Time the connection was established since unix epoch in seconds
# TYPE wsrelay_connection_start_time_seconds gauge
wsrelay_connection_start_time_seconds{remote_host="awx_3"} 1.7120854948457365e+09
wsrelay_connection_start_time_seconds{remote_host="awx_1"} 1.712085494845462e+09
docker exec -it tools_awx_3 /bin/bash
bash-5.1$ curl localhost:8016
# HELP wsrelay_messages_received_total Number of messages received, to be forwarded, by the broadcast websocket system
# TYPE wsrelay_messages_received_total counter
wsrelay_messages_received_total{remote_host="awx_1"} 0.0
wsrelay_messages_received_total{remote_host="awx_2"} 0.0
# HELP wsrelay_messages_received_created Number of messages received, to be forwarded, by the broadcast websocket system
# TYPE wsrelay_messages_received_created gauge
wsrelay_messages_received_created{remote_host="awx_1"} 1.712085498118138e+09
wsrelay_messages_received_created{remote_host="awx_2"} 1.7120855081194005e+09
# HELP wsrelay_connection Websocket broadcast connection established status
# TYPE wsrelay_connection gauge
wsrelay_connection{remote_host="awx_1",wsrelay_connection="disconnected"} 0.0
wsrelay_connection{remote_host="awx_1",wsrelay_connection="connected"} 1.0
wsrelay_connection{remote_host="awx_2",wsrelay_connection="disconnected"} 0.0
wsrelay_connection{remote_host="awx_2",wsrelay_connection="connected"} 1.0
# HELP wsrelay_connection_start_time_seconds Time the connection was established since unix epoch in seconds
# TYPE wsrelay_connection_start_time_seconds gauge
wsrelay_connection_start_time_seconds{remote_host="awx_1"} 1.7120854981252277e+09
wsrelay_connection_start_time_seconds{remote_host="awx_2"} 1.712085508127356e+09