Metrics API

Metrics API

Diarkis provides an endpoint by default to retrieve metrics.

The values can be input into Prometheus for visualization with Grafana, or obtained in JSON format to easily check current metrics locally.

Metrics are updated every 2 seconds.

In addition to the default metrics defined, custom metrics can also be defined and outputted.

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

Metrics Default Defined in Diarkis

Metric NameDescription

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 a single packet.)

Commands_In_TCP_node

Number of commands received by the TCP server (multiple commands may be included in a single packet.)

Commands_Out_UDP_node

Number of commands sent by the UDP server to clients (multiple commands may be included in a single packet.)

Commands_Out_TCP_node

Number of commands sent by the TCP server to clients (multiple commands may be included in a single packet.)

RUDP_Retries_UDP_node

Number of RUDP retries on the UDP server

RUDP_Split_In_UDP_node

Number of packets received by the UDP server that exceed the MTU

RUDP_Split_Out_UDP_node

Number of packets sent by the UDP server that exceed the MTU

Mesh_Packets_In_HTTP_node

Number of packets received in the internal network by the HTTP server

Mesh_Packets_In_UDP_node

Number of packets received in the internal network by the UDP server

Mesh_Packets_In_TCP_node

Number of packets received in the internal network by the TCP server

Mesh_Packets_Out_HTTP_node

Number of packets sent in the internal network by the HTTP server

Mesh_Packets_Out_UDP_node

Number of packets sent in the internal network by the UDP server

Mesh_Packets_Out_TCP_node

Number of packets sent in the internal network by the TCP server

Mesh_Retry_UDP_node

Number of retries in the internal network by the UDP server

Mesh_Retry_TCP_node

Number of retries in the internal network by the TCP server

Rooms_UDP_node

Number of rooms in the UDP server

Rooms_TCP_node

Number of rooms in the TCP server

Groups_UDP_node

Number of groups in the UDP server

Groups_TCP_node

Number of groups in the TCP server

MatchMaker_Search_HTTP_node

Number of MatchMaker searches conducted by the HTTP server

MatchMaker_Empty_HTTP_node

Number of empty MatchMaker searches conducted by the HTTP server

MatchMaker_Ticket_UDP_node

Number of MatchMaker tickets in the UDP server

MatchMaker_Ticket_TCP_node

Number of MatchMaker tickets in the TCP server

MatchMaker_Ticket_Search_UDP_node

Number of MatchMaker searches initiated by the UDP server

MatchMaker_Ticket_Search_TCP_node

Number of MatchMaker searches initiated by the TCP server

MatchMaker_Ticket_Add_UDP_node

Number of searches derived from MatchMaker tickets issued by the UDP server

MatchMaker_Ticket_Add_TCP_node

Number of searches derived from MatchMaker tickets issued by the TCP server

MatchMaker_Complete_UDP_node

Number of MatchMaker tickets completed by the UDP server

MatchMaker_Complete_TCP_node

Number of MatchMaker tickets completed by the TCP server

MatchMaker_Ticket_Complete_Time_Avg_UDP_node

Average time to complete MatchMaker tickets in the UDP server

MatchMaker_Ticket_Complete_Time_Avg_TCP_node

Average time to complete MatchMaker tickets in the TCP server

MatchMaker_Ticket_Complete_Time_Min_UDP_node

Minimum time to complete MatchMaker tickets in the UDP server

MatchMaker_Ticket_Complete_Time_Min_TCP_node

Minimum time to complete MatchMaker tickets in the TCP server

MatchMaker_Ticket_Complete_Time_Max_UDP_node

Maximum time to complete MatchMaker tickets in the UDP server

MatchMaker_Ticket_Complete_Time_Max_TCP_node

Maximum time to complete MatchMaker tickets in the TCP server

P2P_Success_UDP_node

Number of successful P2P connections

P2P_Attempt_UDP_node

Number of P2P connection attempts

Field_Grids_UDP_node

Number of Field grids in the UDP server

Field_Grids_TCP_node

Number of Field grids in the TCP server

Prometheus Configuration

#TODO

Custom Metrics Configuration

最終更新