kmesh icon indicating copy to clipboard operation
kmesh copied to clipboard

metrics in Kernel Native Mode

Open lec-bit opened this issue 8 months ago • 3 comments

What type of PR is this? /kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


lec-bit avatar Mar 26 '25 01:03 lec-bit

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign hzxuzhonghu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

kmesh-bot avatar Mar 26 '25 01:03 kmesh-bot

I use src pod name and dst svc name or pod name as label

[root@kmesh-zsph4 kmesh]# curl http://10.244.1.5:15020/status/metric

HELP kmesh_tcp_ads_connections_closed_total The total number of TCP connections closed to a ads

TYPE kmesh_tcp_ads_connections_closed_total gauge

kmesh_tcp_ads_connections_closed_total{destination_pod_address="10.244.1.10",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-s6nw4.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 8 kmesh_tcp_ads_connections_closed_total{destination_pod_address="10.244.1.11",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-mkp75.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 8

HELP kmesh_tcp_ads_connections_opened_total The total number of TCP connections opened to a ads

TYPE kmesh_tcp_ads_connections_opened_total gauge

kmesh_tcp_ads_connections_opened_total{destination_pod_address="10.244.1.10",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-s6nw4.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 8 kmesh_tcp_ads_connections_opened_total{destination_pod_address="10.244.1.11",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-mkp75.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 8

HELP kmesh_tcp_ads_received_bytes_total The size of the total number of bytes received in response to a ads over a TCP connection.

TYPE kmesh_tcp_ads_received_bytes_total gauge

kmesh_tcp_ads_received_bytes_total{destination_pod_address="10.244.1.10",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-s6nw4.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 2.547308e+06 kmesh_tcp_ads_received_bytes_total{destination_pod_address="10.244.1.11",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-mkp75.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 2.578883e+06

HELP kmesh_tcp_ads_sent_bytes_total The size of the total number of bytes sent in response to a ads over a TCP connection.

TYPE kmesh_tcp_ads_sent_bytes_total gauge

kmesh_tcp_ads_sent_bytes_total{destination_pod_address="10.244.1.10",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-s6nw4.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 33988 kmesh_tcp_ads_sent_bytes_total{destination_pod_address="10.244.1.11",destination_pod_port="-",destination_svc_name="fortio-server-deployment-7cd9f46f6d-mkp75.default",reporter="source",source_pod_address="10.244.1.9",source_pod_name="fortio-client-deployment-79d94fc67c-6fh4k.default",source_pod_port="-"} 34409

HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.

TYPE promhttp_metric_handler_errors_total counter

promhttp_metric_handler_errors_total{cause="encoding"} 0 promhttp_metric_handler_errors_total{cause="gathering"} 0

lec-bit avatar Mar 27 '25 11:03 lec-bit

@lec-bit you can also update the code to include periodic updation of metrics in native mode, like we are doing in workload mode https://github.com/kmesh-net/kmesh/pull/1298

yp969803 avatar Apr 17 '25 03:04 yp969803