Metrics API
Metrics API
Diarkis provides default endpoints to obtain metrics.
It is intended for inputting values into Prometheus for visualization with Grafana, or retrieving them in JSON format to quickly check current metrics locally.
Metrics are updated every 2 seconds.
In addition to the predefined metrics, you can also define and output custom metrics.
Endpoint
$HTTP_ENDPOINT/metrics/prometheus/v/3: Provides a scraping endpoint for Prometheus (https://prometheus.io/).
curl $HTTP_ENDPOINT/metrics/prometheus/v/3
$HTTP_ENDPOINT/metrics/json: Returns the same content in JSON format.
curl $HTTP_ENDPOINT/metrics/json
Predefined Metrics in Diarkis
Metric Name | Description |
---|---|
Users_UDP_node | Number of users connected to the UDP server |
Users_TCP_node | Number of users connected to the TCP server |
UDP_Packets_In_UDP_node | Number of UDP packets received by the UDP server |
TCP_Packets_In_TCP_node | Number of TCP packets received by the TCP server |
TCP_Packets_Out_TCP_node | Number of TCP packets sent by the TCP server |
UDP_Packets_Out_UDP_node | Number of UDP packets sent by the UDP server |
UDP_Packets_In_UDP_node | Number of UDP packets received by the UDP server |
Commands_In_UDP_node | Number of commands received by the UDP server (multiple commands may be included in one packet). |
Commands_In_TCP_node | Number of commands received by the TCP server (multiple commands may be included in one packet). |
Commands_Out_UDP_node | Number of commands sent by the UDP server to the client |
(multiple commands may be included in one packet). | |
Commands_Out_TCP_node | Number of commands sent by the TCP server to the client |
(multiple commands may be included in one packet). | |
RUDP_Retries_UDP_node | Number of RUDP retries on the UDP server |
RUDP_Split_In_UDP_node | Number of packets exceeding MTU size received by the UDP server |
RUDP_Split_Out_UDP_node | Number of packets exceeding MTU size sent by the UDP server |
Mesh_Packets_In_HTTP_node | Number of packets received in the internal network of the HTTP server |
Mesh_Packets_In_UDP_node | Number of packets received in the internal network of the UDP server |
Mesh_Packets_In_TCP_node | Number of packets received in the internal network of the TCP server |
Mesh_Packets_Out_HTTP_node | Number of packets sent in the internal network of the HTTP server |
Mesh_Packets_Out_UDP_node | Number of packets sent in the internal network of the UDP server |
Mesh_Packets_Out_TCP_node | Number of packets sent in the internal network of the TCP server |
Mesh_Retry_UDP_node | Number of retries in the internal network of the UDP server |
Mesh_Retry_TCP_node | Number of retries in the internal network of the TCP server |
Rooms_UDP_node | Number of rooms on the UDP server |
Rooms_TCP_node | Number of rooms on the TCP server |
Groups_UDP_node | Number of groups on the UDP server |
Groups_TCP_node | Number of groups on the TCP server |
MatchMaker_Search_HTTP_node | Number of MatchMaker searches performed by the HTTP server |
MatchMaker_Empty_HTTP_node | Number of empty MatchMaker searches performed by the HTTP server |
MatchMaker_Ticket_UDP_node | Number of MatchMaker tickets on the UDP server |
MatchMaker_Ticket_TCP_node | Number of MatchMaker tickets on the TCP server |
MatchMaker_Ticket_Search_UDP_node | Number of MatchMaker searches issued by the UDP server |
MatchMaker_Ticket_Search_TCP_node | Number of MatchMaker searches issued by the TCP server |
MatchMaker_Ticket_Add_UDP_node | Number of searches originating from MatchMaker tickets issued by the UDP server |
MatchMaker_Ticket_Add_TCP_node | Number of searches originating from MatchMaker tickets issued by the TCP server |
MatchMaker_Complete_UDP_node | Number of completed MatchMaker tickets on the UDP server |
MatchMaker_Complete_TCP_node | Number of completed MatchMaker tickets on the TCP server |
MatchMaker_Ticket_Complete_Time_Avg_UDP_node | Average time taken to complete a MatchMaker ticket on the UDP server |
MatchMaker_Ticket_Complete_Time_Avg_TCP_node | Average time taken to complete a MatchMaker ticket on the TCP server |
MatchMaker_Ticket_Complete_Time_Min_UDP_node | Minimum time taken to complete a MatchMaker ticket on the UDP server |
MatchMaker_Ticket_Complete_Time_Min_TCP_node | Minimum time taken to complete a MatchMaker ticket on the TCP server |
MatchMaker_Ticket_Complete_Time_Max_UDP_node | Maximum time taken to complete a MatchMaker ticket on the UDP server |
MatchMaker_Ticket_Complete_Time_Max_TCP_node | Maximum time taken to complete a MatchMaker ticket on the TCP server |
P2P_Success_UDP_node | Number of successful P2P connections |
P2P_Attempt_UDP_node | Number of attempted P2P connections |
Field_Grids_UDP_node | Number of Field grids managed by the UDP server |
Field_Grids_TCP_node | Number of Field grids managed by the TCP server |
Prometheus Configuration
#TODO
Custom Metrics Configuration
Last updated