From 3e80597e587230a76cc3c32a9d3325143fc4798a Mon Sep 17 00:00:00 2001 From: Takeshi NAMAO Date: Fri, 29 Mar 2024 13:23:56 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AB=E3=82=AF=E3=83=A9=E3=82=B9=E3=82=BF=E3=83=BC?= =?UTF-8?q?=E3=83=AA=E3=83=AC=E3=83=BC=E3=81=AE=E3=83=A1=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main_test.go | 16 ++++++++++++++++ test/maximum.metrics | 16 ++++++++++++++++ test/sora_cluster_metrics_enabled.metrics | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/main_test.go b/main_test.go index a43c6e5..7317cf1 100644 --- a/main_test.go +++ b/main_test.go @@ -24,6 +24,22 @@ var ( "raft_state": "follower", "raft_term": 3 }, + "cluster_relay": [ + { + "node_name": "node-01", + "total_received_byte_size": 11, + "total_sent_byte_size": 12, + "total_received": 13, + "total_sent": 14 + }, + { + "node_name": "node-02", + "total_received_byte_size": 21, + "total_sent_byte_size": 22, + "total_received": 23, + "total_sent": 24 + } + ], "erlang_vm": { "memory": { "total": 1234, diff --git a/test/maximum.metrics b/test/maximum.metrics index 8361fee..59582e1 100644 --- a/test/maximum.metrics +++ b/test/maximum.metrics @@ -22,6 +22,22 @@ sora_cluster_raft_state{state="follower"} 1 # HELP sora_cluster_raft_term The current Raft term. # TYPE sora_cluster_raft_term counter sora_cluster_raft_term 3 +# HELP sora_cluster_relay_received_bytes The total number of bytes received by the cluster relay. +# TYPE sora_cluster_relay_received_bytes counter +sora_cluster_relay_received_bytes{node_name="node-01"} 11 +sora_cluster_relay_received_bytes{node_name="node-02"} 21 +# HELP sora_cluster_relay_received_packets The total number of packets received by the cluster relay. +# TYPE sora_cluster_relay_received_packets counter +sora_cluster_relay_received_packets{node_name="node-01"} 13 +sora_cluster_relay_received_packets{node_name="node-02"} 23 +# HELP sora_cluster_relay_sent_bytes The total number of bytes sent by the cluster relay. +# TYPE sora_cluster_relay_sent_bytes counter +sora_cluster_relay_sent_bytes{node_name="node-01"} 12 +sora_cluster_relay_sent_bytes{node_name="node-02"} 22 +# HELP sora_cluster_relay_sent_packets The total number of packets sent by the cluster relay. +# TYPE sora_cluster_relay_sent_packets counter +sora_cluster_relay_sent_packets{node_name="node-01"} 14 +sora_cluster_relay_sent_packets{node_name="node-02"} 24 # HELP sora_client_type_total The total number of connections by Sora client types # TYPE sora_client_type_total counter sora_client_type_total{client="android_sdk",state="failed"} 1 diff --git a/test/sora_cluster_metrics_enabled.metrics b/test/sora_cluster_metrics_enabled.metrics index 03d77e5..2d633bd 100644 --- a/test/sora_cluster_metrics_enabled.metrics +++ b/test/sora_cluster_metrics_enabled.metrics @@ -22,6 +22,22 @@ sora_cluster_raft_state{state="follower"} 1 # HELP sora_cluster_raft_term The current Raft term. # TYPE sora_cluster_raft_term counter sora_cluster_raft_term 3 +# HELP sora_cluster_relay_received_bytes The total number of bytes received by the cluster relay. +# TYPE sora_cluster_relay_received_bytes counter +sora_cluster_relay_received_bytes{node_name="node-01"} 11 +sora_cluster_relay_received_bytes{node_name="node-02"} 21 +# HELP sora_cluster_relay_received_packets The total number of packets received by the cluster relay. +# TYPE sora_cluster_relay_received_packets counter +sora_cluster_relay_received_packets{node_name="node-01"} 13 +sora_cluster_relay_received_packets{node_name="node-02"} 23 +# HELP sora_cluster_relay_sent_bytes The total number of bytes sent by the cluster relay. +# TYPE sora_cluster_relay_sent_bytes counter +sora_cluster_relay_sent_bytes{node_name="node-01"} 12 +sora_cluster_relay_sent_bytes{node_name="node-02"} 22 +# HELP sora_cluster_relay_sent_packets The total number of packets sent by the cluster relay. +# TYPE sora_cluster_relay_sent_packets counter +sora_cluster_relay_sent_packets{node_name="node-01"} 14 +sora_cluster_relay_sent_packets{node_name="node-02"} 24 # HELP sora_connections_total The total number of connections created. # TYPE sora_connections_total counter sora_connections_total{state="created"} 2