tchapgouv / tchap-stats

Scripts et organisation des statistiques fournies à Metabase provenant des données matrix
2 stars 1 forks source link

Etude - Faisabilite - Stats VOIP #70

Closed mcalinghee closed 1 month ago

mcalinghee commented 1 month ago

Etudier la disponibilite de chaque metrics du ticket suivant avec notre infrastructure actuelle :

Note technique :

mcalinghee commented 1 month ago

Note technique

Quelle les donnees a disposition ?

  1. Metrics prometheus
    
    curl http://localhost:9641/metrics

HELP turn_traffic_sentb Represents finished sessions sent bytes

TYPE turn_traffic_sentb counter

turn_traffic_sentb{realm="server01.dev.turn.tchap.incubateur.net"} 2638926

HELP turn_traffic_peer_sentb Represents finished sessions peer sent bytes

TYPE turn_traffic_peer_sentb counter

turn_traffic_peer_sentb{realm="server01.dev.turn.tchap.incubateur.net"} 2476460

HELP turn_total_traffic_rcvb Represents total finished sessions received bytes

TYPE turn_total_traffic_rcvb counter

turn_total_traffic_rcvb 2658821

HELP turn_total_traffic_peer_rcvp Represents total finished sessions peer received packets

TYPE turn_total_traffic_peer_rcvp counter

turn_total_traffic_peer_rcvp 26663

HELP turn_total_traffic_sentb Represents total finished sessions sent bytes

TYPE turn_total_traffic_sentb counter

turn_total_traffic_sentb 2638926

HELP stun_binding_request Incoming STUN Binding requests

TYPE stun_binding_request counter

stun_binding_request 126

HELP stun_binding_response Outgoing STUN Binding responses

TYPE stun_binding_response counter

HELP turn_traffic_rcvp Represents finished sessions received packets

TYPE turn_traffic_rcvp counter

turn_traffic_rcvp{realm="server01.dev.turn.tchap.incubateur.net"} 27295

HELP stun_binding_error STUN Binding errors

TYPE stun_binding_error counter

HELP turn_traffic_peer_rcvb Represents finished sessions peer received bytes

TYPE turn_traffic_peer_rcvb counter

turn_traffic_peer_rcvb{realm="server01.dev.turn.tchap.incubateur.net"} 2474276

HELP turn_traffic_sentp Represents finished sessions sent packets

TYPE turn_traffic_sentp counter

turn_traffic_sentp{realm="server01.dev.turn.tchap.incubateur.net"} 27273

HELP turn_traffic_peer_sentp Represents finished sessions peer sent packets

TYPE turn_traffic_peer_sentp counter

turn_traffic_peer_sentp{realm="server01.dev.turn.tchap.incubateur.net"} 26685

HELP turn_total_traffic_rcvp Represents total finished sessions received packets

TYPE turn_total_traffic_rcvp counter

turn_total_traffic_rcvp 27295

HELP turn_total_traffic_sentp Represents total finished sessions sent packets

TYPE turn_total_traffic_sentp counter

turn_total_traffic_sentp 27273

HELP turn_total_traffic_peer_rcvb Represents total finished sessions peer received bytes

TYPE turn_total_traffic_peer_rcvb counter

turn_total_traffic_peer_rcvb 2474276

HELP turn_traffic_peer_rcvp Represents finished sessions peer received packets

TYPE turn_traffic_peer_rcvp counter

turn_traffic_peer_rcvp{realm="server01.dev.turn.tchap.incubateur.net"} 26663

HELP turn_traffic_rcvb Represents finished sessions received bytes

TYPE turn_traffic_rcvb counter

turn_traffic_rcvb{realm="server01.dev.turn.tchap.incubateur.net"} 2658821

HELP turn_total_traffic_peer_sentp Represents total finished sessions peer sent packets

TYPE turn_total_traffic_peer_sentp counter

turn_total_traffic_peer_sentp 26685

HELP turn_total_traffic_peer_sentb Represents total finished sessions peer sent bytes

TYPE turn_total_traffic_peer_sentb counter

turn_total_traffic_peer_sentb 2476460

HELP turn_total_allocations Represents current allocations number

TYPE turn_total_allocations gauge

turn_total_allocations{type="UDP"} 0 turn_total_allocations{type="TCP"} 0 turn_total_allocations{type="TLS/TCP"} 0

HELP process_max_fds Maximum number of open file descriptors.

TYPE process_max_fds gauge

process_max_fds 1048576

HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.

TYPE process_virtual_memory_max_bytes gauge

process_virtual_memory_max_bytes -1

HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.

TYPE process_cpu_seconds_total gauge

process_cpu_seconds_total 0

HELP process_virtual_memory_bytes Virtual memory size in bytes.

TYPE process_virtual_memory_bytes gauge

process_virtual_memory_bytes 601616384

HELP process_start_time_seconds Start time of the process since unix epoch in seconds.

TYPE process_start_time_seconds gauge

process_start_time_seconds 907452115

HELP process_open_fds Number of open file descriptors.

TYPE process_open_fds gauge

process_open_fds 40



Ce sont des metrics ressource et traffic reseau plutot que des metrics fonctionnels

2. Database
- Coturn dispose d'une BDD (que nous n'avons pas active sur notre infra de prod)
- Cependant, rien a en tirer d'apres le [schema de la BDD](https://github.com/coturn/coturn/blob/master/turndb/schema.sql)

3. Logs
- En analysant les logs pour une conversation sur les services coturn, on s'apercoit que nous avons des informations plutot oriente reseau que fonctionnelles.
- Une tentative de calcul d'appel a ete effectue [ici](https://github.com/tchapgouv/tchap-infra/issues/2408#issuecomment-2018159910) mais ceci est bien trop approximatif
mcalinghee commented 1 month ago

Je ferme cette issue car nous n'avons pas d'information exploitable avec ce que l'on a actuellement pour repondre a ce besoin

=> Une solution Posthog serait plus appropriee : https://github.com/tchapgouv/tchap-stats/issues/71